Skip to content

Design a Reactive Database (Live Queries), stage 7 of 9: change it

One board, a hundred thousand viewers

Every comment changes the board's result. The board query returns the same thing for everyone in the company.

System so far· 6 parts
12345678CLIENTWeb andmobile appsSERVICESync serversSERVICEFunction runnersDATABASEVersioned storeSERVICECommitterSERVICESubscriptiontracker

Select a component to see what it is responsible for and which state it owns.

  1. 1Web and mobile apps → Sync servers: Subscribe and mutate
  2. 2Sync servers → Function runners: Run a function
  3. 3Function runners → Versioned store: Read at a snapshot
  4. 4Function runners → Committer: Writes plus read set
  5. 5Committer → Versioned store: Append in timestamp order
  6. 6Versioned store → Subscription tracker: Committed writes, in order
  7. 7Subscription tracker → Sync servers: These subscriptions changed
  8. 8Sync servers → Web and mobile apps: New results
  • Request / response
  • Asynchronous
  • Server push

What you need to know

0 of 2 checks done
  1. Work it out

    100,000 viewers watch one board; 5 comments a second change it. Re-running the board query per viewer per change: how many runs a second?
    runs per second