Transactional Event Sourcing using Slick audit log for free
summary
A small micro-framework demonstrates transactional event sourcing on a relational DB using Slick DBIO actions to compose writes and run them in a single transaction. Events are stored in an events table with JSON payload and metadata (type, aggregate id, timestamp, tx id, user id); model updates and event listeners run from the same transaction to update a SQL read model and trigger side effects. Example is a one-per-person Tesla order demo that persists events, updates the read table and executes listeners; the code runs but the live demo has minor hiccups.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:34Why event sourcing
- 4:19About Software Mode
- 5:08Goal
- 6:24Other approaches
- 7:30What are events
- 8:02How to represent events
- 9:24Read model
- 10:58Special data type
- 12:38Live coding
- 13:38Example application
- 14:38Events table
- 16:08Point of entry
- 26:18Registry
- 34:48Problems
- 37:48Wrap up
related talks
10mEvent sourcing
51mThings I Wish I knew Before I Started with Event Sourcing
48mEvent Sourcing - what could possibly go wrong?
52mEvent Sourcing for the Cloud Developer
52mEvent Sourcing – the what, why & how
01h 01mEvent Sourcing for practice
46mMicroservices Data Patterns: CQRS & Event Sourcing
01h 00mPractical Event Sourcing with Marten and .NET
