DEV Community

vikrampawar
vikrampawar

Posted on

Monolith/Microservices to Family/Company analogy

Today I was reading Chris Richardson's book Microservices Architecture and it struck me that the Monolith to Microservices relation is analogous to that of a Family and Company.

Firstly, from a very high level view, both Monolith diagrams and Microservices diagrams have a bunch of boxes with various connections between them. What is the fundamental difference between them? The main difference is how the boxes are related. The boxes in the Microservices talk to each other only via Interprocess connection. Every other difference between the two architectures stems from this basic difference. There is no such restriction in the Monolith.

If you consider a family business run by a close-knit family. They generally tend work very efficiently as a group and accomplish a lot more than a group of strangers. There are many reasons for this, but the primary reason is that they have a very strong informal communication amongst themselves.

This works really well up to a point. If the business grows beyond the capacity of the family, they need to get outsiders to help them, Then things change. Their existing communication patterns won't work. They'll have to develop some formal ways of interacting with the outsiders. Once these formal ways are developed, then they can bring in a lot many outsiders and accomplish a lot more. People can be easily replaced as well. They can become a much bigger company.

Similarly, the communication between the boxes in a monolith are easy and don't require too much formality. However when the communication is constrained between boxes as in Microservices where it is forced to happen via Interprocess communication, it needs to become a lot more formal. The communication has to be via formal contracts. So the boxes become independent. They can be replaced with other boxes. More boxes can be brought in.

So, although communication between any two entities is constrained and formal and therefore poorer, it paves the way for the system to grow larger.

Top comments (0)