Skip to content

Design a Reactive Database (Live Queries), stage 3 of 9: break it

The task that never appeared

The first version of the read-set recorder is below. Select the lines that explain the bug.

System so far· 5 parts
123456CLIENTWeb andmobile appsSERVICESync serversSERVICEFunction runnersDATABASEVersioned storeSERVICESubscriptiontracker

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. 4Versioned store → Subscription tracker: Committed writes, in order
  5. 5Subscription tracker → Sync servers: These subscriptions changed
  6. 6Sync servers → Web and mobile apps: New results
  • Request / response
  • Asynchronous
  • Server push

What you need to know

0 of 1 checks done
  1. A query depends on what it didn't find as much as on what it found. "Tasks in Backlog" depends on there being no other Backlog tasks; a new one changes the answer.

    Rows that appear inside a range a query already scanned are called phantoms.

  2. Check

    The recorder saves the keys of rows a scan returned. A new task is inserted into the scanned column. Does the query re-run?