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:
| Aspect | SOA | Microservices |
|---|---|---|
| Service size | large, grouped by business domain | small, built around a business capability |
| Communication | SOAP, XML, enterprise formats | REST and JSON, events, lightweight protocols |
| Data storage | often a shared enterprise database | each service has its own database |
| Infrastructure | the bus is configured and deployed centrally | routing moves into the network — an API gateway and a service mesh |
| Goal | reuse functions across many applications | independent 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 pagesVerified 8 Nov