Service Oriented Architecture VS Microservices

Dec 04 2019
Punit

Before we understand SOA or Microservices, we
should take a look at the conventional style of development until a decade ago,
Monolithic Applications. Since Waterfall methodology of SDLC has been in practice
for several decades, it resulted in Monolithic application development as
entire design and development was done in one shot. Monolithic Applications had
several inherent problems as follows:

  1. It was not scalable
  2. Adding new features used to enhance design and testing efforts
  3. High impact of single process failure

TO overcome the shortcoming of Monolithic
application development, with the dawn of Agile era, following two approaches
of development were evolved to make large applications faster, maintainable and
scalable:

Service Oriented Architecture:

To overcome the limitations posed by Monolithic
architecture, Robert C. Martin who was the co author of Agile Manifesto, gave a
good model to separate out and group related features as services. Here bunch
of ‘Service’ become well defined and self-contained functionality. Service
request is made by ‘Service Consumer’ and response is given by ‘Service
Provider’. ‘Service Consumer’ and ‘Service Provider’ are abstracted from the
implementation details of each other.

In SOA services are decoupled and can interact with
each other irrespective of the service type. Meaning a particular service can
be platform or protocol specific but SOA enables such services to interact and
exchange data. This data is essentially exchanged via ESB (Enterprise service
bus) which forms the backbone of any SOA architecture.

To overcome the limitations posed by Monolithic
architecture, Robert C. Martin who was the co author of Agile Manifesto, gave a
good model to separate out and group related features as services. Here bunch
of ‘Service’ become well defined and self-contained functionality. Service
request is made by ‘Service Consumer’ and response is given by ‘Service
Provider’. ‘Service Consumer’ and ‘Service Provider’ are abstracted from the
implementation details of each other.

In SOA services are decoupled and can interact with
each other irrespective of the service type. Meaning a particular service can
be platform or protocol specific but SOA enables such services to interact and
exchange data. This data is essentially exchanged via ESB (Enterprise service
bus) which forms the backbone of any SOA architecture.

Microservice Architecture:

Microservices is the art of breaking large software
system into small and independent components represented as services. Following
are the main benefits of the approach:

  • Continuous Development and Deployment

Each component in a microservices architecture is
developed, deployed, operated, and scaled independently. These services are
independent and do not share code or implementation with other services.

  • Easy Testing and Maintenance

Since all services in an application are independent
of each other, any failure in once service does not affect another. Once
rectified, only one service needs testing. This drastically reduces effort and
cost of maintenance and change.

  • Support of Multi Technology Stack:

Since these services are running independently, the
orchestration supports use of multiple technologies e.g. few services may be
written in Java while others in .Net framework and they can be deployed
independently. While building a new service, different technology stack can be
chosen.

  • Scalability:

Microservice architecture by definition is highly
scalable. As the business diversifies and grows, you can add more services to
fulfil new requirements. All this happens without any break in the existing
business as the integration is seamless and rapid.

The Final Edge:

Both the approaches are easy to use and have hands
down advantage over Monolithic approach of software development. However, they
differ primarily in the way they are deployed. Whereas, each member of the team
needs to know the common communication mechanism in SOA, it is not a dependency
while building an application with microservices architecture. In the case of
microservices, the services can be operated and deployed independently, unlike
SOA.

For Service Oriented Architecture we have to
develop an Enterprise Service Bus (ESB) that implements communication mechanism
between mutually interacting applications. It can perform a variety of
functions, ranging from message transformation, routing, logging, security etc.
If one of the ESB services is down, it will stop the requests for that service.
In comparison to SOA, microservices are fault tolerant as all services and
their deployment is independent of each other. With upcoming robust tools and
frameworks of DevOps, Microservice Architecture is the future of development of
large applications.

Leave a Reply

Your email address will not be published. Required fields are marked *