Service-oriented architecture (SOA) is a style of software design in which application components provide services to other components via a communications protocol that is typically over a network.
A service is a function that is well-defined, self-contained, and does not depend on the context or state of other services.
SOA allows various services to communicate using a loose coupling system. This means that the client (the program requesting a resource) of a service remains independent of the service it requires. The client (which can also be a service) can communicate with other services, even when they are not related.
An example of the benefits that SOA brings is that services work and communicate with each other regardless of the programming language they are written in since they send each other data using a predefined communication protocol. This also allows for increased reusability and scalability.
The following diagram gives visualizes SOA:
The following are traits that Service-Oriented Architecture (SOA) provides to meet the service requirements of these new systems:
Interoperability: Ability to function cross-platform.
Loose coupling: Consists of components that can work independently from one another.
Encapsulation: Hides the intricate details of how the system works from the user. However, an interface that describes what the service can do and enables its usage does need to be provided.
Discoverability: Displays its availability to the user.
The terms defined above can be understood through the example of a mobile application.
Suppose that an application needs to have the following generic functionalities:
Showing a map.
Receiving an online payment from the user.
Playing videos.
One possible approach would be to implement each of these functionalities from scratch; i.e., creating your own map, developing a system that handles online transactions, and playing videos from an online database. All of this requires a lot of resources and time.
However, each of these functionalities is now available as a service; for example, Google Maps, PayPal, YouTube, etc. All of these services are:
Interoperable: They work on several platforms (e.g., websites, apps, etc.)
Loosely coupled: If a problem occurs in one service, it won’t affect the other services.
Encapsulated: The application developer only knows the functions provided through the interface. They do not know about the complex inner-workings of the service.
Discoverable: The developer knows its availability for the platform through the service’s information page.
All of SOA’s qualities make it easier for complex businesses to work and expand.