What Are Microservices, Actually?
Micoservices allows us to break large system into number of independent collaborating processes. Microservices architecture allows to avoid monolith (Single unit system) application for large system. It provides loose coupling between collaborating processes which running independently in different environments with tight cohesion. For example, imagine an online shop with separate microservices for user-accounts, product-catalog order-processing and shopping carts.
Monolithic
Benefits
- Smaller code base is easy to maintain.
- Easy to scale as individual component.
- Technology diversity i.e. we can mix libraries, databases, frameworks etc.
- Fault isolation i.e. a process failure should not bring whole system down.
- Better support for smaller and parallel team.
- Independent deployment
- Deployment time reduce
Challenges
- Difficult to achieve strong consistency across services
- ACID transactions do not span multiple processes.
- Distributed System so hard to debug and trace the issues
- Greater need for end to end testing
- Required cultural changes in across teams like Dev and Ops working together even in same team.
The Web-Application will make requests to the Account-Servicemicroservice using a RESTful API. We will also need to add a discovery service – so the other processes can find each other.
Service Registration
When you have multiple processes working together they need to find each other. If you have ever used Java’s RMI mechanism you may recall that it relied on a central registry so that RMI processes could find each other. Microservices has the same requirement. For more information, https://www.ceymplon.lk/service/it-service/tech-consultancy