1.

Difference between Microservices and SOA

Answer»

Microservices are a continuation to SOA.

SOA started gaining ground due to its distributed architecture approach and it emerged to combat the problems of large monolithic applications, around 2006.

Both (SOA and Microservices) of these ARCHITECTURES share one common thing that they both are distributed architecture and both allow high scalability. In both, service components are accessed remotely through remote access protocol (RMI, REST, SOAP, AMQP, JMS, etc.). both are modular and loosely coupled by DESIGN and offer high scalability. Microservices started gaining buzz in late 2000 after the emergence of lightweight containers, Docker, Orchestration FRAMEWORKS (Kubernetes, Mesos). Microservices differ from SOA in a significant manner conceptually -

  1. SOA uses Enterprise Service Bus for communication, while microservices uses REST or some other less elaborate messaging system (AMQP, etc). Also, microservice follow "Smart endpoints and dumb points", which means that when a microservice needs another one as a dependency, it should use it directly without any routing logic/components handling the pipe.
  2. In microservices, service deployment and management should be fully automated, whereas SOA services are often implemented in deployment monoliths.
  3. Generally, microservices are significantly smaller than what SOA tends to be. Here we are not talking about the codebase here because few languages are more verbose than the other ones. We are talking about the scope (problem domain) of the service itself. Microservices generally do one thing in a better way.
  4. Microservices should own their own data while SOA may share a common DATABASE. So one Microservices should not allow another Microservices to change/read its data directly.
  5. Classic SOA is more platform-driven, while we have a lot of technology independence in case of microservices. Each microservice can have its own technology stack BASED on its own functional requirements. So microservices offers more choices in all dimensions.
  6. Microservices make an as little assumption as possible on the external environment. A Microservice should manage its own functional domain and data model.


Discussion

No Comment Found