<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Indro on Medium]]></title>
        <description><![CDATA[Stories by Indro on Medium]]></description>
        <link>https://medium.com/@chasing-indro?source=rss-2cd4f5dd609a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_iMe2RA-aXZftKuejtnMDg.jpeg</url>
            <title>Stories by Indro on Medium</title>
            <link>https://medium.com/@chasing-indro?source=rss-2cd4f5dd609a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 14:35:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chasing-indro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with the Monolithic Architectural Style— A Short Guide for Intuitive Visualization]]></title>
            <link>https://medium.com/@chasing-indro/getting-started-with-the-monolithic-architectural-style-a-short-guide-for-intuitive-visualisation-94ed7246ac34?source=rss-2cd4f5dd609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/94ed7246ac34</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[monolithic-architecture]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Indro]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 16:42:50 GMT</pubDate>
            <atom:updated>2025-02-17T08:11:50.637Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Learning about software architecture can be daunting. Therefore, this article hopes to serve as a comprehensive guide to everything you need to know about Monolithic Architecture and how to visualize it effectively.</em></p><h3>The Preface</h3><p>Ever been stumped by code you wrote a week ago or when browsing through another application’s codebase for inspiration, only to be left confused and dazed? Although well-written, <a href="https://developer.mozilla.org/en-US/docs/Glossary/Semantics">semantic code</a> may help alleviate this befuddlement, to connect all the various parts of the codebase and figure out the dependencies, one may desire a project with a more flavorful aspect. That’s where <strong><em>organization</em></strong> comes into play.</p><p>Software Architecture or System Design is a detail-agnostic way of surmising what the blueprint of an application should be. It provides us with not only the basic structure of an application but also guidelines we should follow to ensure that the application remains in a state legible to us and all those who follow after.</p><p>When creating an application, a sane developer would choose to first visualize the product in great detail before deconstructing it into its fundamental building blocks. These would then be critically analyzed to form an architecture for building the application. That is to say, each application is unique in its own <a href="https://www.boardinfinity.com/blog/functional-and-non-functional-requirements-in-software-engineering/">functional and non-functional requirements</a> and therefore begets an architecture designed around these requirements and not the other way around. Hence,</p><blockquote><strong><em>There exists no architecture which is in execution, omnipotent.</em></strong></blockquote><p>Rather than technicalities, this article emphasizes <em>visualizing</em> the various monolithic architectural styles which are the most commonly used for developing the foundational models of an application or projects which are not <a href="https://relevant.software/blog/guide-large-scale-web-application-development/">large-scale</a> in nature.</p><h3>The Monolith</h3><p>Monolithic architecture is a traditional software design pattern where all components of an application are integrated into a single, cohesive unit. Hence the term <em>‘Monolith’</em>.</p><figure><img alt="A giant pile of clothes where some parts are stacked neatly while others are a disorganized mess. Analogically, the giant pile is comparable to a project, and the clothes are the various components of it." src="https://cdn-images-1.medium.com/max/1024/1*xJXXN5Z7dfhnKvNuTPGuDw.png" /><figcaption>A giant pile of clothes where some parts are stacked neatly while others are a disorganized mess. Analogically, the giant pile is comparable to a project, and the clothes are the various components of it.</figcaption></figure><p>Intuitively, imagine a giant pile of clothes all dumped on one another. One may envision it as a disorganized mess of clothes, all entangled with one another, making it impossible to take out a single article of clothing without collapsing the whole pile. Alternatively, one may imagine it as a tower of clothes neatly folded together, perhaps even separated into various layers depending on their color or type. This pile of clothes, however it may be, is in essence the monolithic architecture.</p><p>When starting off with a project, some of the most common factors influencing development are cost and scale. A complex architecture requires a higher upfront investment and a slew of professionals to develop and maintain it. On the other hand, a project of small scale and budget can largely benefit from an architecture that is easy to implement and can save a lot of time and resources. This is where the ‘Monolithic’ architecture thrives.</p><p><a href="https://www.honlsoft.com/blog/2022-02-05-software-architecture-the-monolith/">Monolithic architecture</a> is particularly advantageous for startups and small teams. Its simplicity allows developers to quickly build and deploy applications without the overhead of managing multiple services. This can lead to faster time-to-market, which is crucial for startups looking to establish their presence and gain a competitive edge.</p><p>In addition, the monolithic architectural style generally performs splendidly in the <a href="https://dev.to/karanpratapsingh/system-design-transactions-2f3e#:~:text=A%20transaction%20is%20a%20series,t%20(there%20are%20exceptions).">transactional scope</a> of operations.</p><p>The following article may help you understand the monolithic approach with the help of some real-world applications,</p><p><a href="https://medium.com/@roopa.kushtagi/system-design-trade-offs-monolithic-vs-microservices-architecture-1e14a9fe9e99">System Design Secrets: Monolith vs. Microservices Explained</a></p><h3>The Architectures</h3><p>When it comes to the monolithic architectural style, <em>evolution</em> is the name of the game.</p><p>Initially designed to be quick and straightforward, monolithic architecture allows developers to rapidly build and deploy applications. However, as an application grows and its requirements evolve, the architecture must adapt to remain efficient and effective.</p><p>This iterative refinement process involves identifying and addressing <a href="https://www.geeksforgeeks.org/bottleneck-conditions-identification-in-system-design/">bottlenecks</a>, modularizing components, and optimizing performance, ensuring that the monolith evolves to meet the application’s changing needs.</p><p>Ultimately, the goal is to <strong><em>refine </em></strong>the monolithic architecture to its utmost potential before considering a transition to a more modular architectural style, such as <a href="https://www.geeksforgeeks.org/microservices/">microservices</a>.</p><h3><strong>The Basic Monolith</strong></h3><p>Built on the idea of simplicity and cohesion, this architectural style integrates all the components of an application — including the <a href="https://www.linkedin.com/pulse/layered-monolithic-software-architecture-archit-chauhan-qe2zc/">user interface, application, and data access layers</a> — into a single codebase.</p><figure><img alt="Basic Monolith — A bunch of clothes haphazardly piled on top of each other." src="https://cdn-images-1.medium.com/max/1024/1*Z7Kcm753i12FgE0bdsexsg.jpeg" /><figcaption>Basic Monolith — A bunch of clothes haphazardly piled on top of each other.</figcaption></figure><p>Imagine a pile of clothes; this architectural style is akin to simply piling all the clothes on top of each other without any regard for how they are arranged.</p><p>The basic monolithic architecture is particularly well-suited for small projects due to its simplicity and ease of deployment, making it ideal for small teams looking to quickly build an application with a well-defined scope where components need to work closely together and performance is a critical concern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/0*S9vzjGxI_ZtDfU4W.png" /><figcaption><a href="https://camunda.com/blog/2023/08/monolith-vs-microservice-architecture-comparison/">Monolith vs Microservice Architecture: A Comparison | Camunda</a></figcaption></figure><p>There are a few principles that should be kept in mind while implementing the basic monolith. These are:</p><ul><li><strong>DRY — Don’t Repeat Yourself —</strong> Reduce redundancy by ensuring that each piece of knowledge or logic is represented only once within the system. In other words, this means centralizing common functionalities to avoid duplication of code.</li><li><strong>KISS — Keep it Simple, Stupid —</strong> Advocates for simplicity in design. The codebase is already bloated with all the layers stuffed into one, so have mercy and write code that’s easy to understand at a glance.</li><li><strong>YAGNI</strong> <strong>— You Ain’t Gonna Need It —</strong> Advises against adding features until they are necessary. If you’re pondering adding a functionality, just don’t add it — you probably won’t need it.</li></ul><p>Although the basic monolith is quick and easy to implement, it is important to note that it is primarily used for <a href="https://dzone.com/articles/fast-prototyping-from-monolith-to-microservices">prototyping</a> rather than production environments.</p><p>The following GitHub repository demonstrates a simple Express app built with thebasic monolithic architecture,</p><p><a href="https://github.com/zachgoll/monolithic-architecture-example-app?tab=readme-ov-file">GitHub - zachgoll/monolithic-architecture-example-app: A simplified example of a monolithic architecture</a></p><h3><strong>The N-Layered Monolith</strong></h3><p>N-Layered Monolithic architecture builds upon the foundation of basic monolithic architecture by dividing the application into <a href="https://www.linkedin.com/pulse/layered-monolithic-software-architecture-archit-chauhan-qe2zc/">distinct layers</a>, each responsible for a specific <em>aspect</em> of the application’s functionality. The primary goal is to enhance maintainability, scalability, and separation of concerns.</p><figure><img alt="N-Layered Monolith — Clothes neatly stacked into layers according to color (Red, Green, Blue &amp; Purple)." src="https://cdn-images-1.medium.com/max/1024/1*nAsVB876OTLK3tEMLqMXFw.png" /><figcaption>N-Layered Monolith — Clothes neatly stacked into layers according to color (Red, Green, Blue &amp; Purple).</figcaption></figure><p>Imagine applying this architecture to a pile of clothes. Instead of a jumbled heap, the clothes are now grouped based on, say, the color of the fabric. This method creates succinct boundaries, organizing the clothes into distinct sections. This not only makes it easier to find specific items but also highlights the different color spectra present in the pile.</p><p>In simpler terms, the N-layered architecture takes the code from the basic monolith (which is essentially a single file since all the logic is bundled in one place) and then separates it into the business, presentation, and application layers as applicable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*_z7nLNVYyMYkPC2w.png" /><figcaption><a href="https://suvra1.medium.com/understanding-software-architecture-patterns-a-summary-of-monolithic-layered-microservices-and-1e050d29cbf4">Understanding Software Architecture Patterns: A Summary of Monolithic, Layered, Microservices, and Serverless Architectures | by Debashis Kar Suvra | Medium</a></figcaption></figure><p>Mainly, two principles must be kept in mind when applying the N-layered architecture:</p><p><strong>1. Separation of Concerns (SoC)</strong> — Advocates dividing a program into distinct sections, each addressing a separate concern such as the presentation, business logic, and data access layers.</p><p><strong>2. SOLID Principles</strong> — These are a set of five design principles intended to make software designs more understandable, flexible, and maintainable. These set of principles are alone worthy of a whole chapter, hence this article will be glossing over them without elaborating much.</p><ul><li><strong>Single Responsibility Principle (SRP) —</strong> Each class or module should have only one job or responsibility.</li><li><strong>Open/Closed Principle (OCP) —</strong> Open for extension but Closed for modification. This encourages adding new functionality through inheritance or composition rather than altering existing code.</li><li><strong>Liskov Substitution Principle (LSP) —</strong> Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program.</li><li><strong>Interface Segregation Principle (ISP) — </strong>Clients should not be forced to depend on interfaces they do not use.</li><li><strong>Dependency Inversion Principle (DIP) —</strong> High-level modules should not depend on low-level modules. Both should depend on abstractions. Additionally, abstractions should not depend on details; details should depend on abstractions.</li></ul><p>Even though the N-Layered Architecture improves the maintainability and development of the codebase, the application still remains <a href="https://www.geeksforgeeks.org/software-engineering-coupling-and-cohesion/">highly coupled</a> and inflexible by design.</p><p>The following GitHub repo demonstrates the N-Layered architecture using .NET Core,</p><p><a href="https://github.com/aspnetrun/run-aspnetcore-basics">GitHub - aspnetrun/run-aspnetcore-basics: Implementation of Real-World example in One Solution - One Project for web application development with Asp.Net Core &amp; EF.Core. Only one web application project which used aspnetcore components; razor pages, middlewares, dependency injection, configuration, logging. To create websites with minimum implementation of asp.net core based on HTML5, CSS, and JavaScript. You can use this boilerplate for fast implementation, minimum development, bootstrap your idea, create Minimum Viable Product (MVP), idea validation, startup development implementation for a limited time and limited resources with using latest asp.net core and entity framework core.</a></p><h3><strong>The Clean Architecture</strong></h3><p>The Clean Monolithic architecture is an evolution of the N-Layered Monolithic architecture, emphasizing a more rigorous application of <a href="https://elbshry.medium.com/clean-architecture-the-principles-and-benefits-660a0172563d">design principles</a> to enhance the maintainability, flexibility, and testability of the application.</p><p>This architectural style focuses on creating a clear separation of concerns and ensuring that dependencies are managed in a way that promotes modularity and ease of maintenance.</p><figure><img alt="Clean Monolith —Clothes stacked neatly on top of each other, layered according to their color with lighter clothes placed at the top and heavier clothes placed at the bottom." src="https://cdn-images-1.medium.com/max/1024/1*DI2sa6wxwf0ytF7JzfIY_A.png" /><figcaption>Clean Monolith — Lighter clothes at the top; Heavier clothes at the bottom.</figcaption></figure><p>Imagine a pile of clothes not only segregated by type but also arranged so that the lighter clothes are on top. This allows the top sections to be easily swapped without disturbing the lower sections. While this means the upper sections can be easily modified, modifying the lower sections still requires moving the entire pile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*QiNBcmiFxINhv7HR.jpg" /><figcaption><a href="https://softwareengineering.stackexchange.com/questions/387203/clean-architecture-and-microservices">.net — Clean Architecture and Microservices — Software Engineering Stack Exchange</a></figcaption></figure><p>There is one principle of crucial importance that must be kept in mind when applying the architecture:</p><ul><li><strong>The Dependency Rule —</strong> States that dependencies should always point inwards, towards the higher-level layers of abstraction. This means that lower-level modules should depend on higher-level modules only through interfaces or abstractions, not directly. This rule ensures that the core business logic remains <a href="https://bitloops.com/docs/bitloops-language/learning/software-architecture/clean-architecture">independent of external factors</a>, making the system more modular and easier to maintain.</li></ul><p>A clean monolithic architecture allows developers to modify or replace components without affecting the entire system, and by isolating the core business logic from external dependencies, they can write <a href="https://levelup.gitconnected.com/unit-testing-in-clean-architecture-with-net-ae503cad045d">unit tests</a> that focus on specific components without requiring the entire system to be operational.</p><p>However, the critical disadvantage of clean architecture remains — the strong coupling and increased complexity of implementation due to the generous use of interfaces and abstractions.</p><p>The following Github repo demonstrates a real world e-commerce application built on the clean monolithic architecture,</p><p><a href="https://github.com/aspnetrun/run-aspnetcore-realworld">GitHub - aspnetrun/run-aspnetcore-realworld: E-Commerce real world example of run-aspnetcore ASP.NET Core web application. Implemented e-commerce domain with clean architecture for ASP.NET Core reference application, demonstrating a layered application architecture with DDD best practices. Download 100+ page eBook PDF from here -&gt;</a></p><p>For a more in-depth understanding of clean architecture</p><ul><li><a href="https://medium.com/@DrunknCode/clean-architecture-simplified-and-in-depth-guide-026333c54454">Clean Architecture: Simplified and In-Depth Guide</a></li><li><a href="https://medium.com/@avengers14.blogger/use-case-layer-and-abstraction-in-clean-architecture-android-96534885cc6b">Use Case Layer and Abstraction in Clean Architecture - Android</a></li></ul><h3>The Modular Monolithic Architecture</h3><p>This is the closest we can get to using a microservices architecture without actually implementing it, while still enjoying all the benefits of a monolithic architecture, such as <a href="https://medium.com/design-microservices-architecture-with-patterns/transaction-management-in-monolithic-architecture-49ab1a77e50c#:~:text=In%20a%20monolithic%20architecture%2C%20transaction,easy%20compared%20to%20Microservice%20Architecture.">transactions</a>.</p><p>Before proceeding with a formal understanding of modular monolithic architecture, it is important to grasp one key distinction for proper visualization. The modular monolith is primarily concerned with the <strong><em>vertical slices</em></strong> of the application — that is, the features or modules — and the various layers encapsulated within them.</p><p>Therefore, we can say that this architecture is an advanced approach to application design that divides the application logic into independent and <a href="https://www.milanjovanovic.tech/blog/modular-monolith-data-isolation">isolated modules</a>. Each module is <strong><em>self-contained</em></strong>, with its own business logic and database schema, allowing it to follow its own logical separation, whether it uses a layered architectural style or clean architecture, thus reducing dependencies between modules.</p><h4><strong>The Intuition</strong></h4><p>Now, let us reimagine our pile of clothes. Once a jumbled heap, it now stands tall, separated into collections, each with its own purpose. Let us assume the collections are based on seasonal demand: spring, summer, fall, and winter. The collections are isolated and independent of each other, each with its own niche. According to our approach, the items in each collection can further be arranged according to any of the previously mentioned architectures.</p><figure><img alt="Modular Monolith — Clothes stacked into three modules — Red to Light Blue Module, Blue to Red Module and Dark Blue Module. Each module implements it’s own layering and is independent from the other modules." src="https://cdn-images-1.medium.com/max/1024/1*aGK2u4GNccYOm_s0aJzFZA.png" /><figcaption>Modular Monolith — Clothes stacked into three modules — Red to Light Blue Module, Blue to Red Module and Dark Blue Module. Each module implements it’s own layering and is independent from the other modules.</figcaption></figure><p>This is the magic of <a href="https://www.researchgate.net/publication/387223552_Modulith_Architecture_Adoption_Patterns_Challenges_and_Emerging_Trends">modular monolithic architecture.</a> Each collection is isolated and independent, applying its own architectural style internally for optimal execution. However, since all the clothes are still part of a single pile, any fundamental change affects the <strong><em>entire</em></strong> structure. Despite this, the modular approach ensures that each collection is well-defined and manageable, making the pile more organized and easier to maintain.</p><h4><strong>The Vertical slices</strong></h4><p><a href="https://medium.com/@shahrukhkhan_7802/layered-microservices-and-modular-monolithic-454efda8b2df">In contrast</a> to traditional layered architecture, which organizes code into horizontal logical layers, Modular Monolithic architecture organizes code across vertical slices of <strong><em>business functionality.</em></strong></p><p>These vertical slices are determined based on business demands rather than technical constraints. This means that when adding or changing a feature in an application, changes are scoped to the area of business concern rather than to technical logical layers. This approach ensures that the architecture remains aligned with business needs and can adapt more easily to changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ci4H6LEfAwM54neW.png" /><figcaption><a href="https://medium.com/design-microservices-architecture-with-patterns/microservices-killer-modular-monolithic-architecture-ac83814f6862">Microservices Killer: Modular Monolithic Architecture | by Mehmet Ozkaya | Design Microservices Architecture with Patterns &amp; Principles | Medium</a></figcaption></figure><p>This modular approach allows for better management of the codebase and makes it easier to scale or refactor specific parts of the application. It also aids organizations in achieving a balance between the simplicity of monolithic deployment and the flexibility of modular design.</p><h4><strong>The Incentive</strong></h4><p>There are two prime <a href="https://dev.to/flashblack/developing-modular-monolith-vs-traditional-monolith-in-software-engineering-pros-and-cons-p61">advantages</a> in a technical context that bolster the application of the monolithic architectural style:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d4K8NMhqITGtZYWI.png" /><figcaption><a href="https://www.techtarget.com/searchapparchitecture/tip/Understanding-the-modular-monolith-and-its-ideal-use-cases">A sample code structure for a modular monolith</a></figcaption></figure><p>One advantage is the<strong><em> communication</em></strong> between processes, handled via Inter-Process Communication (IPC) or <a href="https://www.milanjovanovic.tech/blog/modular-monolith-communication-patterns">method calls</a>. This eliminates the need for network calls, making the application faster and more reliable.</p><p>Another advantage is the ease of<strong><em> transactions. </em></strong>Since all components share a single database and server, transactions operate within the same context, making it straightforward to roll back or commit changes.</p><h4><strong>The Considerations</strong></h4><p>Although the modular monolithic architectural style appears to be the ultimate form of monolithic architecture, it is best suited for projects that are either evolving into this stage of growth or are inherently large-scale, since they require an easy <a href="https://martinfowler.com/articles/break-monolith-into-microservices.html">transition</a> to a microservices architecture.</p><p>The following article by Martin Fowler discusses the monolith-first approach and can help develop an intuition for selecting the appropriate architecture,</p><p><a href="https://martinfowler.com/bliki/MonolithFirst.html">bliki: Monolith First</a></p><p>Additionally, you can browse through the GitHub topic to find inspiration from the various repos therein,</p><p><a href="https://github.com/topics/modular-monolith-architecture">Build software better, together</a></p><p>Or the following articles for further reading,</p><ul><li><a href="https://medium.com/mr-plan-publication/modular-monoliths-software-architecture-part-4-3cc7fa376e58">Modular Monoliths — Software Architecture Part 4</a></li><li><a href="https://medium.com/design-microservices-architecture-with-patterns/microservices-killer-modular-monolithic-architecture-ac83814f6862">Microservices Killer: Modular Monolithic Architecture</a></li></ul><h3>Headless Monolithic Architecture</h3><p>One major disadvantage of the modular monolithic architecture, as discussed, is the server-side rendering of UI pages. Since the application is divided into vertical slices, each slice must generate its own UI and handle subsequent UI operations.</p><p>While vertical slicing offers splendid separation of concerns, it is still limited by its monolithic nature, making the implementation of multiple presentation layers a nightmare. Moreover, even a simple change in a UI component would require redeploying the entire application, making agile development extremely cumbersome.</p><p>To overcome this challenge, we implement a <strong><em>separate UI</em></strong> as a single-page application (SPA) using frameworks such as React.js or Angular.</p><p>This can be considered a nascent step toward decoupling our application, noticeably increasing the flexibility and agility of development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*dfEe1wSxMiK5FtvH" /><figcaption><a href="https://aasaan.app/blog/monolithic-architecture-vs-headless-architectures/">Monolithic Commerce vs Headless Commerce: What You Need to Know</a></figcaption></figure><p>Therefore, we can say that headless architecture in monolithic systems refers to decoupling the user interface (UI) from the backend logic. In this pattern, the backend operates as a <strong><em>headless server</em></strong>, providing data and business logic through APIs, while the UI is developed and maintained separately — often as a single-page application (SPA) or a mobile app.</p><h4><strong>The Keyword here is “API”</strong></h4><p>One of the key features of this architecture is the API-driven communication between the <a href="https://medium.com/design-microservices-architecture-with-patterns/headless-architecture-with-separated-ui-for-backend-and-frontend-f9789920e112">frontend and backend</a>. The backend exposes APIs that the frontend consumes, ensuring that the UI can be updated or replaced without affecting the backend logic.</p><p>This approach also improves scalability, as the backend can focus on handling business logic and data processing while the frontend is optimized for user experience. Different frontends — such as web and mobile applications — can interact with the same backend, providing a consistent user experience across platforms.</p><p>Although decoupling offers significant benefits in terms of flexibility, scalability, and maintainability, managing two separate codebases can introduce complexity. Proper versioning, documentation, efficiency, and security of both the APIs and their calls are crucial for the application to work effectively, protect data, and prevent unauthorized access.</p><p>The following GitHub repository provides a comprehensive overview of applying a headless modular monolithic architecture using domain-driven design (DDD),</p><p><a href="https://github.com/kgrzybek/modular-monolith-with-ddd">GitHub - kgrzybek/modular-monolith-with-ddd: Full Modular Monolith application with Domain-Driven Design approach.</a></p><h3><strong>The Pitfalls</strong></h3><p>Several considerations discussed throughout this article — and applicable to most monolithic applications — include the challenge of maintaining a single codebase, which makes fundamental technology changes <strong><em>nigh impossible</em></strong>. Moreover, even a minor change in the application codebase requires redeploying the entire application.</p><p>Another limitation is system reliability; a single bug in any module can potentially bring down the entire application.</p><p>Furthermore, the tightly integrated nature of a monolithic structure tends to inhibit growth. Managing dependencies and ensuring proper boundaries between modules requires careful design and discipline; without these measures, modules can become too tightly coupled, negating the benefits of modularity.</p><p>Despite its challenges, the monolithic architectural style remains one of the most beginner-friendly development approaches. It is highly performant in terms of pathfinding and rapid prototyping, focusing more on implementing core features than scalability. Scalability, can be dandily achieved once the proof of concept works in your favor and the codebase is refactored for <a href="https://ieeexplore.ieee.org/document/10160171">decomposition</a>. The<em> </em><strong><em>evolutionary nature </em></strong>of the monolithic architecture encourages so.</p><p>However, a major pitfall when developing an application beyond the scale a monolith can handle is falling into the distributed monolithic architecture antipattern.</p><h3>The Distributed Monolithic Anti-pattern</h3><p>Distributed monolithic architecture is a term used to describe a situation in which a monolithic application is deployed across multiple servers or instances. This approach is often taken in an attempt to scale the application; however, it can lead to several challenges and is generally considered an <strong><em>antipattern.</em></strong></p><p>Since the primary concern when using a monolithic architecture is scaling the application, it might seem natural to assume that the best solution is to scale horizontally by duplicating instances of the monolith and using a load balancer to distribute traffic appropriately. However, while this temporarily solves one problem, it <a href="https://www.linkedin.com/pulse/pitfalls-distributed-monoliths-microservice-how-missteps-kyle-burns-vydpe">jeopardizes</a> the evolution of the entire architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*NniY15FUuLf8lhPp.png" /><figcaption><a href="https://dev.to/morintd/understand-the-difference-between-monolith-microservices-and-distributed-monolith-39kb">Understand the Difference Between Monolith, MicroServices, and Distributed Monolith — DEV Community</a></figcaption></figure><p>While distributing the application can provide some level of scalability, it doesn’t address the fundamental limitations of a monolithic architecture. Scaling specific components independently remains challenging.</p><p>Deployment difficulties are another significant issue. Updating the application can be cumbersome, as changes to the codebase require redeploying the entire application across all instances. This process is both time-consuming and error-prone. Moreover, the shared database and tightly coupled components can create performance <strong><em>bottlenecks,</em></strong> limiting the overall scalability and efficiency of the application.</p><p>This is where microservices architecture excels. By breaking down the monolithic application into smaller, independent services that can be developed, deployed, and scaled on their own, it addresses scalability and maintainability issues seamlessly.</p><p>Consider the following article for a deeper dive,</p><p><a href="https://mehmetozkaya.medium.com/microservices-antipattern-the-distributed-monolith-%EF%B8%8F-46d12281b3c2">Microservices Antipattern: The Distributed Monolith 🛠️</a></p><h3>The Conclusion</h3><p>The essence of designing an architecture is to continuously optimize the solution based on demand. There is no one-size-fits-all architecture. An application, much like an organism, must evolve fluidly with the aid of everyone working to keep it alive. That is the nature of development and software architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94ed7246ac34" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>