Application Architecture 💻
Ready to develop your first Software Application? Here’s something you should know.. 🦸🏻♂️🦸🏻♂️
An application architecture is a map of how an organization’s software applications are assembled and how those applications interact with each other to meet business or user requirements.
In general, application architecture defines how applications interact with middleware, databases, and other applications. Overall, application architecture helps IT and business planners work together so that the right technical solutions are available to meet the business objectives. When deciding which application architecture to use for a new application, or when evaluating your current architecture, start by determining your strategic goals.
There are many different types of application architectures. Still, the most prominent today, based on the relationships between the services, are monoliths and N-tier architecture (tightly coupled), microservices (decoupled), and event-driven architecture and service-oriented architecture (loosely coupled).
Monolithic Architecture 💠
Monolithic means, composed all in one piece. The Monolithic Application describes a single-tiered software application in which different components combine to form a single program in a single platform. Despite having a modular architecture, the application is packaged and deployed.
Benefits of Monolithic Architecture 🧐
- Simple to develop
- Simple to test. For example, you can implement end-to-end testing by only launching the application and testing the UI with Selenium.
- Simple to Deploy. You have to copy the packaged application to a server!
- Simple to scale horizontally by running multiple copies behind a Load Balancer. In the early stages of the project, monolith worked well, and basically, most of the great and successful applications today were started as monolithic.
Demerits of Monolithic Architecture 😯
- This simple approach has a limitation in size and complexity.
- Application becomes too large and complex to understand and make changes swiftly fully.
- The size of the application can slow down the start-up time.
- You must redeploy the entire application on each update.
- The impact of a change is not usually very well understood, which leads to extensive manual testing.
- Monolithic applications can also be difficult to scale when different modules have conflicting resource requirements.
Microservices Architecture 📡
Robert C. Martin (Popularly known as “Uncle Bob”, author of “Clean Code”) coined the term Single Responsibility Principle, which states, “Gather together those things that change for the same reason, and separate those things that change for different reasons”. Microservices Architecture takes this same approach and extends it to the loosely coupled services which can be developed, deployed, and maintained independently. Each of these services is responsible for discrete tasks and can communicate with other services through simple APIs to solve a larger complex business problem.
Benefits of Microservices Architecture 🧐
- It makes On-Boarding easier.
- Reduces Risk and provides Flexible Data Storage.
- Enables Polyglot and reduces Clutter.
- Increases Fault-Tolerance and Fault-Isolation.
- Allows for greater Scalability and Flexibility.
- Increases speed of deployment and simplifies Security Monitoring.
Demerits of Microservices Architecture 😯
- Microservices has all the associated complexities of the distributed system.
- There is a higher chance of failure during communication between different services.
- Difficult to manage a large number of benefits.
- The developer needs to solve the problem, such as network latency and load balancing.
- Complex testing over a distributed environment.
Shift From Monolithic to Microservices Architecture ⏩
Here are some companies that moved their architecture to Microservices.
Amazon 🛒 Amazon’s case is one of the first where microservices took a significant role in transforming the whole business. The global giant achieved its extraordinary success when monolith architecture was “the way” of developing IT systems.
Although Amazon’s architecture wasn’t exactly one great monolith, all its services and components were tightly coupled with one another. Having hundreds of developers spread across the organization, Amazon couldn’t deploy changes swiftly anymore. All significant code changes were stuck in the deployment pipeline for weeks before customers could use them.
Amazon used microservices to simplify and shorten the pipeline. Breaking down structures into single applications allowed developers to realize where the bottlenecks were, what the nature of these slowdowns was, and allowed developers to rebuild them as service-oriented architecture, each with a small team dedicated to one particular service.
Coca Cola 🍹 Three thousand eight hundred products worldwide and subsidiaries in all countries of the world – faced the challenge of connecting entities on different continents and supporting their growth. Coca-Cola’s Global IT group has decided to leverage microservices and APIs to achieve that goal and gradually replace its legacy software. In this case, the rapid change would be impossible due to multiple solutions implemented globally (ERP, conversions, repositories). The company knew that there are many ways to implement microservices and, in the end, has decided to move towards a new architecture using the Dev-Ops model.
Netflix 🎬
Netflix is one of the earliest adopters of microservices, and one of the most discussed. The story of Netflix turning towards microservices started in 2009 when this approach wasn’t known at all. They set up their microservice architecture on AWS.Today, Netflix application leverages 500+ microservices and API Gateways that handles over 2 billion API edge requests daily. Learn more about microservices at Netflix here.
Conclusion 🙇🏻♂️
Building complex applications is inherently problematic. A Monolithic Architecture better suits simple, lightweight applications. There are opinions which suggest starting from the monolith first and others which recommend NOT to begin with monolith when your goal is Microservices Architecture. But, it is essential to understand Monolithic Architecture, since it is the basis for Microservices Architecture, where each service by itself is implemented according to Monolithic Architecture.
The Microservices Architecture pattern is the better choice for complex, evolving, and large-scale ofc applications.
Hope this helped to make your choice. Until next time ✌🏻