Looking Beyond the Hype: Is Modular Monolithic Software Architecture Really Dead?

Reality check of Modular Monolithic Software Architecture in Modern software development

Source: Shutterstock

In the 2010s, many Web Scale companies such as Netflix, Amazon, Spotify, Uber had special requirements: App Scaling, Development Scale, Shorter Time to Market. They also found that existing Modular Monolithic Architectures or Service-Oriented Architectures (SOAs) could not complete their requirements. As a result, a new Software Architecture style was born in 2012: Microservices Software Architecture.

Since then, the popularity of MicroServices has skyrocketed with a lot of hubbub and optimism. The conference is filled with microservices talks and workshops. As we’ve seen all too often, hype and myth unite.

Microservice architecture is a great choice for many use cases. But like other Software Architectures, it also has a sweet spot (where it excels) and a corner case (where it fails).

Unfortunately, many people think of Microservices as a Silver Bullet, which solves all Software Development problems. They also discard other Architectural styles such as Modular Monolithic Architecture. Also, like hypnotized Technology, some people think of Microservices as the “Golden Hammer” and try to use it in all types of Software Development without thinking about the context.

Fascinated by the shiny new Microservice, people talk about Modular Monolithic Software Architecture as a terrible Architectural style that is about to die and has no place in modern software development. Also, if you are a Software Developer or Software Architect and speak for Modular Monolithic Software Architecture, then you will be expelled from your company. Your peers will see you as an Old School that resists the modernization of the Software Stack.

On the other hand, if you mention the term “Microservices Architecture” in a Design meeting, your coworkers will see you with great respect and admiration.

Is all criticism of Modular Monolithic Software Architecture justified? Is it dead and has no place in modern software development in the Era of Docker, Kubernetes, Cloud, Big Data, and faster release cycles?

In this article, I’ll take a deeper look at the Modular Monolithic software architecture and its relevance in the current software development landscape.

Modular Monolithic Architecture

Since the early days of Software Development (1950s), System Software was developed as a single system and used as a single process. Such software systems are referred to as Monolithic Software Systems. Here’s an example of a classic Monolithic Web Application:

Monolithic Web Application

In the above design, the entire tool is divided into multiple layers (Presentation, Business, Persistence), and the entire application is used on the Application Server/Web Server.

As Software Systems began to become increasingly complex (since the 1970s), Software Engineers handled that complexity by deciphering the entire system into modules that were “loosely combined, very cohesive”. This system is known as Modular Monolithic Software Architecture. Here is my definition of Modular Monolithic Software Architecture:

A software system that can consist of layers or hexagonal components and each layer or hexagonal component is then decomposed into a “loosely combined module, highly cohesive” but the complete system implemented as a whole is known as the Modular Monolithic Software Architecture.

Here’s an example of Modular Monolithic Architecture in large, complex Web Applications:

Modular Monolithic Web Application by Md Kamaruzzaman

In the above case, each layer is divided into several modules that are ” loosely combined, very cohesive” (e.g. Java libraries), which are connected internally (via method calls or function calls) depending on the language.

Here are the characteristics of Modular Monolithic Architecture:

  • Complete System Software in full use (all or none)
  • Modular borders are internal and can be crossed easily which can lead to Spaghetti Code (as shown above with yellow lines)
  • The application runs as a single process
  • This is one size for all, i.e. one solution for all application sizes
  • No strict data ownership between modules

Excess:

  • Monolith has several moving parts (e.g., one process, one Application Server, one Database). As a result, it is easier to design, deploy, and test (system test, e2e test) Monolithic applications.
  • Due to the smaller number of moving parts, it has a smaller surface area to attack. As a result, it is easier to secure Monolithic applications.
  • Low operational complexity
  • Monolithic applications have one single OLTP database. As a result, transaction management and data sharing are made easier.
  • Because the shared CodeBase (which is often Spaghetti code) and shared data sources, it’s difficult to parse work among multiple teams. So, the scale of development is very bad.
  • The Large Monolithic codebase (often spaghetti code) puts enormous cognitive complexity at the head of the developer. As a result, the speed of development is becoming worse.
  • Detailed scaling (i.e., scaling part of the application) is not possible.
  • Programming Polyglot or polyglot databases is quite challenging.
  • Modernization is complicated by the Monolithic application of “All or None”.

