Software Development

SOA vs Microservices: What’s the Difference?

In this article, we will see a comparison between SOA vs Microservices and their basic differences.

1. Introduction

A service is a single software unit that performs business tasks. Service-oriented architecture (SOA) is a software architecture where distinct components of an application provide services to other components via a communications protocol over the network. SOA composes a complex application by orchestrating separately deployed components over the network. There are two key components in SOA:

  • Service Components – including both services providers and consumers.
  • Enterprise Message Bus (ESB) – orchestrating the service components. Click here to see a list of ESB tools.

2. SOA Principles

An individual department within an enterprise builds its software applications and may communicate with other applications to fulfill business tasks. SOA emerged in the late 1990s and is a cost-effective way because it reuses existing components. It usually depends on a tool to transform and communicate with service endpoints. Here are key SOA principles:

  • Standardized service contract – services are well defined. e.g. SOAP web services describe services in WSDL and Restful services define with WADL.
  • Loose coupling – less dependency on each other.
  • Abstraction – each service component acts as black boxes.
  • Autonomy – each service controls its own logic.
  • Statelessness – each service returns a value for success or exception if it fails.
  • Discovery – can find services via UDDI, etc.

3. Microservices Architecture

Microservices architecture (MSA) has evolved from SOA since 2005. Each microservice is deployed to a container in a cloud environment. MSA has the same principles as SOA. Click here for a basic understanding of MSA.

4. SOA vs Microservices (MSA)

SOA and MSA both focus on the service development. But there are different. Here are key differences between SOA and MSA:

Scopefocus on enterprise tasks. Components integrate together to achieve an enterprise goal.focus on a single service. Each microservice is a self-contained application.
Re-Usereuse the services.reuse the code to reduce the dependency of other components.
Sync vs ASyncsynchronous call is preferred.asynchronous processes (events/messages driven) are preferred in MSA to improve performance.
Dataservices access the shared data storage.each microservice accesses its local data so it doesn’t depend on other’s data.
Tool ExamplesMule, TIBCO, etcDocker, Kubernates, etc.
Network ProtocolSOAPHTTP
Table 1 SOA and MSA Differences

5. Summary

In this article, I explained the basic definition of SOA and MSA and identified the key differences between them. It really depends on the business problem when choosing the better solution. In general, SOA is a better choice for a smaller web-based application. MSA is a better solution for a large complex business application.

Mary Zheng

Mary has graduated from Mechanical Engineering department at ShangHai JiaoTong University. She also holds a Master degree in Computer Science from Webster University. During her studies she has been involved with a large number of projects ranging from programming and software engineering. She works as a senior Software Engineer in the telecommunications sector where she acts as a leader and works with others to design, implement, and monitor the software solution.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Fernando Cunha
Fernando Cunha
2 years ago

great explanation!

Back to top button