MultiSubscription: multi-projection SSE with single loop, debounce, and ticker reset #130
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Dashboard pages need to watch multiple projections in one SSE connection. Currently requires manually managing N channels, N unsubs, and an N-way select. Every new projection adds boilerplate.
Solution
Add
MultiSubscriptionto eskit:Implementation
RenderAll()fires every handler once (initial render)Run(ctx)blocks, dispatches to correct handler on change48cdaf6)Close()unsubs everythingAPI
OnChange(projection, handler)— subscribe to all changes for a projectionOnEntityChange(projection, streamID, handler)— watch specific entityWithPollFallback(d)— periodic safety net (resets after real events)WithDebounce(d)— collapse rapid changes into single render (default: 16ms / one frame)Requirements