This blog is about trying to briefly understand microservices and list some comparisons with the traditional styles of coding ,integration and architecture
Microservices -Why are we interested in this yet another geekspeak term doing the rounds today? Let us break it down.
Microservices are –
-Small
-independent
-lightweight
-purpose driven services
-communicate through well-defined interfaces (like REST APIs)
-provide business value
It is not possible to define Microservices unless we bring the Monolithic style of architecture in our discussion. A monolithic application is constructed as a single unit. This unit comprises of different components like a User Interface (which is client side),a database and an application (which is server side).When the client sends a request, the server side application processes the same by executing business logic ,accessing the database to retrieve data and sending back the html views to the client browser. The shortcomings of this traditional style of handling the request through a single process are exposed when numerous applications are deployed to the cloud. Once the monolith becomes really large and huge, even a minute alteration to a small part needs the entire monolith to be built and deployed again. Scaling, continuous deployment, ease of developer understanding –all become complex and difficult.
Microservices are an answer or rather alternative to this set of problems. It involves building applications as a collection of services each of which serves a single purpose and is easy to deploy and scale.
The following table lists some key differences in the two styles of application development.
MS Vs MS :
Monolithic Style | Micro Services |
Single Unit with all components (UI, Business Logic,DB, Application integration) interwoven | applications are suite of services |
Overall Scaling of the structure required | each service independently scalable |
Overall deployment | independently deployable |
Increases complexity for developers | More developer friendly |
One errant component crashes the whole system | Fault diagnosis and isolation is easier |
Testing is streamlined | Difficult to test |
The Advantages of Microservices:
Small
Easy to comprehend
Easy to deploy and can be independently deployed
Easy To scale development
Better Fault isolation
Not committed to a technology stack for a long time
And the downside:
Difficult to test
Inter communication among services is challenging
Complexity involved in overall integration
Overhead in terms of memory usage and operations
Success stories
Some examples of the companies and products utilizing microservices ,by either evolving from monolithic architecture or using the concept afresh are –
Amazon , Netflix, Ebay, Karma mobility ,PayPal ,Twitter etc
Micro services and the way ahead
Architecture style comparisons from integration perspective
After going through the overview of Micro services and comparison with the monolithic paradigm , the question that arises is :
Is “ Microservices approach” the elixir that cures all our monolith ailments ?
Certainly not !
First of all, Microservices is not a brand new concept, although it arises from the same problem of handling a tightly coupled monolith of a code which is cumbersome to change and maintain. Micro services has been around since a long time though not necessarily denoted by the same term .The concept has been involved in Unix philosophy, the underlying principle of which is to do one single thing and do it really well.
More than a decade ago, the idea of distributed and componentized applications popularized with the inception of SOA which aimed at solving some of the aforementioned problems. However, SOA has been extensively exploited and dissected .It has a bulky enterprise approach and complex orchestration. Hence , there is a need to pick up from the same nuances and proceed.
The question now arises :
Why and when should we go for microservices?
As more and more enterprise teams gear up and march ahead into the cloud , they hit blockades in their attempts to move the sections of monolithic applications to the cloud. This is where microservices can come to the rescue. Morover, in the context of supporting mobile,web,smart TVs and other devices like wearables and many more to come, the microservices archetype can be used. Continuous integration ,deployment and Delivery and micro services can go hand in hand .
With the availability of simpler and lightweight REST protocol and developer favourites like JSON standards ,it is much easier to use these interconnectable services.
Most importantly, with the emergence of the new and smart, fast and reliable, open source container technology, Docker , the adoption of microservices ,bringing dev and ops closer and dismantling of the monoliths seems a very interesting and feasible possibility.
References:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
15 | |
15 | |
14 | |
11 | |
10 | |
9 | |
8 | |
7 | |
7 |