Bookmarks

SOA — Service-Oriented Architecture

An architectural style in which an application is assembled from reusable services: each service exposes its functions to other parts of the system through formal contracts.

Also: SOA

checked 8 Nov

All terms

SOA is an approach for enterprise systems: business functions such as “place an order” or “screen a counterparty” are packaged as reusable services instead of being built into every application from scratch. Services are connected through shared infrastructure — the service bus — which made the style a signature of the integration projects of the 2000s.

What is a service in SOA

A service is a self-contained unit of functionality that responds regardless of which system called it. The OASIS SOA-RM model describes working with a service as a meeting of needs and capabilities: the provider publishes a service description — what it accepts, returns and on what terms — and the consumer uses that description to find a suitable service. In the classic form the contract is written in WSDL, messages are exchanged in SOAP, and web services are a common but not the only implementation of the idea (for the definition of a web service see the W3C note “Web Services Architecture”).

  • contract — a formal description of operations and messages; the consumer needs no implementation details
  • loose coupling — the service and the consumer depend only on the contract, not on each other’s code
  • abstraction — the interface hides which language and database the service runs on
  • reusability — one service serves several applications and business processes

The role of the service bus

The bus (ESB) is the infrastructure through which services communicate: it takes a message from the consumer, finds the right service, converts formats and adapts legacy systems that only understand files or EDI. In large deployments the bus also orchestrates business processes — it assembles sequences of service calls into a process, for example in BPEL. Such a hub is convenient for integrating legacy systems, but it gets overloaded: the bus becomes a single point of failure and the one place where everything is deployed.

Microservices develop the same idea of services but dropped the central element of SOA — the bus. The microservices community formulated the principle of “smart endpoints and dumb pipes”: the logic lives in the services, while the pipe only carries messages. Lewis and Fowler noted that SOA is used to mean too many different, sometimes contradictory, things. How the two styles differ:

AspectSOAMicroservices
Service sizelarge, grouped by business domainsmall, built around a business capability
CommunicationSOAP, XML, enterprise formatsREST and JSON, events, lightweight protocols
Data storageoften a shared enterprise databaseeach service has its own database
Infrastructurethe bus is configured and deployed centrallyrouting moves into the network — an API gateway and a service mesh
Goalreuse functions across many applicationsindependent development and release by each team

In practical terms: SOA answers the question “how to reuse the functions of enterprise systems”, while microservices answer “how teams can release changes independently”. In large organisations both tasks exist at the same time.

Sources

the term is written from these pages

Verified 8 Nov

Not to be confused with

what it is mixed up with and how it differs

  • microservices

    Microservices — a related style without a bus: the services are small, each has its own database and they talk to each other directly.

  • ESBenterprise service bus

    ESB — not a style but the infrastructure of classic SOA: the bus routes and transforms messages between services.

In depth in the references

where the topic is covered in detail