Service Oriented Architecture (SOA)
Service Oriented Architecture (popularly known as 'SOA') is an architectural style of designing systems using loosely coupled services which communicate with each other using well established protocols and message payloads.
A service is a discrete unit of functionality that can be accessed remotely, acted upon and updated independently.
SOA principles have evolved over time and away from applications having tightly coupled and rigid communication mechanisms which are hard to integrate with other systems. SOA aims at building well defined independent services which could be built using heterogeneous technology stack but conform to principles of SOA. These set of services could be easily integrated and each of these services could evolve independently of others.
Guiding principles of SOA:
Following are a few guiding principles of SOA (From Thomas Erl's, 'SOA Principles of Service Design'):
1. Service Abstraction
The service should abstract out the underlying complexities of implementation (functionally and technically).
2. Service Contract:
The service should adhere to a well-defined contract which is exposed to the clients of this service. For e.g., request response messaging formats and the contract of what the service offers.
3. Service Autonomy:
Services should control the underlying functionality and evolve independently without affecting other services.
4. Service Granularity:
Services should be designed to be sufficiently granular.
5. Service Composability:
Services could be used to compose multiple services into a bigger service which is well orchestrated.
6. Service Discovery:
Services should be self-discoverable.
7. Service Loose coupling:
Services should be loosely coupled and should use open standards for communicating amongst themselves. Loose coupling of services allow for independent evolution of services.
8. Service reusability:
Services should be designed by keeping reusability in mind. A service should offer specific functions with a well-defined context and the service could be potentially reused across the enterprise.
The principles of SOA are independent of the implementation technology and there are lots of technologies which enable SOA adoption.
For messaging protocols, we can use SOAP or REST and Synchronous or/and Asynchronous modes of communication could be used.
For service orchestration, technologies like BPEL (Business Process Execution Language) which provides a language context for composing services could be used. There are a lot of commercial and open source vendors who support BPEL.
SOA tools like Mule ESB, Oracle ESB, WSO2 etc. provide SOA implementations with features like service bus, message transformation, routing etc.