Event Sourcing - what could possibly go wrong?
summary
Experience from three commercial products shows concrete tradeoffs: starts with a transactional event store, moves to append-only events plus projectors, then adds an event bus and sequence numbers to guarantee ordering — the implemented sequence-gap logic is complex but works in production. Uses Cassandra for write-scalability and evaluates Avro vs protobuf; binary serialization yields 60–70% disk savings. Discusses snapshotting, actor-based in-memory speed, duplicate handling via idempotent updates and the single-writer principle for consistent command handling.
AI-written summary · about
chapters (25)
- 0:00Introduction to event sourcing
- 1:28History and benefits
- 3:37Scaling and debugging
- 5:18CQRS pattern
- 6:10Level 1: Transactional
- 7:58Level 2: Append-only
- 9:33Level 3: Event bus
- 12:04Scaling architecture
- 14:09Implementation alternatives
- 15:43Custom code vs frameworks
- 17:01Separation of concerns
- 19:14Testing the domain
- 20:37Library vs framework
- 22:11Storage selection
- 24:44Serialization formats
- 26:43Schema evolution
- 30:03Event payload design
- 31:42Snapshots and memory
- 33:42Mutable vs immutable
- 34:34Handling duplicates
- 37:20Broken read models
- 38:36Saga pattern
- 42:57GDPR and data retention
- 43:59Split brain syndrome
- 46:33Summary and Q&A
