1 day
Online / Zoom
English
Certificate
15 people max
Victor Rentea
€3500
4375
The Modular Monolith training teaches how to deploy decoupled modules as a single unit with a shared database, enabling independent teams to work efficiently while addressing key patterns and challenges in module encapsulation, data decoupling, and integration strategies.
Introduction
The Modular Monolith Architecture involves decoupled modules deployed as a single unit, connected to a single database, allowing independent teams to work side by side. This architecture is ideal for many projects today and serves as a necessary transition phase for migrating legacy codebases to microservices. Drawing from the experience of numerous successful real-world projects, this training will provide you with the tools and techniques needed to effectively adopt this architectural style, while also covering its core patterns and potential pitfalls, including module encapsulation, integration strategies, data decoupling, transaction boundaries, event-based integration, and more.
Key questions addressed in this training include strategies for migrating from a legacy monolith, whether a "Module" should be considered a build unit, how to determine the appropriate module size and scope, managing the release cycle in a Modulith, and deciding between shared or separate transactions
Day 1
Introduction
Definition of a "Module"
Technical vs Functional Code Partitioning
Code Decoupling
Module internal and external API
How to enforce Module Boundaries
Exercise: Call another module via its published internal API
Module Integration Patterns
Dependency Inversion & Plugin Pattern
Event*based Integration
Module Contract Segregation
Aggregator Module
The "shared" module: best practices and pitfalls
Micro-frontends for full-stack module teams
Exercise: Refactor a module cycle to several approaches above
Data Decoupling
Stage #1: Single Writer per Table
Database Refactoring: How to split a DB table in two
Stage #2: Private Schemas
Exercise: Join a foreign view in a Search
Stage #3: Separate Consistency
Exercise: Decouple Transactions with Async Calls or Events
Building and Testing
From Packages to Build Modules (Maven/Gradle)
Optimizing Release Cycle
Exercise: Write a module-scoped test
From Module to Microservice
Weaknesses of Modular Monolith
Pros & Cons of Microservices
Steps to extract a Module as a Microservice
Architectural Quantum: Options between Monolith and Microservices
Victor Rentea
Victor is a Java Champion, Java Enterprise Architect, and Independent Trainer, delivering intense masterclasses for companies worldwide since 2014. He is passionate about software architecture, clean code, refactoring, and unit testing. He is a regular speaker at top international conferences. He's also the founder of the Bucharest Software Craftsmanship Community with 4000 members.