What Is Service-Oriented Architecture (SOA)?

Service-oriented architecture (SOA) is a centralized architecture in which each component is connected with each other to perform a service.

Written by Akshay Kumar
Developer reviewing software architecture
Image: Shutterstock / Built In
Brand Studio Logo
UPDATED BY
Brennan Whitfield | Aug 20, 2024

Service-oriented architecture (SOA) is an architectural style designed to build a distributed system. It involves designing software applications that include multiple services that communicate with each other using standardized interfaces.

Service-Oriented Architecture Definition

Service-oriented architecture (SOA) is a centralized architecture in which multiple services communicate with each other to deliver a service using standardized interfaces. It’s considered a coarse-grained architecture and is most useful for building large, complex systems that require integration between services. 

SOA stands in contrast to microservices, which is a different approach to designing a software system. SOA’s centralized approach can be beneficial for large, complex systems that require tight integration between services, while microservices’ scalability and flexibility allows for rapid development and deployment of individual components. Both architectures have their strengths and are suitable for different contexts, depending on the project’s specific requirements and goals.

 

An introduction to service-oriented architecture. | Video: Systems Innovation

What Is Service-Oriented Architecture?

SOA is an enhanced version of monolithic architecture, and it solves various challenges that come under software system design.

Monolithic architecture is a single-unit architecture and is like a container that hosts a number of software components. Each of those components are tightly integrated into a single system.

The issue with monolithic architecture is that the system components are all contained inside a single container. SOA attempts to solve this issue with a container that is broken down in smaller chunks. It involves  designing a software application as a collection of small, independent and reusable services. Each component performs a specific function and can be deployed, developed and maintained independently.

Suppose we have one software application that has four features. All four features are developed as different components, but they’re all connected with each other. Each component is then responsible for a small task. and these small tasks together deliver a particular feature.

Advantages of Service Oriented Architecture

SOA is useful when you have:

  • Large complex enterprise systems that require integration of multiple legacy applications and databases.
  • Large distributed systems in which different components are located on different locations.
  • Systems that experience spikes in demand.
  • Require flexibility, reusability, scalability and interoperability in your architecture.

Components of Service-Oriented Architecture

Service oriented architecture contains three building blocks: service provider, service repository and service requester.

1. Service Provider

The service provider focuses on the services that are being offered, such as security, availability, what to charge and more. This role also determines the service category and if there need to be any trading agreements. It defines a well-defined interface that allows consumers to interact with the service without needing to know the underlying implementation details. It abstracts the complexity and presents a standardized interface.

2. Service Repository

The service repository facilitates the discovery and identification of services, making it easier for service requesters to find and access the appropriate services they require. It serves as a central catalog or registry that maintains and manages information about all available services within the SOA ecosystem.

3. Service Requester

The service requester locates entries in the broker registry and then binds them to the service provider. This enables seamless communication and data exchange between different services within the SOA environment. The service requester can access services from various providers, promoting a more modular and distributed approach to software development.

More on Software EngineeringGuide to the JavaScript Reduce Method

 

What Are Microservices?

Microservices is an architectural style that breaks the system down into a set of highly cohesive and independent services that are designed to perform the specific operation. 

The user interface is a container that has two different components, i.e. microservice and API gateway. The two components are further divided into multiple tasks that form a single feature, like the user interface. All the components are interconnected with each other and have individual databases to store data. Each microservice can use a different technology or programming language for the product development and allow deployment independently.

In SOA, one big component is divided into small chunks that are connected with each other and these small tasks are together delivered as a particular feature. In microservices, these small tasks are further divided into task level services. Microservices architecture enables the organization to deliver a large, complex application. 

Advantages of Microservices

Let’s look at when you typically need to use microservices in order to have testable and deployable architecture.

  • Complex applications: By breaking the application down into smaller, more manageable services, developers can more easily understand, test, and modify the system.
  • Scalability: If your applications need to handle a massive amount of data, microservices can be a good choice. Each microservice can be scaled independently, it allows us to allocate resources as needed.
  • Continuous delivery: Microservices facilitate continuous delivery and deployment. It allows the release of new features and updates more frequently because of its independent nature.

It can be useful in multiple situations, including:

  • Building enterprise applications.
  • Cross-team coordination.
  • Rapid product growth.
  • Supporting more customers with more traffic and more data,
  • For standalone business applications or modules that have to be reused across different channels.

 

Service-Oriented Architecture vs. Microservices

