Realtime reference

Follow preparation while it runs: private channels, persisted events with sequences, snapshots, replay after a reconnect, and revocation.

  • Availability: Planned
  • Evidence: Read from source
  • Reference

Scope

Preparation is durable work that runs whether or not anyone is watching. Realtime lets an authorized member watch it: queue position, turns, stage progress, modules, cache hits, retries, failures, readiness and consumption, for all three stages.

Two ideas organize everything in this reference:

  • Events are persisted first. Every event is stored with a stable id and a gap-free sequence per channel, in the same transaction as the state change it describes. The broadcast transport only notifies. It can duplicate, reorder or lose messages, and a consumer recovers from all three by replaying persisted events.
  • A channel name proves nothing. The service checks the caller's access to the resource behind every channel when it issues a grant, and again when access changes.

Pages

  • Channels and grants — The three private channel levels, and the short-lived grant a member obtains to join them.
  • Events — The event envelope, the microbatch a broadcast message carries, and every event type with its channel, stage and delivery class.
  • Reconnect and replay — Recover the exact state of a channel after a gap, a reconnect or a closed tab, using a snapshot, a cursor and persisted events.
  • Revocation — What happens to an open subscription when a session ends, a membership changes or a grant is revoked, and how a client should react.