Service-Oriented Architecture (SOA)

What Is Service-Oriented Architecture?

Service-oriented architecture (SOA) is a modern software architecture paradigm for building applications as a collection of modular units of software called services. In SOA, services are self-contained, modular, and loosely coupled. This approach enables you to build complex and distributed applications in which you can update individual components, in contrast to entire monolithic applications. A typical SOA software stack includes application software comprising services, platform services, and middleware. These services run on high-performance hardware or virtual machines.

Generalized SOA software stack with layers from top to bottom–application software, middleware, basic software–running on high-performance hardware.

Generalized SOA software stack.

Service-Oriented Communication (SOC)

SOA-based applications use service-oriented interfaces for service-oriented communication to provide and use functionalities to exchange information over messages. Services play the role of clients or servers in a SOA. Each client or server service is implemented in software as a component. The connection points between client and server components are known as client/server ports, which make up the service-oriented interfaces.

Two service-oriented applications communicate with each other using messages.

Service-oriented communication using messages.

To facilitate information exchange, client and server components use various service-oriented communication patterns, including publish-subscribe, request-response, and fire-forget. These patterns can be asynchronous or aperiodic, which is a key characteristic of SOC. Event-based modeling can be done using Stateflow® and SimEvents®. In addition, the Messages & Events library in Simulink® enables you to model, simulate, and generate C++ code for applications using message-based communication.

Service-oriented communication interface patterns including methods (request/response and fire/forget), events, and fields.

Service-oriented communication interface patterns.

SOA Workflow

With a Model-Based Design workflow, you can build service-oriented applications by:

  • Specifying requirements with Requirements Toolbox™
  • Authoring SOAs using System Composer™
  • Modeling and simulating services and components in Simulink
  • Importing existing services and components for reuse
  • Generating C++ production code with Embedded Coder®
  • Integrating the full SOA application
  • Deploying SOA applications to edge devices and the cloud

SOA Extensibility

Services are reusable and upgradeable. They enable software engineers to build scalable service-oriented applications using agile principles, including systems that support over-the-air (OTA) updates so that they are always current.

A software-defined vehicle workflow showing the sequence of steps and associated tools to accelerate time to recover from incidents.

A software-defined vehicle workflow to accelerate time to recover from incidents.

Use Cases for SOA

For software-defined systems incorporating autonomy, connectivity, and electrification, service-oriented architecture plays a crucial role as the foundational framework. SOAs are also used to build systems of systems, multiagent systems, discrete-event systems, and distributed systems in the automotive, aerospace, industrial automation and IoT, medical devices, and robotics industries.

Software architecture frameworks, middleware standards, and communication protocols based on service-oriented architecture and service-oriented communication have emerged to support these industries. Examples of these frameworks and standards include AUTOSAR Adaptive, DDS, ROS/ROS2, FACE, SOME/IP, MOSA, MQTT, and OPC UA.

SOA in Automotive

SOAs are most prevalent in the automotive industry with the advent of software-defined vehicles (SDVs). SDVs integrate both signal-based and service-oriented applications onto newer EE architectures with vehicle computers and zonal controllers. With System Composer and Simulink, developers can model SOAs, simulate them, and generate C++ production code before deploying them as modular services to edge devices and the cloud. Furthermore, these services can be upgraded through over-the-air software updates throughout the lifecycle of the vehicle to enhance customer experience. SOAs have been incorporated into industry standards noted above as well as in-house frameworks.

An automotive example showing an AUTOSAR Classic software stack and AUTOSAR Adaptive software stack connected to the cloud.

Automotive example: AUTOSAR Classic and Adaptive software stack.

SOA in Aerospace and Defense

In the aerospace and defense industries, SOA appears in the Future Airborne Capability Environment (FACE™) standard, part of the Modular Open Systems Approach (MOSA) standardization initiative. FACE uses Transport Services Segments (TSS) for service-oriented communication. With Simulink and DDS Blockset, you can model and simulate applications for the FACE standard, import FACE IDL for DDS TSS, simulate FACE TSS communication, and generate C++ production code and deploy it for FACE applications.

FACE IDL–based workflow showing import of IDL, viewing and editing the interface data dictionary, modeling algorithms, generating C++ code, and deploying it for FACE applications.

FACE IDL–based workflow from import to deployment.

See also: System Composer, Simulink, Stateflow