Practical Event Sourcing with Marten and .NET
summary
Demoed a support-ticket domain implemented with Marten on Postgres using JSONB, showing real code that builds events, applies them to in-memory aggregates, and persists them as append-only streams. Shows Marten + Postgres JSONB for storage, optimistic concurrency with version checks and transactional projections, and both inline projections and async “daemon” projections that update read models or push to SignalR/Kafka. Claims strong consistency is achievable; examples run and return streamed JSON for fast read paths.
AI-written summary · about
chapters (11)
- 0:00Event sourcing introduction
- 3:37What events and value
- 9:35Marten and event stores
- 18:06Defining events and logic
- 26:28Building state from events
- 29:22Storing events in Marten
- 36:12Simple .NET app with Marten
- 40:53Understanding projections
- 47:20Read models and projections
- 56:36Custom projections use cases
- 57:20Summary
related talks
01h 00mMarten: Postgresql backed Document Db and Event Store for .NET Development
36mTwisting PostgreSQL into a Document Db and Event Store
47mMarten as a Document Store for .NET Applications
57mEventuous Event Sourcing with .NET
39mEvent Sourcing with Elixir
51mThings I Wish I knew Before I Started with Event Sourcing
46mPractical CQRS and Event Sourcing on Azure
47mTransactional Event Sourcing Using Slick (Audit Log for Free!)
