SOA stands for service oriented architecture. Before we define SOA lets first define a service. In real world service is what we pay for and we get the intended service. For instance you go to a hotel and order food. Your order first goes to the counter and then it goes to the kitchen where the food is prepared and finally the waiter serves the food.
Figure: - Hotel and services
So in order to order a item from a hotel you need the three logical departments / services to work together (counter, kitchen and waiter).
In the same manner in software world these services are termed as business services. They are self contained and logical. So let’s first define a business service, SOA definition will be just an extension of the same.
Definition of business service: - It’s a logical encapsulation of self contained business functionality.
For instance figure ‘order system’ shows a simple ordering system which is achieved by different services like payment gateway, stock system and delivery system coming together. All the services are self contained and logical. They are like black boxes. In short we do not need to understand the internal details of how the business service works. For the external world it’s just a black box which takes messages and serves accordingly. For instance the ‘payment gateway’ business service takes message ‘check credit’ and gives out output does the customer have credit or not. For the ‘order system’ business service ‘payment gateway’ service is a black box.
Figure: - Order system
Now let’s revise some bullet points of SOA before we arrive to a definition of SOA.
• SOA components are loosely coupled. When we say loosely coupled means every service is self contained and exist in alone logically. For instance we take the ‘payment gateway’ service and attach it to a different system.
• SOA services are black boxes. In SOA services hide there inner complexities. They only interact using messages and send services depending on those messages. By visualizing services as black boxes services become more loosely coupled.
• SOA service should be self defined: - SOA services should be able to define themselves.
• SOA Services are maintained in a listing: - SOA services are maintained in a central repository. Applications can search the services in the central repository and use them accordingly.
• SOA components can be orchestrated and linked to achieve a particular functionality. SOA services can be used/orchestrated in a plug and play manner. For instance figure ‘Orchestration’ shows two services ‘Security service’ and ‘Order processing service’. You can achieve two types of orchestrations from it one you can check the user first and then process order or vice-versa. Yes you guessed right using SOA we can manage work flow between services in a loosely coupled fashion.
Figure: - Orchestration
So let us define SOA.
SOA is a architecture for building business applications using loosely coupled services which act like black boxes and can be orchestrated to achieve a specific functionality by linking together.
Asked In: Many Interviews |