Realtime
One client. Many features.
Eternia's chat, presence, voice, notifications, and bridges share one Centrifugo client and one event dispatcher. The result: a launcher that feels live, with one auth handshake and one reconnect path.
Principles
- 01
One Centrifugo client per session
No socket multiplication. Every program subscribes through one connection.
- 02
Typed room subscriptions
RoomKey.dm(id), RoomKey.serverChannel(id, channel), RoomKey.thread(id) — not stringly-typed.
- 03
Single dispatcher
Every feature registers handlers; the dispatcher routes events. No back-channel between features.
- 04
Durable outbox
Sends queue locally to a sqlite table. The network can blink and you don't lose messages.
- 05
Per-message lane
Durable vs best-effort is declared at send time. A reaction is best-effort; a DM is durable.
Envelope shape
{
"type": "dm.message",
"id": "01ABCD...",
"correlationId": "01XYZ...",
"scope": "dm",
"scopeId": "dm:42",
"ts": "2026-05-18T10:23:14Z",
"by": "user:7f0e...",
"body": { "kind": "text", "text": "..." }
}Shape illustrative; canonical contract lives in the launcher's docs/
Programs that plug into this
Opt-in voice rooms and 1:1 huddles
Watch with friends, in the same launcher
The realtime substrate
DMs, channels, threads, broadcasts
Local-first inbox
Sticky, debounced, restored