Microservices vs SOA — Battle Between The Top Architectures

Sahiti Kappagantula
Edureka
Published in
5 min readMay 10, 2018
Microservices vs SOA — Edureka

In this article, I will explain to you layered-based architectures and tell you what is the difference between Microservices vs SOA Architecture?

So, before we deep dive into the differences between the Microservices vs SOA, let me just tell you the basic differences between the Monolithic architecture, SOA, and Microservices.

Monolithic vs SOA vs Microservices — Microservices vs SOA

In layman terms, Monolithic is similar to a big container wherein all the software components of an application are assembled together and tightly packaged.

A Service-Oriented Architecture is essentially a collection of services. These services communicate with each other. The communication can involve either simple data passing or it could involve two or more services coordinating some activity. Some means of connecting services to each other is needed.

Microservices, aka Microservice Architecture, is an architectural style that structures an application as a collection of small autonomous services, modeled around a business domain.

Now, let us see the key differences between the Microservices vs SOA :

Microservices vs SOA

When comparing Microservices vs SOA, they both rely on services as the main component but they vary greatly in terms of service characteristics.

Service Oriented Architecture

It defines 4 basic service types as depicted below:

Basic Service Types — Microservices vs SOA

Business Services:

  • They are coarse-grained services that define core business operations.
  • Represented through XML, Business Process Execution Language (BPEL) and others.

Enterprise Services:

  • Implements the functionality defined by business services.
  • They mainly rely on application services and infrastructure services to fulfill business requests.

Application Services

  • Fine-grained services that are confined to a specific application context.
  • A dedicated user interface can directly invoke the services.

Infrastructure Services

  • Implements non-functional tasks such as authentication, auditing, security, and logging.
  • They can be invoked from either application services or enterprise services.

Microservices have limited service taxonomy. They consist of 2 service types as depicted below.

Services of Microservices — Microservices vs SOA

Functional Services:

  • They Support specific business operations.
  • Accessing of services is done externally and these services are not shared with other services.
  • As in SOA, infrastructure services implement tasks such as auditing, security, and logging.
  • In this, the services are not unveiled to the outside world.

Major differences between SOA and MSA

Differences between Microservice Architecture and SOA — Edureka

Major Differences Between Microservices and SOA in detail:

Service Granularity:

Service components within a microservices architecture are generally single-purpose services that do one thing really, really well. With SOA, service components can range in size anywhere from small application services to very large enterprise services. In fact, it is common to have a service component within SOA represented by a large product or even a subsystem.

Component Sharing:

Component sharing is one of the core tenets of SOA. As a matter of fact, component sharing is what enterprise services are all about. SOA enhances component sharing, whereas MSA tries to minimize on sharing through “bounded context.” A bounded context refers to the coupling of a component and its data as a single unit with minimal dependencies. As SOA relies on multiple services to fulfill a business request, systems built on SOA are likely to be slower than MSA.

Middleware vs API layer:

The microservices architecture pattern typically has what is known as an API layer, whereas SOA has a messaging middleware component. The messaging middleware in SOA offers a host of additional capabilities not found in MSA, including mediation and routing, message enhancement, message, and protocol transformation. MSA has an API layer between services and service consumers.

Remote services:

SOA architectures rely on messaging (AMQP, MSMQ) and SOAP as primary remote access protocols. Most MSAs rely on two protocols — REST and simple messaging (JMS, MSMQ), and the protocol found in MSA is usually homogeneous.

Heterogeneous interoperability:

SOA promotes the propagation of multiple heterogeneous protocols through its messaging middleware component. MSA attempts to simplify the architecture pattern by reducing the number of choices for integration. If you would like to integrate several systems using different protocols in a heterogeneous environment, you need to consider SOA. If all your services could be exposed and accessed through the same remote access protocol, then MSA is a better option.

In the end, I will say it is not that simple to tell which architecture is better than other. It mainly depends on the purpose of the application you are building. SOA is better suited for large and complex business application environments that require integration with many heterogeneous applications i.e. smaller applications are not a good fit for SOA as they don’t need a messaging middleware component. Microservices, on the other hand, are better suited for smaller and well-partitioned, web-based systems in which microservices give you much greater control as a developer. The conclusion is that since they both have different architecture characteristics but it mainly depends on the purpose of the application you are building.

This brings us to the end of our article on Microservices vs SOA. I hope you found this article informative and added value to your knowledge. If you wish to check out more articles on the market’s most trending technologies like Artificial Intelligence, DevOps, Ethical Hacking, then you can refer to Edureka’s official site.

Do look out for other articles in this series which will explain the various other aspects of Microservices.

1. What is Microservices?

2. Microservices Architecture

3. Microservices Design Patterns

4. Microservices Tutorial

5. Building Microservices Application Using Spring Boot

6. Microservices Security

Originally published at www.edureka.co on May 10, 2018.

--

--

Sahiti Kappagantula
Edureka

A Data Science and Robotic Process Automation Enthusiast. Technical Writer.