DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernizing APIs: Share your thoughts on GraphQL, AI, microservices, automation, and more for our April report (+ enter a raffle for $250!).

DZone Research Report: A look at our developer audience, their tech stacks, and topics and tools they're exploring.

Getting Started With Large Language Models: A guide for both novices and seasoned practitioners to unlock the power of language models.

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Related

  • The Pros and Cons of API-Led Connectivity
  • MuleSoft: Do You Have an Extra Mule Under the Hood?
  • Monolithic First
  • Common Performance Management Mistakes

Trending

  • NFT Wallets Unleashed: A Data Structures and Application Design Journey
  • Mastering GitHub Copilot: Top 25 Metrics Redefining Developer Productivity
  • Revolutionizing Healthcare Decision-Making Through Explainable AI
  • Decoding Data Analysis: Transforming Cross-Tabulation Into Structured Tabular Tables
  1. DZone
  2. Software Design and Architecture
  3. Microservices
  4. Microservices vs SOA: What's the Difference?

Microservices vs SOA: What's the Difference?

Are microservices the new SOA? Do people still talk about SOA? Let's investigate the differences between monoliths and these two newer architectures.

Samarpit Tuli user avatar by
Samarpit Tuli
·
May. 16, 18 · Tutorial
Like (26)
Save
Tweet
Share
161.7K Views

Join the DZone community and get the full member experience.

Join For Free

In the previous blog, "What Is Microservices," you got to know that SOA and microservices, which have distributed architectures, offer significant advantages over monolithic architecture. In this blog, I will explain layered-based architectures and tell you the difference between microservices and SOA architecture.

Before we dive into the differences between microservices and SOA, let me just tell you the basic differences between monolithic architecture, SOA, and microservices:

Monolithic vs SOA vs Microservices - SOA vs Microservices - Edureka

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

Service-oriented architecture is essentially a collection of services. These services communicate with each other. 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.

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

You can also watch the below video, where our microservice architecture expert has explained the differences between microservices architecture and SOA.

Edureka Microservices vs SOA Tutorial

Now, let us see the key differences between microservices and SOA:

Microservices vs SOA

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

Service Oriented Architecture

SOA defines four basic service types, as depicted below:

SOA Architecture - Microservices vs SOA - Edureka

Business Services:

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

Enterprise Services:

  • Implement the functionality defined by business services.
  • 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:

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

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

Microservices Architecture - microservices vs SOA - Edureka

Functional Services: 

  • 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 Microservices vs SOA architecture - Microservices vs SOA - Edureka

SOA MSA
Follows “share-as-much-as-possible” architecture approach Follows “share-as-little-as-possible” architecture approach
Importance is on business functionality reuse Importance is on the concept of “bounded context”
They have common governance and standards They focus on people, collaboration and freedom of other options
Uses Enterprise Service bus (ESB) for communication Simple messaging system
They support multiple message protocols They use lightweight protocols such as HTTP/REST etc.
Multi-threaded with more overheads to handle I/O Single-threaded usually with the use of Event Loop features for non-locking I/O handling
Maximizes application service reusability Focuses on decoupling
Traditional Relational Databases are more often used Modern Relational Databases are more often used
A systematic change requires modifying the monolith A systematic change is to create a new service
DevOps / Continuous Delivery is becoming popular, but not yet mainstream Strong focus on DevOps / Continuous Delivery


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 another. 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; 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, it mainly depends on the purpose of the application you are building.

SOA microservice Architecture application

Published at DZone with permission of Samarpit Tuli, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Pros and Cons of API-Led Connectivity
  • MuleSoft: Do You Have an Extra Mule Under the Hood?
  • Monolithic First
  • Common Performance Management Mistakes

Comments

Partner Resources

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: