FROM ACTIVERECORD TO EVENTS
summary
Argues that ActiveRecord loses the history of changes and replaces it with CQRS and event sourcing where writes go to a command handler and an append‑only MongoDB event store while a denormalized SQLite read DB serves views. Implements a Rails prototype (no ActiveRecord) using Redis/RabbitMQ bus and whisper for in‑process pub/sub, a basket aggregate, weekly snapshots to avoid long replays, and a year of production use with millions of events; system is eventually consistent but works and simplified testing and scaling.
AI-written summary · about
chapters (9)
- 0:00Domain model challenges
- 3:24Beyond CRUD applications
- 9:13CQRS architectural pattern
- 11:19Event sourcing explained
- 15:25Implementation and benefits
- 20:28Addressing architectural costs
- 24:07Ruby implementation tour
- 32:21Conclusions and takeaways
- 34:09Q&A session
related talks
56mRedis Application Patterns in Rails
47m8 years of EventSourcing/CQRS @ bettermarks: The good, the bad and the ugly
46mMicroservices Data Patterns: CQRS & Event Sourcing
51mImmutable data stores and CORS for safety, flexibility and profit
26mRuby APIs for NoSQL
39mEvent Sourcing with Elixir
51mThings I Wish I knew Before I Started with Event Sourcing
01h 52mBuild High Performance Active Record Apps
