Tuesday, May 10, 2016

Microservices: Lego Blocks in Modern Architecture

Until recently there was no real word to describe the kind of software that I developed over the last decade. I have worked on distributed systems that were massively scalable with millions of users and billions of transactions. I have worked on service oriented architectures that delivered user functionality at rapid pace. I discovered, learned and practiced a particular style of software architecture. But until recently could not find a simple phrase to describe it.  
Now I can say I developed Microservices ! But what is Microservice ?

Defining Microservice

Wikipedia defines : Microservices is a software architectural style in which complex applications are composed of small, independent processes communicating with each other using language agnostic API. These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system-building.
In short, for each service "Do one thing and do it well". 
But I like following definition better
Microservice Architecture is a service-oriented architecture composed of loosely coupled elements that have bounded contexts.

Loosely Coupled

Loosely coupled means each microservice is a unit of software that is independently replaceable and upgradeable and deployable. It is not microservice architecture If all services have to be deployed at once or they talk to the same database and requires coordinating schema changes. Micro services can be scaled independent of each other (ideally in elastic automated ways.). This allows separate development teams (perhaps geographically separated) to develop services using separate schedules, frameworks and methodologies.

Bounded Context

Bounded context as name suggests is a partition or silo of domain model that is mostly selfcontained – Microservices and its peers interact purely through APIs and don’t share data or schema. The key is that each organizes and manages its own data. This is a critical feature of this architecture.

Organized around business capabilities

Now essence of Microservice is that each Microservice is they expose business functionality as a component. And then you can build your application as as suit of services by putting these components together.

Using Language Agnostic API

With language agnostic APIs, it enforces clear separation between interface of the Microservice and its implementation. This ensures true interoperability between various components. SOAP and REST are two approaches that have already become industry standard.

Marriage made in Heaven: Containers as Deployment Units.

Containers are the future of application delivery. It is an application packaging and delivery method that guarantees that your containers will always run the same, regardless of the environment it is running in. In short it is well contained. This is exactly the fundamental requirement of Microservices
Container is an old concept. Most familiar being the java web archive and servlet containers. Latest and the most popular incarnation being the docker containers. Linux containers allow higher density and better utilization of hardware resources.
The advantages are  
  • Rapid provisioning
  • Scale quickly. 
  • Eliminates the environment inconsistencies
  • Improves the velocity of development by allowing development teams to choose the software stack that is best for their service.
  • Easy sharing
  • Isolate problems
  • Simplifies continuous integration and testing  



  1. This comment has been removed by the author.

  2. My favorite casino! purely top online casino I recommend to everyone!!! The engine does not slow down. I did not observe any breaks in the connection. Won $ 2200. Brought the winnings to no problem. Very beautiful, pleasant, comfortable casino. Very nice voice acting. Honesty control. In short .. all zashib