Build an Event-Sourced Store

append-only events and replay

Challenge 2 of Data PipelinesIntermediate~50 min

Stop storing state. Store the events that produced it. Instead of overwriting a row, you append an immutable log of what happened and derive current state by replaying it. Build the append-only event store, the fold that rebuilds state, snapshots to skip replaying from the beginning, and time-travel to any past version. The pattern behind ledgers, audit logs, and Git itself.

4 steps

  1. 1The Append-Only Log
  2. 2Rebuilding State by Replay
  3. 3Snapshots
  4. 4Time Travel
Start step 1