How a user session lifecycle is expressed as a single generator function when each step is a Resonate durable checkpoint and the idle timer survives crashes.
Model a user session as a long-running generator: login, per-activity checkpoints, durable idle timeout, and cleanup. Crashes resume mid-lifecycle without re-recording earlier activities or restarting the timer.
How the Write Last, Read First state machine collapses to a short generator when each step is a durable checkpoint.
Create an account in a System of Reference (SQLite) and a System of Record (TigerBeetle) without a distributed transaction. Each step is a Resonate durable checkpoint; replays after a crash skip completed steps and finish the write.
A one-click checkout where the cancellation window is a durable `ctx.run` over a Promise race, not a `PENDING / CONFIRMED / CANCELLED` state row.
Start a purchase, open a 5-second window in which the user can cancel, then confirm or cancel. The window is one `ctx.run` over a Promise that races a timer against an EventEmitter signal — checkpointed, so a crash mid-window resumes from where it left off.
How a six-state order workflow collapses to straight-line generator code when each ctx.run call is a durable checkpoint.
An order moves through created, confirmed, shipped, delivered (or cancelled, refunded), and must resume cleanly mid-transition after a crash. With Resonate the generator's execution position IS the state — each transition is a ctx.run checkpoint, no K/V store required.