Skip to content
About
Main content

Queryable state

What do you give up by reading a job's state directly?

is already a partitioned key-value store. So exposing point lookups into it (get(restaurant 5)) seems to eliminate the write and the separate serving store. The mechanism is sound. The coupling is what kills it.

  • Reads bypass the checkpoint boundary. You see uncommitted state. In database terms this is read-uncommitted: a read can observe a value that a later recovery undoes, because the job restores an older .
  • Serving traffic shares a process with processing. Heavy read load causes in the pipeline, and there is no isolation mechanism.
  • The key-to-instance mapping is an internal detail that changes at every rescale. So clients need a discovery layer that tracks the job's internals.
  • No availability during recovery, which is exactly when someone wants to know what happened.

Exporting to a serving store costs a write (every update is written twice: to state and to the store) and a staleness (the store is behind by up to a checkpoint interval). It buys isolation, a stable address, availability during job restarts, and committed reads. Most systems make that trade, and it is the right one except in cases that are low-cardinality, latency-critical, and tolerant of staleness.

Queryable stateExport to serving store
Extra writenoneone per update
Stalenessnone (but uncommitted)up to a checkpoint interval
Isolation from processingnonefull
Available during restartnoyes
Stable client addressno (changes on rescale)yes
Reads are committednoyes