archie-ui: one upstream control-plane watch per kind, shared by every client #1429

Closed
opened 2026-10-27 13:40:21 +00:00 by sam · 0 comments
Owner

handleControlPlaneWatch opens a gRPC Watch to the State Store per browser stream, so N tabs x 14 kinds = 14N upstream streams. archie-ui should hold one Watch per kind for the life of the process (reusing keepWatch's backoff rules, internal/app/archied/control_plane_watch.go, and the rule that an accepted stream is not a healthy one) and fan updates into the multiplexed client hub. A client connecting late gets the current value of each kind from the hub's last-seen cache, not a new upstream call.

Acceptance criteria

Upstream Watch count is independent of client count, proved by a test driving the real controlplane.Server over bufconn with several clients.

Close reason

Fixed in 93446477 (PR #995): internal/webui/live_hub.go holds one upstream watch per topic and fans it out to every client over a single multiplexed /api/stream.


Imported from beads archie-core-l23o · GitHub #1001 · type task · priority P1 · created 2026-09-25 · closed 2026-09-26

handleControlPlaneWatch opens a gRPC Watch to the State Store per browser stream, so N tabs x 14 kinds = 14N upstream streams. archie-ui should hold one Watch per kind for the life of the process (reusing keepWatch's backoff rules, internal/app/archied/control_plane_watch.go, and the rule that an accepted stream is not a healthy one) and fan updates into the multiplexed client hub. A client connecting late gets the current value of each kind from the hub's last-seen cache, not a new upstream call. ### Acceptance criteria Upstream Watch count is independent of client count, proved by a test driving the real controlplane.Server over bufconn with several clients. ### Close reason Fixed in 93446477 (PR #995): internal/webui/live_hub.go holds one upstream watch per topic and fans it out to every client over a single multiplexed /api/stream. --- _Imported from beads `archie-core-l23o` · GitHub #1001 · type task · priority P1 · created 2026-09-25 · closed 2026-09-26_
sam added the hightask labels 2026-10-27 13:40:21 +00:00
sam self-assigned this 2026-10-27 13:40:21 +00:00
sam closed this issue 2026-10-27 13:40:21 +00:00
sam added a new dependency 2026-10-27 13:42:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1429