Overview of Microservices and Service-Oriented Architecture

What is Service-Oriented Architecture?

  • Service-Oriented Architecture (SOA) is a software architectural style that structures an application by breaking it down into multiple components called services.
  • Each service represents a functional business domain.
  • In SOA applications, each service is independent and provides its own business purposes but can communicate with others across various platforms and languages.
  • SOA components are loosely coupled and use a central Enterprise Service Bus (ESB) to communicate.

What is a microservice?

  • On the other hand, a microservice is an architectural style that focuses on maintaining several independent services that work collectively to create an application.
  • Each individual service within a microservice uses internal APIs to communicate.

Comparison

  • Although SOA and Microservices seem similar, they are still two different architecture types. Microservices are like a more fine-grained evolution of SOA.
  • One of their main differences is scope. Microservices are suited to smaller modern web services.
  • Each service within a microservices generally has one specific purpose, whereas components in SOA have more complex business purposes and functionality and are often implemented as subsystems.
  • SOA is therefore suited to larger enterprise application environments.
  • Another significant difference is how both architectures communicate. Every service in SOA communicates through an ESB. If this ESB fails, it compromises functionality across all services.
  • On the other hand, services within a microservice are entirely independent. If one fails, the rest of the services remain functional. Overall, Microservices are more error tolerant.
  • Today SOA applications are uncommon as it's an older architecture that may not be suitable for modern cloud-based applications. 
  • However, microservices were developed for the cloud-native movement, and most developers prefer the versatility of service independence they offer.