Repository navigation
app/: live updates' transport, LISTEN/NOTIFY (sc-8897, sc-8900) - #76
Closed
ndbroadbent wants to merge 3 commits into
Closed
ndbroadbent wants to merge 3 commits into
ndbroadbent wants to merge 3 commits into
Conversation
VisualCIdocspring/visualci · build #335 · 331 unchanged · no changes This PR vs base: nothing since #272, across 3 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
ndbroadbent
force-pushed
the
laravel-webhooks
branch
from
December 2, 2026 15:28
89ad3b5 to
7081273
Compare
ndbroadbent
force-pushed
the
laravel-live
branch
from
December 2, 2026 15:28
e5f8df1 to
13bf992
Compare
ndbroadbent
force-pushed
the
laravel-webhooks
branch
from
December 2, 2026 16:01
7081273 to
d0b9b1d
Compare
ndbroadbent
force-pushed
the
laravel-live
branch
from
December 2, 2026 16:01
13bf992 to
8420e3c
Compare
…IFY on one channel, one listener per process (started by the first subscriber, reconnecting with backoff) fanning topics out to subscribers; notify() is delivered on commit; topics only say 'look again', so a missed one costs a moment and payloads carry no data; CheckLive notifies itself every minute and pushes VISUALCI_LIVE_HEARTBEAT only when it arrives
…h fresh LISTEN and each silent reconnect tells subscribers to re-read everything (*), as they must on Lagged too; every process probes its own listener each minute over a separate connection and restarts it when the probe doesn't come back in ten seconds (a half-open connection), with live::healthy() for its health check; the queue worker's heartbeat waits for the listener to be ready before probing; topics are capped well under Postgres's 8000 bytes; documented: LISTEN needs a direct or session-mode connection, not a transaction-mode PgBouncer
… and dependencies merged
ndbroadbent
force-pushed
the
laravel-live
branch
from
December 2, 2026 16:06
8420e3c to
8f8c8a3
Compare
ndbroadbent
force-pushed
the
laravel-webhooks
branch
from
December 2, 2026 16:06
d0b9b1d to
38a4500
Compare
Member
Author
|
Included in #87. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of sc-8900, for sc-8897 (live updates). Stacked on #74.
This is the transport the SSE endpoints will use. It's built as sc-8900 seam 4 describes: Postgres LISTEN/NOTIFY between replicas, with no WebSockets and no broadcaster service.
live::notify(topic)sendspg_notify('visualci_live', topic), with topics such asbuild:42. Inside a transaction it's delivered on commit, so nobody hears about a change they can't read yet.live::subscribe(url)returns every topic sent from now on, from any replica. OnePgListenerper process starts with the first subscriber, and after a lost connection it reconnects with backoff (0.5 s, doubling up to 30 s).CheckLiveruns every minute. It notifies a random probe topic, waits up to 10 s for this process's listener to hear it, and pushesVISUALCI_LIVE_HEARTBEATwith the result, so a listener that's connected but deaf fails the heartbeat.Next, once features'
BuildChanged(#73) is on main: a listener that notifiesbuild:<id>andproject:<id>, and theEventStreamendpoints for the build page and the CLI's--wait.Tests:
app/tests/live.rsruns against the real Postgres server, because test transactions roll back and NOTIFY never arrives inside them. It checks that a notification from another connection reaches a subscriber, and only after the commit. The whole app suite passes on docspring-dev, and clippy is clean.