Winemaking with Mutable Event Sourcing in Django with Chris Muthig
summary
A mutable event‑sourced system is built and running in production for wineries: events and aggregates live as Django models as event store backed by Postgres, events use ULIDs for ordering, and Pydantic serializes payloads. The code implements an aggregate repository decorator, optimistic locking, async composition tasks, and supports editing, deleting, and backdating actions while preserving an auditable event history. It validates contextual constraints during downstream replay, handles 200–400 aggregates snappily, and enforces label rules like the 85% regional composition requirement using ULID monotonic IDs.
AI-written summary · about
chapters (11)
- 0:00Mutable event sourcing in Django
- 6:40Standard event sourcing shortcomings
- 11:59Delayed recording and corrections
- 16:56Event ordering in winemaking
- 23:15Mutable event sourcing concepts
- 30:15Editing event streams
- 33:04Receiving volume code walkthrough
- 37:19Backdating actions
- 40:07Editing and reapplying events
- 42:35Calculating blends
- 43:40Q&A
related talks
51mThings I Wish I knew Before I Started with Event Sourcing
47mTransactional Event Sourcing Using Slick (Audit Log for Free!)
40mTransactional Event Sourcing using Slick audit log for free
39mEvent Sourcing with Elixir
41mFROM ACTIVERECORD TO EVENTS
01h 00mPractical Event Sourcing with Marten and .NET
10mEvent sourcing
33mHow I learned Django while working at Eventbrite
