Transactional Event Sourcing Using Slick (Audit Log for Free!)
summary
Shows how to implement event sourcing on a relational DB by using Slick DBIO transactional actions and a tiny slick-eventsourcing skeleton so events are written and projections updated in the same SQL transaction. Builds a demo HTTP app that lets users place a Tesla Model 3 order: commands validate against the read model, return events, an event processor runs model updates and one-time listeners (email printed to log). It compiles and runs, but notes practical limits: transaction cost, concurrency ordering, DBIO leakage and future-wrapping issues.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:23Conference Application
- 0:55What is Event Sourcing
- 1:33Why use Event Sourcing
- 3:19History with auditing
- 4:57Goals
- 5:45Other approaches
- 6:15Events
- 7:57Read Model
- 9:00DPI Election
- 9:51Descriptions
- 10:19Overview
- 12:53Coding
- 25:14Registry
- 33:16Demo
- 34:49Problems
- 38:51Questions
related talks
10mEvent sourcing
52mEvent Sourcing for the Cloud Developer
48mEvent Sourcing - what could possibly go wrong?
51mThings I Wish I knew Before I Started with Event Sourcing
52mEvent Sourcing – the what, why & how
46mMicroservices Data Patterns: CQRS & Event Sourcing
39mEvent Sourcing with Elixir
51mMicroservices Data Patterns: CQRS & Event Sourcing
