EVENT SOURCING IN AKKA PERSISTENCE
summary
Practical notes for running Event Sourcing with Akka Persistence: implementation comes from three commercial products and uses sharded Akka clusters, an optional event bus (Kafka) and Cassandra for partitioned storage rather than a single RDBMS. Binary serialization (Avro/Protobuf) yields 60–70% disk savings and faster IO; Avro leaks into the domain, Protobuf keeps separation. Mutable state lifts throughput from 17 -> 200+ ops/s in one case. Exactly‑once delivery is impossible so use idempotent projections, sequence numbers and transactional read‑model updates; plan for split‑brain, snapshots and full rebuilds.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:29What is Event Sourcing?
- 1:33Why Event Sourcing?
- 3:24ES from domain perspective
- 3:56ES from application perspective
- 6:27ES packaging
- 7:30library vs. framework
- 8:47ES and CQRS in Akka Persistence
- 12:57Event storage for Akka Persistence
- 13:42akka-persistence-jdbc trap
- 14:16Cassandra perfect for ES?
- 14:53Event serialization
- 16:45Multi-language support
- 17:00Schema evolution - full compatibility
- 18:46Memory consumption
- 19:22Immutable vs. mutable state?
- 20:55Handling duplicates
- 23:03Broken read model
- 24:18Multi aggregate transactional update
- 25:08Pessimistic compensation action
- 25:59Cluster = split brain
- 26:43Cluster best practises • remember about the split brain
- 27:41Summary
related talks
53mDistributed Eventsourcing with Akka
43mFunctional and Reactive Event Sourced Applications
17mAkka Persistence
27mBUILDING A REAL-TIME AUCTION ENGINE USING EVENT SOURCING
47mData in Motion: Streaming Static Data Efficiently in Akka Persistence
50mHow to model event-sourced systems efficiently
56mAn Abridged Guide to Event Sourcing
52mHidden gems and traps that you probably didn't think of using Event Sourcing
