Part 0
Introduction
Monolith, microservices, modular monolith and distributed monolith are four words that mix up two separate questions.
When people call a system a monolith or microservices, they usually mean how it is deployed. The reasons to change an architecture are usually about something else: how many places a small change has to touch. So there are two questions. Are the boundaries in the right place, and how many deployment units are there? Each of the four words is one combination of the answers.
Try it
Click a quadrant, or show a path.
A common route to microservices only changes the deployment. The old boundaries stay, so a change still touches several parts, and those parts now talk to each other over the network. That is a distributed monolith. The alternative is to fix the boundaries first, inside one application, and to move a module into its own process only when there is a reason for it. On that path, the organization is usually harder to change than the code. Part 5 shows how to go step by step.
Why the logical view comes first
Wrong boundaries do not hurt on the first day. They hurt later, when the system has grown and every change has to cross more parts than it should. Martin Fowler calls the idea that design pays back over time the design stamina hypothesis, and says himself that it cannot be proven.1
Try it
Splitting a ball of mud into services keeps every crossing and makes each one more expensive. It also makes the boundaries harder to move, because moving a rule then means moving data between databases. That is why this course starts with the logical view.
One question at a time
Philippe Kruchten described four views of an architecture in 1995.2 We use them as a coat rack for these questions.
The design starts with the logical view. The process and development views follow from it, and the physical view comes last.
There is no arrow from logical to physical, which is the point Udi Dahan makes:3
The misunderstanding is that logical design is the same as physical design.
The next parts go through the views in that order.
References
- Martin Fowler, Design Stamina Hypothesis, 2007.
- Philippe Kruchten, Architectural Blueprints: The “4+1” View Model of Software Architecture, IEEE Software, 1995. Figure 3 follows his Figure 1.
- Udi Dahan, Logical and Physical Architecture, 2010. The sentence is from his reply in the comments.