Microservices was termed by Dr Peter Rodgers in 2005 and was initially known as micro web services. The main principle behind microservices is to break up single large ‘monolithic’ system into multiple independent components/processes.
2. Understanding Microservices
Microservices architecture allows decoupled components to be built and deployed independently to integrate into a single larger system. Saying that, it means that these individual components are loosely coupled with each other, each having a tight cohesion.
These components interact with each other through a standard XML/JSON interface (lightweight language agnostic communication mechanisms), irrespective of the technologies used to create the component.
Also to let you know, some of the well-known large companies who have successfully applied microservices architectures are: Amazon, eBay, Gilt, Netflix, PayPal, and Twitter.
3. Shopping Cart example
In a traditional “monolithic” applications (opposite to Microservices approach), all the functionalities are implemented and embedded as part of a single application, similar to what is shown in the below diagram –
If the same shopping application would have used Microservices architecture, it would have looked something like below –
4. Advantages of Microservices
Some of the major advantages of using Microservices are –
- It gives developers the freedom to independently develop and deploy services.
- Improves the scalability with the ability to individually scale services as needed.
- Better fault tolerance, which means that if one microservice fails, the others will continue to deliver.
- Code for different services can be written in different languages.
- The microservice architecture enables continuous delivery.
I hope the basic understanding on Microservices went well. We will soon bring up a demo on how to create Microservices using Spring Boot. Please share your thoughts and opinions in the comment section below.