Architecture

Event sourcing

Persist state as an append-only log of events; current state is a fold.


In plain terms

Audit, replay, and time-travel debugging come for free. The cost is querying — you usually pair with CQRS read models.

Origin

Martin Fowler formalised the pattern in 2005. The idea predates the name — financial ledgers, version control, and database transaction logs are all event-sourced systems.

Where it shows up in production
  • Git A repository is an event-sourced filesystem. Current state is a fold over commits.
  • Banking ledgers Account balance is derived from the transaction log, not stored as a primary field.
  • EventStore / Marten / Axon Dedicated event-sourced databases / frameworks.
Sources & further reading
Found this useful?