Undoubtedly, Microservices is the trending topic in the software development world. Every organization is trying to decompose its application/product and convert into Microservices, so that they can sell their product in name of Micro-Services based architecture. However, are they really creating true Microservices? or in the lack of understanding of overall Microservice architecture Gamut, are they creating just another set of services, which can be called “Miniservices” to achieve the business needs.

In this article, lets try to differentiate between a Microservice, Miniservice, and Macro (Monolith) Service.

Microservice

You can call your service as Micro-Service if and only if it is:

  • Independently developed, deployed, and managed without having any awareness of the service around it.
  • Communicates to each other through Publish-Subscribe Pattern.
  • Has a Single Responsibility.
  • Is loosely coupled.

Microservices architecture

So, if your service is not following any of this principle, then it is not a Microservice, and you may be working on Mini-service, which I will explain shortly. Services are also not Microservices if they:

  • Share the Database (Physical or Logical).
  • Communicate to each other in Synchronous fashion (Service to Service call using REST).
  • Share the Infrastructure.
  • Know more about what’s going on around it in order to communicate.

However, during development, not all developers understand the Pub-Sub model or lack on understanding of functionality, so they commit the following mistakes:

  • Not aware with Pub-Sub or Message queue Integration pattern, hence they switch quickly into REST APIs, so that services can communicate.
  • Not aware with complete business, hence mix-up the features and forget SRP of Micro-Service.
  • Do not physically segregate the Database for each service, instead create Schema in the same DB and many Microservices that interact with this same Database

**Miniservice **

So what is Miniservices? It is like a group of Microservices that come together in a pattern to resolve a business need. It is a single function as a service.

You can call your service as Miniservice if:

  • If multiple applications share the same database.
  • Services communicate with each other through REST APIs and do not embrace event-based architecture for asynchronous communication.
  • Share infrastructure for deployment.

#microservice architecture #microservice #monolith #miniservice

Microservice, Miniservice, and Macroservice
9.30 GEEK