π§© Event Sourcing
β Overviewβ
Style obtaining current state by accumulating "events that changed state" instead of state itself, and replaying them.
β Problems Addressedβ
- Complete retention of update history (Audit / Reproduction).
- Detection of conflict and ensuring consistency with asynchronous processing.
- Making it easy to grasp meaning of state change (why it became this state) later.
β Basic Philosophy & Rulesβ
- All change operations are saved as events.
- Current State = Replay result of past events.
- Often uses Event Store (DB dedicated to events).
Conceptual Diagramβ

Source: Microsoft, βEvent Sourcing pattern β Azure Architecture Centerβ.
https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing
β Suitable Applicationsβ
- Areas where history management is essential like Finance / Accounting.
- Domains compatible with DDD Aggregate.
- Systems requiring automatic reprocessing / recalculation.
β Unsuitable Casesβ
- Simple CRUD where necessity of history retention is thin.
- Cases where event volume is too large and replay cost becomes a problem.
β Historyβ
- Influenced event-centric calculation models like Actor Model.
- Combination with CQRS is common.
β Related Stylesβ
β Representative Frameworksβ
-
EventStoreDB
Most widely used Event Store dedicated to Event Sourcing. -
Kafka / Kinesis / Pub/Sub
Implementation accumulating events as Append-only log and performing state reconstruction by Replay is possible. -
Axon Framework (Java)
Easy to implement integrating Event Sourcing and CQRS. -
Temporal / Cadence
Supports long-term event history management and workflow replay.
β Design Patterns Supporting This Styleβ
-
Memento
Used for saving / restoring snapshots. -
Command
Treats event as operation object generating it. -
Observer
Structure where event subscriber receives state change as notification. -
Iterator
Used for sequential replay of Event Stream. -
State
Aggregate updates internal state applying events.
β Summaryβ
Event Sourcing is an architecture realizing meaningful state management by treating history as first-class data.