Event-Driven Architecture & CQRS
Design event-driven systems: events vs commands, brokers, delivery guarantees, outbox, sagas, CQRS read models, event sourcing, tracing and schema evolution.
What you'll learn
- Explain when event-driven architecture helps and when synchronous calls are the better choice.
- Design well-named, versioned events with envelopes, schemas and the right amount of data.
- Choose between queues and logs and build idempotent, ordered consumers with retries and dead-letter queues.
- Publish reliably with the transactional outbox and coordinate multi-service work with sagas.
- Apply CQRS and event sourcing at the right level, including projections, snapshots and versioning.
- Observe, test and evolve asynchronous systems, and recognise the common pitfalls.
Syllabus
Why Event-Driven Architecture
- From Request-Response to Events
- Events, Commands, Queries and the Four Event Patterns
- When EDA Fits and When It Does Not
Designing Events
Brokers and Delivery Guarantees
- Queues, Topics and Logs
- Delivery Semantics and Idempotent Consumers
- Ordering, Retries and Dead Letters
Reliable Publishing and Sagas
- The Dual-Write Problem and the Transactional Outbox
- Sagas: Choreography and Orchestration
- Inbox, Idempotency Keys and Exactly-Once Illusions
CQRS
- Command Query Responsibility Segregation
- Read Models, Projections and Eventual Consistency
- Levels of CQRS and When to Stop
Event Sourcing
Observability, Testing and Evolution
- Tracing and Monitoring Asynchronous Flows
- Testing Event-Driven Systems
- Migrating Towards Events Safely