feat: LiveProjection — subscribable projections with fan-out for SSE #47
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#47
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
1000 users watching same dashboard should NOT mean 1000 store subscriptions.
Design
LiveProjection[E, V]— one EventSubscription consumer, in-memory view, fan-out to N clients via Go channels.SSE Integration
SSE handler subscribes to projections, not the store:
One SSE connection per client, multiple projections, real-time.
Scaling
Tests
Update: Topic-based subscriptions
Subscribers must be able to filter by key — order ID, tenant ID, user ID, etc.
Routing keys extracted from events via user-defined function:
Fan-out only to matching subscribers. 1000 users watching different orders = 1000 keyed subs, each getting only their updates. Zero wasted bandwidth.