1 min read
On this page

Event-Driven Architecture & CQRS

Contents

  1. Event-Driven Fundamentals -- Events vs commands, domain vs integration events, event buses, loose coupling
  2. Event Sourcing -- Append-only event stores, rebuilding state from events, optimistic concurrency
  3. Projections and Snapshots -- Building read models from events, snapshot strategies, projection rebuilds
  4. CQRS -- Separating read and write models, eventual consistency, when CQRS is overkill
  5. Sagas and Compensation -- Choreography vs orchestration, saga pattern, compensating actions, distributed transactions (2PC), failure scenarios

Diagrams

CQRS Pattern

Saga Pattern