From Monoliths to Microservices ~ an architectural approach for legacy modernization
Internet and IT industries have significantly evolved in recent years and resultantly gleaned a variety of approaches to take upon before venturing into our next software architecture design expedition.
In the software industry, the term “legacy” indicates the use of technologies in software construction, that are either no longer supported or have been superseded or developed with little to no possibility of replacing the code in the future. This scenario also implies that the application is outdated or needs to be reengineered.
The `lith` in Monolith comes from the Greek work `lithos`, which means a huge stone having no distinct parts. Monolithic architecture describes a single tiered, self-contained software application that combines user interface and data access model and is independent from other applications due to inflexible design, which can result in unsustainable applications and software crisis.
Microservices bring forward a new and more agile scenario where developers and functional teams work hand in hand to deliver small, loosely coupled software components quickly and safely. Instead of a single monolithic architecture, functionality is carried out by a smaller, discrete set of services that collectively provide the functionality of a larger software application.
Service Oriented Architecture (SOA) encourages break down of functionalities into smaller services, keeping complexity of each service minimum and makes them communicate over HTTP APIs. Services are independently deployable and execute multiple tasks that are limited to single functionality.
Microservices based architectures mimic SOA, with the advent of very small services, which perform one use case with extraordinary effectiveness. The strategy is to shrink the services and make them as small and independent as possible. One traditional contrast between SOAs and microservices is that microservices encourage minimal size of a service and confine it to serve one particular task only; else it needs to be further split down into multiple services.
(Courtesy: Head First Design Patterns)
Monolithic applications can be successful, but the change cycles are closely tied together ~ a change made to a particular part of application will require the entire application to be rebuilt and redeployed. Furthermore, from scalability perspective, a monolithic application will require scaling the entire application rather than scaling specific services that serve more web traffic. On the other hand, microservices hold an edge to counter these challenges and make developers’ lives simpler!
Disclaimer: The views expressed here are solely those of the author in his private capacity and do not in any way represent the views of Systems Limited, or any other entity related to Systems Limited.