Eventsourcing and CQRS in Elixir
summary
Builds a small event‑sourced bank using the commanded library in Elixir: defines commands (deposit, withdraw, send), domain events (account opened, money deposited/withdrawn, journal entry), and an aggregate with execute/apply callbacks that emit events and update balance. Uses projectors with Ecto.Multi to populate read models and a process manager that turns money‑sent events into receive commands, handles missing destination accounts by emitting failure events and compensating journal entries, and shows upcasters for event versioning plus GDPR guidance to avoid storing personal data in events.
AI-written summary · about
chapters (12)
- 0:00Start
- 3:41Requirements
- 5:21Common Types
- 5:58Commands
- 6:29Events
- 7:58Router
- 9:28Accounts Aggregate
- 11:33Accounts Context
- 13:16Account Entry Schema
- 13:47Account Entry Projector
- 17:56Send To Account
- 19:59Receiving Money
related talks
58mModelling complex business domains with events
48mBitcoin & Elixir: Living the Cutting Edge
03h 19mWorkshop - All Aboard The Elixir Express!
37mElixir - functional, concurrent, distributed programming
53mElixir: a potion to mix complexity and concurrency in real‑time
44mElixir & Phoenix - Fast, Concurrent and Explicit
42mIntroduction to Elixir for Rubyists
53mWhat To Expect When You Are Elixiring