In the 2010s, Web Scale companies found that for very large applications, modular monolithic software architectures were not appropriate and made Microservices Software Architectures. Here’s my definition of Microservices:

The microservices architecture also divides large and complex systems vertically (as per functional or business needs) into smaller sub-systems that are processes (hence independently applicable) and these sub-systems communicate with each other via light network calls without language (e.g. REST , gRPC)

If we’ve considered our large and complex Web Applications before, then here’s the Microservice-based Architecture of that application:

Architecture Microservice by Md Kamaruzzaman

Here are the characteristics of Microservice Architecture:

  • The entire application is divided into separate processes where each process can contain many modules.
  • As opposed to Modular Monoliths or SOA, Microservice applications are divided vertically (according to functionality or domain)
  • Microservice limits are external. As a result, Microservices communicates with each other through network calls.
  • Instead of one database, each Microservice has its database.
  • Additional data synchronization is required due to “database per Microservice”.

Contrary to hipes and myths, Microservices has many fair benefits and drawbacks as follows:

Excess:

  • Better development scaling as teams can work in parallel across autonomous Microservices with little external dependency
  • Microservices are relatively small in size. This puts low cognitive complexity in the head of the developer, and the developer is more productive.
  • Since each Microservice is a separate process, it can be used independently. As a result, Microservice Architecture delivers a faster release cycle.
  • Granular scaling, that is, scaling part of an application, is possible.
  • Ownership of detailed data because each Microservice has its database
  • As long as external contracts are maintained, Microservice can be quickly replaced like Lego Block. So, Microservice application is easier to modernize.
  • Separating the entire system vertically is art and not science that requires extreme expertise. Additionally, splitting one database into multiple databases and then sharing data between those databases is a daunting task. So, designing the whole system is more complicated.
  • Code complexity is often replaced by operational complexity.
  • Because many databases (which are usually distributed), data sharing and transaction management become very challenging.
  • Due to the large number of moving parts (many processes, databases, network calls, containers, VMs), complete applications are much more difficult to secure.
  • Because of external network calls, the overall latency of the entire application is much higher.

In short, the answer is: No . In a recent interview with the Go Time podcast, Cloud and Kubernetes guru Kelsey Hightower has predicted the return of Modular Monolithic Architecture in the coming years. Also, in the previous post, “20 Predictions on Software Development trends in 2020”, I have predicted an increasing tendency to use Modular Monolith. There are also many Articles out there where companies have written how their efforts in moving Microservices Architecture failed, and they went to Monolithic Software Architecture.

When Microservices first came along, many people got carried away and thought that it was “One Architecture to organize everything”. They think Microservices Architecture is a silver bullet that can solve all the organizational limitations and technical complexities of a software system and try to use it anywhere. On the one hand, this reminds me of the SQL/NoSQL debate.

During the 2010s, when NoSQL emerged, many people discussed how SQL was outdated as Technology and had no place in the industry. After all, NoSQL offers horizontal scaling and is used by companies such as Google, Facebook, Amazon. So, they adopted a NoSQL database without thinking that the use case is different from the use case of Google or Facebook. Soon, companies learned painstakingly that they could not replace their transnational SQL databases with non-ACID NoSQL databases. Since the hype has subsided, we now know that the industry needs OLTP (SQL) databases along with OLAP (NoSQL) databases.

Here I list why Modular Monolithic Software Architecture is still relevant in modern software development and won’t die anytime soon:

  • Application Diversity: There are many large companies and Web Scale companies that need Microservice architecture. But there are also many companies where MicroServices Architecture is the wrong choice. For them, Modular Monolithic Architecture is the best choice. The landscape of modern software applications is quite diverse. It has a place for Modular Monolithic and Microservice software architectures.
  • Integrated Solutions : One of the greatest strengths of Modular Monolithic software architecture is providing solutions that have passed the test of time. When it fits the size of the application, Ruby on Rails or Spring Boot provides a set of well-defined and standard patterns for developing applications. On the contrary, Microservice architecture is like a wild west, and always depends on many factors (application size, context). If not carefully designed, MicroServices can quickly become “Distributed Monolith” with all the flaws of Monolith and all the hassles of Microservice.
  • Knowledge: Modular Monolithic Software Architecture has been around since the 1970s, and most developers know how to develop Modular Monolithic Software Architecture. Microservices are relatively new and understaffed. In addition, deciphering applications vertically is art, not science and requires a lot of expertise and practice. Many companies can develop software faster with a proven Modular Monolithic software architecture than the new Microservice software architecture. End users do not care about the underlying Architecture or Technology; everything he cares about his function.

