Most people who work in technology, especially cloud computing, are probably familiar with service-oriented architecture (SOA) and microservices but still there always remains some doubt regarding the differences in these two.
In this article we will learn in deep, regarding SOA(Service Oriented Architecture) and Microservices.
What is SOA ?
A service-oriented architecture (SOA) is a method of developing software that focuses reusability while also ensuring that non-functional needs (such as security, scalability, and performance) are addressed. It includes a group of services that are modular in nature and “communicate” with one another to support applications. The communication can involve either simple data passing or two or more services coordinating some activity. Some means of connecting services to each other is needed which is typically ESB(Enterprise Service Bus).
What is Microservice ?
Microservices are a sort of evolution or extension of SOA. Microservices use APIs, or application programming interfaces, to connect with one another. Each of them contributes to the formation of an organizational network centered on a given business topic. When these services are combined, they form sophisticated applications. Microservices construct an application system as a collection of single-purpose services that are generally different and distinctive.
SOA and Microservice can be differentiated on Scope, Granularity and Implementation!
SOA is a collection of enterprise-level applications and services that need developers to have a thorough understanding of the application and all of its dependencies in order to code properly.
Microservices, on the other hand, is a design pattern for an application. It divides a single application into numerous distinct services, each of which performs a different purpose. In other words, each capability excels at one task, decreasing the amount of knowledge required by engineers to work on each module.
SOA is “coarse grained”, which means it concentrates on broad, business-domain functions. As a result, each functionality has a large number of dependents.
Microservices are even more “fine-grained”, resulting in a tangle of capabilities with a single emphasis known as a bounded context. Each bounded context is self-contained, lightly connected, and much more focused than a SOA’s domain functions. This allows it to be more scalable than SOAs.
SOA requires a software that handles communication. Historically, businesses have used web service access protocols like SOAP to expose, and then transact with each functionality. This created a point to point integration which was difficult to manage. This is why SOA makes use of an Enterprise Service Bus (ESB), a middleware technology that handles communication and lowers the amount of point-to-point connections between capabilities.
When it comes to a microservices architecture, each individual service operates and scales independently and so each has their own separate point of failure, making microservices far more resilient and agile, and enabling the independent coding of each individual functionality.
Hope you liked it. There will be a second part published on when to use SOA and when to use Microservices. So stay tuned.