Subtracks & Tasks
Event Sourcing
Implement Event Store
An event store is an **append-only log** where every change to an aggregate is recorded as an immutable event. To reconstruct current state you replay...
Implement Event Replay
Event replay rebuilds an aggregate's state by applying all of its stored events in order. It is the core read mechanism in event sourcing: state is ne...
Implement Event Versioning and Migration
Event schemas change over time as requirements evolve. A field gets added, renamed, or split. Because old events are immutable, you cannot change them...
Implement Event Projections
The event store is optimized for writes, not queries. A **projection** solves this: it listens to the event stream and maintains a denormalized read m...
Implement Event Compensation and Sagas
Distributed transactions across multiple services cannot use a single database commit. A **saga** breaks the operation into a sequence of local steps,...
CQRS (Command Query Responsibility Segregation)
Implement CQRS Fundamentals
CQRS (Command Query Responsibility Segregation) separates every operation into either a **command** (write, changes state) or a **query** (read, never...
Implement Command Side Validation and Execution
The command side is the write path in CQRS. Before any state change is applied, the command must pass two layers of validation: **schema validation** ...
Implement Query Side Optimization
The query side is the read path in CQRS. Instead of querying the write model directly (which is normalized for writes), it reads from **pre-built read...
Implement Event-Driven Read Model Updates
In CQRS, the command side emits events and the query side must react to those events to keep its read models up-to-date. An **event-driven projector**...
Implement CQRS with Event Sourcing
CQRS and event sourcing are designed to work together: commands write to the event store (the source of truth), and projections built from those event...
Concepts Covered
Prerequisites
It is recommended to complete the previous tracks before starting this one. Concepts build progressively throughout the curriculum.