Here I list some use cases where modular monolithic software architecture will be used in 2020 and beyond:

Small and Simple Apps

source: Martin Fowler

As pioneering Microservices specialist Martin Fowler has pointed out, Monolithic Modular software architecture is a better choice for Applications of a certain size and complexity. In terms of developer productivity, Ruby on Rails or Spring Boot applications up to a certain size can beat the complex Microservice architecture. If a company has one development team (6–8 developers), they must use modular monolithic software architecture.

Modern Modular Monoliths

Unfortunately, there has been little innovation in Modular Monoliths in the last decade, as it may be waiting to die. But since Modular Monoliths has survived the Microservices attack, we can expect some innovation here. Microservices has many new concepts, and Monolith can adopt them.

One of these modern Modular Monolith frameworks is Inertia.js. It combines simple and highly productive Server-Side Web Development frameworks like Ruby On Rails, Django with JavaScript-based SPA like React, Vue. The trick is that they’ve combined the best of both worlds with any API.

More such a framework would provide a significant boost to the development of Modular Monolithic software.

Brownfield application

Microservices are excellent for Greenfield applications. But often, companies already have poorly designed Monolithic apps. One way to handle existing Monolithic applications is to disable them and develop new MicroServices. We all know that disabling a running application is highly unlikely. In addition, replacing that app with a new MicroServices (which will experience childhood problems) will be daunting. A better approach can refactor poorly designed Monolithic applications into Modular Monolithic applications and keep them the way they are.

Applications with complex domains

Microservices is about separating complex systems vertically, i.e. cutting according to domain logic. Sometimes, there are applications with crumpled domains, and it is complicated to decipher the domain. If the tangled domain is divided into Microservices, then it leads to Distributed Monolith with all the bad stuff from Monolith and Microservices. In such a scenario, modular monoliths may be more sinister.

Non-Business, purpose-built applications

Not all apps are Enterprise apps. There are many applications (e.g., Telecommunications, Automotive) where latency and faster response are more important. In addition, there are many specialized domains (e.g., Machine Learning, Deep Learning, Data Storage) where CPU throughput or network throughput are the most important criteria. In such domains, the Modular Monolithic Software architecture will have advantages over Microservices.

Internal Tools

Each company has several internal tools. Usually, this tool will not experience unregulated growth. For internal tool development, Modular Monolithic Software Architecture would be a better choice than Microservices Architecture.

