Part 11 of 13 · 1 min read
Quick notes
- Durable state means a run's progress lives outside the process, so a crash, a deploy or a day-long wait does not lose it, and any server can resume it.
- Three storage models, chosen by bytes written and events replayed: snapshot every step, a pure event log, or a hybrid with a snapshot every k events. Snapshots grow with the square of the run; logs grow linearly.
- Replay is only safe if you replay recorded results, not live calls; a fresh model draw diverges from the original almost every time.
- Old checkpoints meet new code, so version the schema, migrate forward, and refuse state newer than the code.
- Resuming after a wait is acting on old information: re-validate the premise before the irreversible step.