Developing Event-driven Microservices w/Event Sourcing and CQRS
summary
Explains an implementation: each aggregate persists a sequence of business events, not a current row, and the system persist events instead of state then replays them (with periodic snapshots) to reconstruct state; the event store doubles as the publish/subscribe source so services consume events—sometimes a “four‑or‑five event” ping‑pong completes a money transfer—and CQRS moves reads to materialized query views (ElasticSearch, MongoDB, DynamoDB) updated asynchronously for fast joins.
AI-written summary · about
chapters (39)
- 0:00Intro
- 2:17Traditional application architecture
- 4:35Obstacle to frequent deployments
- 4:50Overloads your IDE and container
- 5:31Obstacle to scaling development
- 6:05Requires long-term commitment to a technology stack
- 6:33Limitations of a single relational database
- 7:30Apply the scale cube
- 8:04Use a microservice architecture
- 8:30Use NoSQL databases
- 8:59Different modules use different types of databases
- 10:17Update two entities in a NoSQL database
- 10:35Cassandra main table index table
- 11:30Event-based architecture to the rescue
- 12:35Eventually consistent money transfer transfer Money
- 13:48Update and publish using 2PC
- 14:18Use data store as message queue
- 16:40Persists events NOT current state
- 17:18Replay events to recreate state
- 20:34Event store implementations
- 21:09Optimizing using snapshots
- 22:12Aggregate traits
- 23:10Account - command processing
- 25:31Aggregate type classes/implicits
- 26:35Business benefits of event
- 28:47Technical benefits of event
- 29:41Drawbacks of event sourcing
- 33:28Strategic design: identify sub- domains
- 33:57Strategic design: define microservices
- 34:17Decide inter-service communication mechanisms
- 36:17Use the familiar building blocks of DDD
- 36:48Designing domain events
- 38:00The anatomy of a microservice
- 38:51Asynchronous Spring MVC controller
- 40:09Handling events published by Accounts
- 41:52Command Query Responsibility Segregation (CQRS)
- 42:50Query-side microservices
- 44:44Benefits and drawbacks of
- 47:23Summary
related talks
01h 25mBuilding microservices with event sourcing and CQRS
17m7 Reasons why your microservices should use Event Sourcing & CQRS
55m7 Reasons why your microservices should use Event Sourcing & CQRS
46mMicroservices Data Patterns: CQRS & Event Sourcing
40m7 Reasons why your microservices should use Event Sourcing & CQRS
47mFrom C to Q, One Event at a Time: Event Sourcing in Pictures
51mMicroservices Data Patterns: CQRS & Event Sourcing
47mEvent-Driven Microservices = Microservices Done Right
