When we are going to compare the difference between SOA and Microservices architecture, it is almost nearly impossible to prove one superior than other, different perceptions are there like they solve their own set of problems, have different concepts etc., while other thinks both have same architecture and work for common goals. In this blog, I will explain the basic difference between SOA and Microservices Architecture?
SOA (Service Oriented Architecture)
A Service Oriented Architecture is a software architecture pattern, in which application components provide services to other components via a communications protocol over a network. The communication can involve either simple data passing or it could involve two or more services coordinating connecting services to each other. Services such as RESTful Web services carry out some small functions, such as validating an order, activating account, or providing shopping cart services.
Service Oriented Architecture is less about how to modularize an application, and more about how to compose an application by integration of distributed, separately-maintained and deployed software components. It is enabled by technologies and standards that make it easier for components to communicate and cooperate over a network, especially an IP network.
The following figure shows a quick view of an SOA architecture.
There are 2 main roles in SOA, a service provider and a service consumer. A software agent may play both roles. The Consumer Layer is the point where consumers (human users, other services or third parties) interact with the SOA and Provider Layer consists of all the services defined within the SOA.
Pros of SOA
Easy Maintenance: : Not need to update system, editing and updating is very easy
Same directory structure :: Consumer can access data from the same directory always, whereas the location of service data has changed
Scalable : : Unlimited number of users can access the service by attaching more servers, as it enables service available to all the users all time.
Platform Independence : : Services communicate with other applications through common language means it is independent of the platform on which application is running.
Cons of SOA
SOA is expensive is terms of human resource, development and technology
Requires a high-speed server as some web services sends and receive messages frequently
As it using multiple services, it will overload system with computation.
Microservices is a software architecture pattern in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs.
Microservices must be a real need in the system architecture as it could be designed wrongly. It means a service should be independently deployable, or be able to shut-down a service when is not required in the system and that should not have any impact on other services. The following figure shows a quick view of a Microservices architecture.
As shown below, each service has its own database or a database is shared between a few of microservices:
Microservices are not invented. Enterprises such as Amazon, Netflix, and eBay used the divide and conquer strategy to functionally partition their monolithic applications into smaller units, and resolved many issues. Following the success of these companies, many other companies started adopting this as a common pattern to refactor their applications. Eventually the pattern was termed as Microservices Architecture. Nothing radically new has been introduced in MSA. MSA is the logical evolution of SOA and supports modern business use cases.
Pros of Microservices
Microservices create flexibility when choosing a technology
Microservices architecture enabled application are more robust as a whole.
Microservices are scalable, they can be used to split systems allowing more defined skill sets.
Microservice architecture is independent as each service is developed and deployed independently from all other services.
Cons of Microservices
Deployment multiple services is more challenging than single service.
Increased complexity as functionality is coupled together.
In case of even single change in application requires whole app to be redeployed.
Huge resource requirements.
Systematic and Basic Difference Between SOA and Microservices Architecture
In the end, I only want to say that it is not as simple as to tell which architecture is good and it finally depends on the application that you are going to build. SOA is better suited for large and complex business applications while Microservices is good for small applications.
This series of posts can help CIOs achieve better results. In the first installment, Bob Ronan sets the stage by describing his model for thinking about the four stages of the technology organizationread more
onshore/offshore business model means we are uniquely placed business model means we are uniquely placedread more