Skip to main content

Module realtime

Module realtime 

Source
Expand description

Realtime change-notification spine.

Provides a process-internal broadcast bus fed by SurrealDB live queries (db.select("table").live()), re-exposing change events to the SPA as Server-Sent Events at /api/live/{topic}. Any view that holds a subscribed entity will re-render on remote mutations, eliminating stale data across toolbars, dropdowns, headers, and list pages.

Modules§

lifecycle
Retained subscription state and acknowledged ownership of bus workers.
surreal_bus
Scope-owned Surreal subscriptions with explicit reconnect generations.

Structs§

CompositeRealtimeBus
Routes memory notifications to the independently owned memory database. The composing supervisor owns and closes each constituent bus separately.
LiveEvent
A single change event delivered by the bus.

Enums§

EntityTopic
Topics enrolled with the bus at startup. Each topic backs one Surreal .select().live() stream and one broadcast channel.
LiveAction
Action carried by a LiveEvent. Mirrors surrealdb::Action.
RealtimePublishError

Traits§

RealtimeBus
Backend-neutral realtime change bus.