Mistakes made adopting event sourcing (and how we recovered)
summary
A new editorial system adopts event sourcing but mistakes include storing transient notifications and technical logs in the event store, used event history as an event bus, and keeping the current state inside command handlers so projections drift from the true history. Recovery swaps integration back to REST hypermedia, turns snapshots into a read‑through cache and moves state updates into separate transactions, migrates relational projections to JSON in Postgres, and leans on automated domain tests — kept business logic in hexagon/domain tests — enabling a fast refactor where a single developer’s switch took one hour.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 1:32Defining the problem space
- 4:41Architectural strategy
- 7:34Technology stack selection
- 9:32Identifying initial mistakes
- 13:43Refining team communication
- 17:21Balancing technical diversity
- 20:28Refactoring for correctness
- 24:53The road to recovery
- 29:35The role of testing
- 34:49The screenplay pattern
- 40:00Lessons learned
- 45:13Q&A session
