Senior Track Roadmap

Architecture: event-sourcing

This course covers event sourcing in Rails applications, where every change is stored as an immutable event and the current state is derived by replaying those events. It compares this model with CRUD and explains when each one fits. Lessons cover naming and versioning events, building an event store with streams in PostgreSQL, projections and read models, CQRS, and sagas with compensating actions. The last lesson shows the rails_event_store gem, a hybrid architecture, a phased migration from CRUD and testing at three levels.

What you'll learn

  • ✓How event sourcing differs from CRUD and when each one fits
  • ✓Naming, designing and versioning immutable events with metadata
  • ✓Building an append-only event store with streams in PostgreSQL
  • ✓Projections, read models and CQRS in Rails
  • ✓Sagas, process managers and compensating actions
  • ✓A hybrid Rails architecture with rails_event_store and a phased migration
Free preview · Lesson 1 8 min read

What is event sourcing?

Your bank account shows $2,847.63. You expected $3,347.63. You call the bank and ask where the $500 went. The bank says: "We don't know. We only store your current balance."

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...