Service-oriented architecture (SOA) and microservices are both used to build distributed software systems. The main difference between SOA and microservices comes down to scope. Let’s compare both architectures based on some specific properties.

Centralized System vs. Decentralized System

SOA is a centralized system, whereas Microservices is decentralized. In SOA, components are interconnected with each other and the container has one single hub that is connected with all the other components inside the container. Online social applications like Facebook, Twitter, Quora are examples of centralized systems.

Microservices architecture follows a decentralized approach, where every component operates independently and communicates through lightweight protocols like HTTP or message queues. Each microservice can use different technologies and frameworks tailored to its specific service, enabling teams to work autonomously and choose the most suitable tools for their tasks. This decentralized nature of Microservices promotes better scalability, agility, and resilience in large-scale distributed systems.

Coordination

Each of the components in SOA coordinates across all the teams to deliver the services. In microservices, coordination between components is minimal. SOA has four different services that all together perform a single SOA and deliver application services:

  • Business service.
  • Enterprise service.
  • Application service.
  • Infrastructure service.

In microservices, we only have two services:

  • Functional service.
  • Infrastructure service

Heterogenous Interoperability

In SOA, we need messaging middleware to communicate between different components inside a container. Suppose every component provides a service of a particular software application, and they may be written in different programming languages. To communicate between them we need middleware.

This standardized communication method allows microservices to communicate efficiently, irrespective of the programming languages or technologies used to implement each service. As a result, the absence of complex middleware in microservices architecture streamlines the development process and enhances the overall system’s agility and adaptability. In microservices, we do not need any middleware. All the components are independent of each other. They communicate via REST APIs.

Service Granularity 

Suppose we have multiple components inside one container that perform different services. When a consumer requests a service, SOA calls all the services at the same time. It makes the request parallelly that triggers all the services inside the container at the same time.  

In microservices, service granularity takes a finer approach. Each service represents a small, independent, and focused functionality, making the components more lightweight and modular. When a consumer needs a specific service, only that particular microservice is invoked, keeping resource consumption minimal and optimizing performance.

The adaptability of microservices granularity is particularly advantageous in rapidly evolving environments, where it allows developers to quickly deploy, modify or replace specific services without affecting the overall system’s stability.

Whereas microservices makes the request serially. Microservices architecture has multiple small chunks of tasks that perform specific operations and all the chunks are connected in a serial order.

service oriented architecture illustration
SOA service granularity. | Image: Akshay Kumar

Component Sharing

In SOA, components within a container typically share the same order service, meaning they all access a single service to retrieve data related to orders. This centralized approach can simplify certain aspects of service management but may also lead to potential bottlenecks or resource contention, especially during periods of high demand. 

This autonomy allows developers to share specific microservices across multiple applications effortlessly, fostering a culture of code reusability and promoting more efficient development practices. Consequently, Microservices architecture encourages a higher degree of modularity and collaboration among different development teams, leading to faster innovation and reduced redundancy in codebase.

SOA has the same order service, which means all the components will use a single service to get the data. In microservices all the components have separate order service.

service oriented architecture component sharing
SOA component sharing. | Image: Akshay Kumar
microservices components
Microservices component sharing. | Image: Akshay Kumar

More on Software EngineringWhat Is WSGI (Web Server Gateway Interface)?

 

When to Use Service-Oriented Architecture vs. Microservices

When to use service oriented architecture as opposed to microservices largely depends on the specific need of the project. In general, SOA is more useful when you’re dealing with a large, complex enterprise system that requires integrating multiple legacy applications. Microservices is more useful when you have continuous delivery and deployment.

Frequently Asked Questions

Examples of service-oriented architectures (SOA) include:

  • Websites and applications using one login: SOA can be used to create an application environment where authentication is managed by a set of services, enabling only one set of login information to be required to access all applications.
  • Online business systems: SOA can allow online businesses to create independent services to manage customers, customer accounts and any orders processed.
  • Apps using built-in device functions: Apps can utilize SOA and services to have built-in device functions, like GPS or weather app data, be accessible in-app.

Service-oriented architecture (SOA) is a centralized architecture design approach where software systems are built using connected individual components, or services, while microservices is a decentralized architecture approach where applications are built with loosely coupled services. SOA is more suitable for enterprise-level scope and large, complex systems, while microserves are more suitable for application-level scope and cases requiring rapid development and deployment of individual components.

Explore Job Matches.