Friday 5 February 2016

Microservices

Nowadays it is quite common to hear about the microservices architecture. What is the meaning behind the concept of microservices? Why is it changing the way of building software? I will try to summarize in this post the basic notions about microservices.

A valid definition of Microservice can be the functionality that is deployable independently, for building a system in a modular way.

Traditionally the projects in an organization are characterized by being monolithic. That means a project or group of projects with their dependences that are deployed as one entity. These projects share a database and are coded using the same language.



On the other hand, microservices will have their own services and their own database. Also they do not need to use the same language, so the best technology can be used for each problem.

Microservices architecture also solves a problem related with scalability. In a monolithic architecture as the project increases it needs more hardware resources (servers or containers).

There is a very popular article about microservices in the Martin Fowler blog:
Some main ideas about microservices:

  • Service oriented
  • Products instead of projects.
  • Smart endpoints and dump pipes communication pattern. Note :To know more about the meaning of this pattern you can read this explanation from stackoverflow. This pattern is the opposite to the use of enterprise service bus (ESB).
  • Microservices involves a team will be responsible of development, build, deployment, maintenance.
  • Decentralized data managementMicroservices uses their own database. Managing distributed transactions can be a drawback, due to the need of synchronizing data.
  • Design for failure: it means that if one component fails it does not affect the others.
  • Infrastructure automation: Continous deployment, a change only requires deploying the microservice, not all the application as in monolithic architectures.

No comments:

Post a Comment