01 |LIVE QUERIES
Any query can become a subscription
Add LIVE to a SELECT and the same filter, permissions, and shape you already use stream to the client on every matching change - full records or just the diff.
LIVE SELECT
Subscribe with the query you already wrote
A live query carries the same WHERE clause and permissions as a normal one. The client receives new, updated, and deleted records as they commit.
EVENTS AND CHANGEFEEDS
React on write, replay on demand
DEFINE EVENT runs logic in the engine when data changes; a changefeed keeps an ordered, durable record of mutations you can replay from any point.
02 |ONE ENGINE
No message broker in the middle
The usual realtime stack polls the database, or wires a broker and a change-data-capture pipeline beside it. SurrealDB pushes changes from the engine that made them.
No polling
Clients subscribe once and the engine pushes changes as they commit, instead of re-querying on a timer and hoping to catch updates.
No separate pipeline
Live queries and changefeeds come from the database itself - there is no broker, CDC connector, or stream processor to deploy and keep in sync.
Consistent with the write
Updates are emitted by the transaction that made them, so subscribers see exactly what committed, in order.
GET STARTED
Make your data reactive
Subscribe with LIVE SELECT, react with DEFINE EVENT, and stream changes - all from SurrealDB.
SOC 2 Type 2
GDPR
Cyber Essentials Plus
ISO 27001