Applying microservices patterns to a modular monolith
summary
Claims that microservices patterns can enforce data consistency inside a modular monolith by using Saga choreography, a transactional outbox and one-database-per-domain. Implements a Rails multi-database demo with packwerk modular structure, Kafka plus Kafka Connect and the ruby kafka gem, feature flags and local transactions. Builds a user registration + meetings example, shows a happy path and a deliberate failure that emits a member_created_failed event and rolls back to a waiting‑for‑confirmation state, proving the approach works in the demo.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:47Monoliths to microservices journey
- 3:12Monolith growing pains
- 4:57Bad microservices challenges
- 6:26Modular monoliths approach
- 8:10Microservices patterns in monoliths
- 8:51Example domains
- 10:19Distributed transactions
- 12:05Data consistency patterns
- 13:27Microservices patterns explained
- 16:22Indirect domain communication
- 17:06Registration flow and Saga
- 20:38Tech stack details
- 24:54Live demo success
- 25:16Live demo failure and rollback
- 28:50Error handling in monoliths
- 29:54Code structure and events
- 33:09Key takeaways and repo
- 34:11Q&A
related talks
27mBuilding Microservices Architecture The Right Way based on Saga Pattern
11mSpinning up micro-services using Ruby/Kafka
24mPatterns of Evolution from Monolith to Microservices
11mSpinning up micro-services using Ruby/Kafka
33mAdventures with Micro Services in Rails
47mThree Microservice Patterns to Tear Down Your Monoliths
50mEmbracing Microservices
31mMonolith to Microservices: A Guide to Seamless Transitions
