Service-oriented architecture
SOA
Service-oriented architecture organizes software around services that provide business capabilities, such as checking stock. Applications use those capabilities through agreed interfaces without needing to know how each service works internally.
Also known as: сервис-ориентированная архитектура
What it means
In service-oriented architecture (SOA), a service exposes a business capability that other applications can use. Think of a retailer that sells through a website, a call center, and a partner portal. Instead of teaching each application how to work out which stock is available to sell, the retailer can put that decision behind an inventory service. Each application asks the same service and gets an answer based on the same rules.
The contract is the boundary
A service contract describes the operations a consumer can use, the inputs it must supply, and what the results and errors mean. For example, “available quantity” might exclude units already reserved for another order. That meaning is part of the contract, not just the fact that the API returns an integer. The inventory team can change how it calculates availability without changing its callers, provided it preserves the promised behavior. If the callers query the service's internal tables instead, they depend on implementation details that the team may need to change.
A consumer can make a synchronous request when it needs an answer before proceeding, or exchange asynchronous messages when the work can finish later. An enterprise service bus (ESB) can help route messages and translate between formats, especially when connecting older systems. It is a common integration option, not a requirement. Neither SOAP nor any other specific protocol defines SOA.
Example: checking and reserving stock
A product page asks the inventory service whether an item is available. Checkout uses a separate operation to reserve a unit: a positive availability check does not guarantee that the item will still be there a second later. If the reservation request times out, checkout cannot assume it failed; the service may have reserved the item before the reply was lost. One useful contract lets checkout retry with the same reservation ID so a repeat request does not reserve a second unit.
When to use it and how it compares
SOA is useful when several applications need the same business rules or when a business wants new applications to work with existing systems without exposing their internals. Sharing a capability reduces duplicate logic, but it introduces a runtime dependency. Teams have to plan for slow or unavailable services and coordinate changes that break consumers.
Traditional enterprise SOA often emphasizes integration and reuse across applications. Microservice architectures typically put more emphasis on independent deployment and team autonomy. Both organize work around services with contracts, so service size or a choice like REST versus SOAP is not a reliable way to tell them apart.
In an interview
If asked to design a service, start with the business decision it owns, not the transport. Explain who calls it, what the contract promises, and what the caller should do if it gets no answer. A stock check and a stock reservation make a good contrast: one reads information, while the other changes state and needs a clear policy for duplicate requests.