Model Mitosis: Stop Confusing Microservices and the Monolith
summary
Provides a concrete method called Model Mitosis for deciding when and how to split a monolith into services: identify behavioral boundaries and extract two domain models (search vs booking), create a transitional shared kernel for truly identical concepts, and translate between models via an anti-corruption layer. Demo code shows duplicated and specialized value objects (Price, ComfortClass, Schedule), adding a tax-calculation to booking, and fixing a production bug by moving schedule invariants into booking, resulting in a modular monolith that can later be safely separated at runtime.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:09Adding train booking
- 4:36Model coupling in search
- 7:44Big Mod tensions
- 12:10Critique of microservices
- 13:16Behavior-driven modularization
- 15:45Booking and search domains
- 17:10Model duplication vs specialization
- 20:47Shared Kernel limits
- 27:02Anti-corruption layer
- 30:14Tax calculation in booking
- 35:11Past booking bug
- 37:43Booking invariants
- 39:06Scalability with microservices
- 41:54Money domain library
- 42:58Model Mitosis explained
- 47:10Conclusion
related talks
46mModel Mitosis: Stop making the wrong choice between microservices and monolith
50mModel Mitosis: No More Confusing Microservices and the Monolith
51mModel Mitosis: No More Confusing Microservices with Monoliths
50mModel Mitosis: a dynamic pattern to deal with model tensions
49mMitosis Pattern
42mQ&A - Monolith to Microservices
49mFrom Macro To Micro
43mMonolith Carving
