Design a Reactive Database (Live Queries), stage 4 of 9: decide
Twelve tasks, eleven cards
The board and the count are separate subscriptions. Each is re-run and pushed as soon as its own run finishes.
System so far· 5 parts
Select a component to see what it is responsible for and which state it owns.
- 1Web and mobile apps → Sync servers: Subscribe and mutate
- 2Sync servers → Function runners: Run a function
- 3Function runners → Versioned store: Read at a snapshot
- 4Versioned store → Subscription tracker: Committed writes, in order
- 5Subscription tracker → Sync servers: These subscriptions changed
- 6Sync servers → Web and mobile apps: New results
- Request / response
- Asynchronous
- Server push
What you need to know
0 of 2 checks done
When a screen shows several queries, each one is true at some moment. If they're re-run and pushed independently, the screen can show the board at one moment and the count at another: twelve tasks counted, eleven shown.
A multiversion store keeps recent versions of data, so it can answer "as of timestamp T". That makes the moment explicit.
Check
Every result is tagged with the timestamp it was computed at. What rule should the client follow?Think first
How can the server make clients wait less under that rule?