Event sourcing, event-driven architectures and CQRS
summary
Shows a runnable Java EE coffee-shop built as three Dockerized services (order, beans, barista) wired by Apache Kafka as the event store; commands produce immutable events, queries read local projections stored in a hashmap (or DB) so reads scale independently. Demonstrates Kafka 1.0 transactional producers and consumer-group strategy (separate consumer groups for projection updates vs single group for event handlers) to ensure reliable, exactly-once processing. Claims event store is the golden source for history, rewindable for replays, and the demo proves rebuild-on-restart works.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker intro
- 1:50CRUD model shortcomings explained
- 3:56Event sourcing motivation and benefits
- 7:32Event-driven architectures in real world
- 16:03CQRS principle breakdown
- 21:02Scaling and optimization with CQRS
- 26:03When to avoid event sourcing
- 33:11Live demo introduction
- 39:33Coffee shop demo walkthrough
- 45:37Kafka consumer groups explained
- 51:44Handling system restarts and persistence
- 54:03Managing model changes in microservices
- 58:01When to use CQRS and event sourcing
- 59:09Storage and scalability concerns
- 1:00:35Resources and closing remarks
