Monday, January 23, 2017

Introduction to SOA (Service Oriented Architecture)

Hi all,

In this blog, we will see about What is SOA in a simple way with real world examples.

Before coming to the point what is SOA, we need to know why SOA is needed and why it had been evolved. For this, we will go with simple real world example. Think about an old radio. In there everything is integrated such as FM radio, The cassette player, the speaker ... But if we want a double cassette player or CD player, we have to change the whole thing again and again. But with modular applications, each part is independent. We can add other items to the already available thing. There should be a way to communicate with each component.

Let's apply this scenario to the software industry. Initially, we used standalone application which is run on one computer and do one job. Database, UI, everything is in the simple computer. Then there was a requirement that multiple users need to access at the same time. For that, we got Client Server architecture. This means you have the front end on your machine and database logic & rest of the things in the different machine which is called as a server. Every client calls the same server machine. Then requirements had been grown. So people moved to different architecture 'Multi-tier architecture'. The front end is on your machine. Business logic implemented in different server and DB is on another server. After that people decided to go in distributed applications. For example, one application does a part of the job, another application does that's job and the third application does another job. By integrating all these jobs, you can fulfill your requirement. That means different services and different responsibilities owned by the different applications.

Here you have other problem that how can we inter-connect with these applications. Practically application A can run on the Linux which is implemented using JAVA, Application B runs on windows which are implemented in C#. Here JAVA application needs to communicate with the C# application. So we need the new model. To overcome this scenario we came u with SOA model. SOA means Service Oriented Architecture.

So we need to know what is service? When we connect to the application, the application may not expose everything that it can do. But it may expose certain functionalities to the world. For example, Hotel reservation system may expose register, login, get booking details and book rooms. But all other private functions will keep privately. When they expose the functionalities,  we called it as service. We depend on multiple services to achieve a specific goal. This is what service oriented architecture.

"A set of principles and practices for modeling enterprise business functions as services or micro services which have following attributes."

The features of SOA are

  • Standardized: Support open standards.
  • Loose Coupling: Need to give required data to the interface and expects the response. Processing will be handling by the service.
  • Stateless: The Service does not maintain state between invocation
  • Reusable
  • Autonomic
  • Abstract
  • Discoverable
Couples of example for SOA

  • The supply chain management system should keep an eye on the inventory management system
  • Decision support systems cannot help make useful decisions without insight to all the aspects of the business
In next blog, we will see some more about SOA and WSO2 ESB.

1 comment: