One event history. Four read paths.
AllSource Query Service is the stateless Elixir/Phoenix read plane over Core. It separates HTTP request-response queries, realtime channels, analytics endpoints, and rebuildable projections so each consumer gets the read shape it needs without creating another source of truth.
Core events
HTTP
Realtime
Analytics
Projections
Apps + agents
Choose by read job
HTTP
Request-response reads
Tenant-scoped event queries, entity state, projected reads, health, and OpenAPI-backed endpoints.
Realtime
Live interface updates
Phoenix Channels broadcast accepted events and projection-state updates to subscribed clients.
Analytics
Aggregate questions
Dedicated analytics routes answer frequency, summary, correlation, usage, and operational queries.
Projections
Current-state read models
Tenant-scoped folds build from Core history, update from live events, and can be rebuilt without replacing source truth.
Boundary that prevents data drift
Query Service owns delivery and read shape, not durable source data. ETS caches and tenant projection state rebuild from Core history. This keeps realtime, analytics, and HTTP concerns independently operable without synchronising PostgreSQL or another primary database.