43 comments

  1. There are some attention-grabbing time limits on this article but I don抰 know if I see all of them heart to heart. There’s some validity but I will take hold opinion until I look into it further. Good article , thanks and we wish more! Added to FeedBurner as properly

  2. There are some fascinating cut-off dates in this article but I don抰 know if I see all of them center to heart. There’s some validity however I will take hold opinion till I look into it further. Good article , thanks and we want more! Added to FeedBurner as nicely

  3. I抎 need to examine with you here. Which isn’t something I usually do! I get pleasure from reading a post that may make people think. Also, thanks for permitting me to comment!

  4. Whats up! I just want to give an enormous thumbs up for the good information you have right here on this post. I might be coming again to your blog for extra soon.

  5. An attention-grabbing discussion is price comment. I feel that you must write extra on this topic, it won’t be a taboo subject but typically persons are not sufficient to speak on such topics. To the next. Cheers

  6. Can I just say what a aid to find somebody who really knows what theyre talking about on the internet. You definitely know the right way to bring a problem to light and make it important. More folks have to read this and understand this facet of the story. I cant imagine youre not more widespread because you positively have the gift.

  7. I am typically to blogging and i really appreciate your content. The article has actually peaks my interest. I am going to bookmark your site and preserve checking for brand new information.

  8. Youre so cool! I dont suppose Ive learn something like this before. So good to find any individual with some authentic thoughts on this subject. realy thank you for beginning this up. this website is something that is needed on the internet, someone with just a little originality. helpful job for bringing one thing new to the internet!

  9. An attention-grabbing discussion is worth comment. I believe that you must write extra on this subject, it might not be a taboo subject however usually individuals are not enough to talk on such topics. To the next. Cheers

  10. I抦 impressed, I must say. Really not often do I encounter a blog that抯 each educative and entertaining, and let me let you know, you might have hit the nail on the head. Your thought is outstanding; the issue is one thing that not enough individuals are speaking intelligently about. I’m very comfortable that I stumbled throughout this in my search for something referring to this.

  11. There are some fascinating cut-off dates in this article however I don抰 know if I see all of them center to heart. There may be some validity but I’ll take hold opinion until I look into it further. Good article , thanks and we would like extra! Added to FeedBurner as effectively

  12. There are definitely a number of particulars like that to take into consideration. That could be a great point to deliver up. I provide the thoughts above as basic inspiration however clearly there are questions like the one you carry up the place the most important factor can be working in sincere good faith. I don?t know if finest practices have emerged around issues like that, however I’m positive that your job is clearly recognized as a fair game. Both boys and girls feel the affect of only a second抯 pleasure, for the rest of their lives.

  13. Youre so cool! I dont suppose Ive read something like this before. So nice to find somebody with some original ideas on this subject. realy thank you for beginning this up. this web site is something that is wanted on the net, someone with a little bit originality. useful job for bringing something new to the web!

  14. Oh my goodness! an incredible article dude. Thanks Nonetheless I’m experiencing subject with ur rss . Don抰 know why Unable to subscribe to it. Is there anyone getting identical rss drawback? Anybody who knows kindly respond. Thnkx

  15. After examine just a few of the weblog posts on your website now, and I really like your means of blogging. I bookmarked it to my bookmark website record and might be checking back soon. Pls try my website online as nicely and let me know what you think.

  16. Needed to create you the little remark to be able to say thanks yet again for your precious things you’ve contributed above. It is really surprisingly generous with you to present extensively what many people would have advertised for an electronic book to earn some money for their own end, primarily considering the fact that you might well have done it in the event you decided. The principles likewise acted to become good way to fully grasp other individuals have the identical fervor just like my own to know the truth a good deal more pertaining to this condition. Certainly there are a lot more fun occasions in the future for individuals who scan your blog post.

  17. I not to mention my guys have already been going through the excellent items on the blog while suddenly I had a terrible feeling I had not thanked you for those techniques. My boys ended up for that reason passionate to read them and have now without a doubt been making the most of them. Appreciation for turning out to be quite accommodating as well as for deciding on certain wonderful resources most people are really wanting to learn about. Our own sincere apologies for not expressing appreciation to sooner.

  18. I simply wished to appreciate you yet again. I do not know what I could possibly have achieved in the absence of the actual pointers documented by you relating to such a question. It actually was a very depressing problem for me, nevertheless spending time with a new specialized style you processed that forced me to cry with contentment. Extremely happier for the service and then pray you find out what an amazing job you are carrying out training men and women through a blog. I am sure you’ve never encountered any of us.

  19. I am just commenting to let you understand what a awesome experience my friend’s girl experienced checking your web site. She came to understand so many details, most notably what it’s like to possess an ideal teaching character to have men and women with no trouble thoroughly grasp specified complex things. You undoubtedly did more than her expectations. I appreciate you for coming up with those helpful, healthy, explanatory and even fun tips about that topic to Ethel.

  20. I and my pals were actually studying the nice thoughts on your website then before long came up with a horrible feeling I had not expressed respect to the site owner for those secrets. All the young men were as a result happy to study all of them and already have in truth been making the most of those things. Appreciate your indeed being really accommodating and also for settling on some brilliant ideas most people are really eager to understand about. Our honest regret for not expressing appreciation to sooner.

  21. Thank you so much for providing individuals with an extraordinarily spectacular opportunity to check tips from this website. It is always very lovely plus packed with a lot of fun for me and my office friends to visit your site really three times per week to read the latest tips you will have. And of course, I am just actually pleased with your awesome advice you serve. Some 3 facts in this post are certainly the finest we have had.

  22. My spouse and i were now comfortable when Chris managed to deal with his reports from the ideas he got using your site. It’s not at all simplistic just to be freely giving secrets and techniques which some other people may have been trying to sell. We really acknowledge we’ve got you to appreciate for that. All the explanations you made, the easy website menu, the relationships you make it possible to promote – it’s everything excellent, and it is letting our son and the family do think this concept is thrilling, and that’s pretty mandatory. Many thanks for the whole thing!

  23. I and also my guys were reading through the nice tactics found on your website while suddenly I had a terrible feeling I had not thanked the web blog owner for those strategies. These people were so thrilled to read them and have without a doubt been tapping into them. I appreciate you for being very accommodating as well as for having such incredibly good guides most people are really wanting to be informed on. My personal sincere regret for not expressing gratitude to you earlier.

  24. Thanks so much for giving everyone a very memorable chance to read in detail from here. It’s always so awesome and full of a good time for me personally and my office peers to search your website at the very least 3 times in one week to learn the newest stuff you will have. And of course, I’m actually amazed concerning the breathtaking thoughts served by you. Some two areas in this posting are rather the simplest I’ve had.

  25. I truly wanted to write a quick note in order to thank you for some of the lovely tips and tricks you are sharing at this website. My considerable internet look up has at the end of the day been paid with reasonable facts to go over with my visitors. I ‘d believe that we site visitors are very fortunate to be in a fabulous website with so many awesome individuals with beneficial basics. I feel rather happy to have come across the weblog and look forward to some more enjoyable times reading here. Thank you once again for a lot of things.

  26. I have to show thanks to the writer for rescuing me from such a crisis. Right after looking out throughout the world-wide-web and meeting advice that were not productive, I was thinking my entire life was done. Living without the presence of strategies to the difficulties you have sorted out through this website is a critical case, as well as those that would have in a negative way affected my career if I hadn’t come across your web site. Your own understanding and kindness in taking care of the whole thing was precious. I don’t know what I would’ve done if I hadn’t come upon such a thing like this. I can also at this moment relish my future. Thank you so much for your impressive and sensible guide. I won’t hesitate to refer your web site to anybody who wants and needs counselling about this topic.

  27. I have to express appreciation to this writer just for rescuing me from this particular situation. After looking out throughout the online world and getting strategies which are not pleasant, I thought my life was gone. Existing minus the strategies to the issues you’ve sorted out by way of your entire site is a serious case, as well as those that would have in a negative way affected my career if I had not come across your web site. Your actual talents and kindness in touching everything was crucial. I am not sure what I would have done if I hadn’t come across such a subject like this. It’s possible to now look forward to my future. Thanks so much for your expert and results-oriented help. I won’t be reluctant to recommend the website to any individual who wants and needs counselling on this subject matter.

  28. I in addition to my pals ended up reading the excellent solutions located on your website and then instantly developed an awful suspicion I never thanked the blog owner for them. Those boys are actually as a result stimulated to read all of them and have now simply been enjoying these things. I appreciate you for simply being simply kind as well as for settling on some fabulous information millions of individuals are really wanting to know about. Our own sincere regret for not expressing gratitude to earlier.

  29. Thanks a lot for giving everyone an extraordinarily marvellous chance to read articles and blog posts from this blog. It is always very useful plus packed with a great time for me personally and my office co-workers to search the blog particularly three times every week to see the newest issues you will have. And of course, I’m at all times pleased for the stunning advice served by you. Selected 2 tips in this article are essentially the very best I’ve ever had.

  30. I and my friends were actually following the great tactics found on the website and so all of the sudden I had a terrible suspicion I never expressed respect to you for those tips. The young men appeared to be as a result thrilled to learn them and already have actually been tapping into those things. Many thanks for actually being quite accommodating and also for making a decision on certain quality issues millions of individuals are really wanting to understand about. Our honest regret for not expressing gratitude to sooner.

  31. I as well as my guys ended up reviewing the best pointers located on your web site then instantly got an awful feeling I had not expressed respect to the website owner for those strategies. Most of the young boys became as a consequence warmed to read them and have now seriously been loving these things. I appreciate you for genuinely simply considerate and for selecting varieties of essential tips millions of individuals are really wanting to be aware of. My very own sincere regret for not saying thanks to earlier.

  32. I in addition to my buddies have been looking at the nice solutions from your web page while before long I got a terrible suspicion I never thanked the blog owner for those strategies. My men became totally excited to study them and already have unquestionably been loving them. Many thanks for genuinely quite accommodating and also for picking varieties of fantastic ideas most people are really eager to be informed on. Our honest regret for not expressing appreciation to you sooner.

Leave a comment

Your email address will not be published.