The sync engine that streams everything
Point browsers straight at a sync service and clients get to pick their own tables and filters. One missing check, and every customer's rows stream out to whoever asks.
Schermen updaten zodra data verandert. Iedereen ziet alleen wat hij mag zien.
Schermen updaten zodra data verandert. Iedereen ziet alleen wat hij mag zien.
0
query details accepted from the browser
5 min
before every stream must re-prove access
1
checked path for every live feed
Zonder een gedeelde basis bouwt elk team deze randgevallen opnieuw — en anders.
Point browsers straight at a sync service and clients get to pick their own tables and filters. One missing check, and every customer's rows stream out to whoever asks.
Access was checked once, when the stream opened. That person was removed an hour ago. Their tab is still receiving live updates. Access checked once is access that never expires.
A slightly stale update lands over a fresh edit, then the real one arrives and the screen visibly jumps. Your users read that flicker as data loss.
Het mechanisme van begin tot eind, zoals het in de repository is geïmplementeerd.
The browser asks by name
The client requests a named feed along with its company and project IDs. Everything gets validated before anything else runs.
The server checks membership
Login and role are verified, and project feeds are checked against the right company. Failures return errors, never data.
The server builds the real query
Tables, columns, and filters come from a server-only registry. The sync secret never leaves the server.
Updates settle in order
Each save returns its database transaction ID. The screen holds its instant change until that exact transaction arrives, so nothing stale wins.
Interactief voorbeeld
Deze rondleiding toont het geïmplementeerde backendcontract zonder account, credentials of providercalls.
Interactief voorbeeld
Stap 1 van 4: Optimistic update
Alleen deterministische voorbeelddata. De interactie gebruikt geen account-, provider- of netwerkverbinding.
Kernpunten
The browser can only ask for a feed by name. Which tables, columns, and filters it gets is decided on the server.
Live streams expire every five minutes and must re-prove access. Removed users lose their feed at the next check, not never.
The screen updates instantly, then quietly confirms with the server. Stale data never overwrites a fresh edit.
Technische garanties
Achter de schermen houden autorisatie, tenantgrenzen en foutafhandeling één duidelijke eigenaar. Zo blijft de snelle ervaring voor gebruikers gekoppeld aan veilig herstel als het misgaat.
De grens hierboven is geen claim maar code. Deze bestanden dragen het contract:
src/routes/api/electric.tssrc/realtime/server-proxy.tssrc/realtime/registry.server.tsDeze functies delen contracten en grenzen met deze pagina.
De documentatie beschrijft dezelfde contracten die deze pagina demonstreert.