Modularizing Rails Monoliths One Bite at a Time
summary
Claim: a phased modular-monolith refactor using the packwerk gem and lightweight eventing actually reduces coupling and avoids microservice pain. The team moves code into packs with package.yml, runs packwerk check/update/validate to manage violations (initially ~450,000) and clears circular deps, swaps ActiveRecord return types for plain Ruby data objects, and uses rails-event-store for pubsub. A 170-contributor app regains fast tests and clearer ownership, and the approach demonstrably works in production.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:30The challenge of scale
- 4:45Introducing packwerk
- 9:23Phase 1: Planning and moving
- 15:32Phase 2: Dependencies
- 19:54Phase 3: Public interfaces
- 28:18Maintenance and conclusion
related talks
34m"Taming your Rails monolith"
17mDesigning software that maximizes developer productivity
40mMonoliths Between Microservices
33mRefactoring Towards Component-based Rails Architectures
21mTaming Monoliths Without Microservices
39mTaming Monoliths Without Microservices
27mScaling a Rails Monolith w/Event Driven Microservices
26mMonolith-ifying perfectly good microservices
