Service Oriented Architecture
Service Oriented Architecture is a technique used in software development based on the concept of Service. A service can be defined as an independent function which is well defined and self contained. In SOA, different services communicate with each other to perform some activity. Even two or more services can be synchronized together to perform some complex activities.
Even though SOA is a new term, the concept of services was introduced long back itself. At that time, it used DCOM or ORB depending on the CORBA requirement. A simple Service Oriented Architecture consists of a Service Provider and a Service Requester. The requester requests for some service and the provider implements the service and returns the result for the request. The communication happens in such a way that it is understandable to both provider and requester. Normally, a service has to be published before its usage. These need to be invoked to get the benefits of the published service.
Web Services
SOA mainly makes use of Web Services in the implementation process. But it does not mean that Web Service is the only method to implement SOA. Other technologies can also be used to implement Service Oriented Architecture. A web service can be defined as a functional component or as an Application Programming Interface (API) which can be accessed over a network. This means that Web services actually reside in some web server and utilized by some Web connected applications.
Web Services are
- Self contained
- Self describing
- Modular
- Language independent
- Interoperable
- Dynamic
As these services are to be available independent of the platform, technologies or even implementations, they have to follow some standards. This is made possible by using some open technologies. They include
- Extensible Markup Language (XML)
- Web Services Description Language (WSDL)
- Simple Object Access Protocol (SOAP)
- Universal Description, Discovery and Integration (UDDI)
Java EE is a development platform which is mainly intended for Web Service applications. The .Net framework can also be used easily for web service development.
Comparison to Object Oriented Programming
Service Oriented Architecture can be considered similar to Object Oriented Programming in many ways. In both these design methods, independent functions are kept to implement the functionality. And some techniques are used to communicate with these independent functions. Even the concepts, like inheritance and data abstraction, exist in both these methods. Both of these techniques ensure reusability, modularity and maintainability.
Entities and Processes Involved
The main advantage of using SOA is reusability itself. In real life itself, suppose you know that one of your friends developed software as part of his project. You are studying in another college and you have to develop another project with some additional functionality to that of your friend’s work. Surely you will try to contact your friend, so that you can save your time and effort by reusing your friend’s work. SOA concept is also somewhat similar to this. Here, you can be considered as a Service Requester and your friend as a Service Provider.
If you already know that somebody else has developed a piece of work which you can completely reuse, you don’t have to again do it. Thus, you can minimize the complexity involved in your work. But, you should know prior which services are available and can be reused. This is done with the help of Service Registry. Service Registry can be considered as a database of Services and Service Description. A Service Provider can publish his services and a Service Requester can find the available services. Service description actually explains the functionality of the service, the ways to reach it, etc. Also, the third party who already developed the reusable code (in the real time example, your friend) should be ready to provide it to you for reusing it. This willingness is ensured with the help of some policies and contracts. And some proper communication should happen between the requester and the provider. After finding the apt service, the service requester invokes the service to make use of it.
Some of the services like weather forecast report, currency converters, etc., are commonly used. Many of the sites show the weather report in their site, and it may not be actually developed by their own team. Here, the requester does not have to know the implementation details of the service. He has to just know regarding the input and output while considering the service. To explain it simply, consider a service “Sum” which adds two numbers and gives the sum as the result (I too know that no service is needed for adding 2 numbers, but imagine just for the purpose of understanding). The requester does not have to know how the service is implemented while using it. He just has to know that he should give two numbers to the service, and it will return a number as the result. Thus, the actual complexity is hidden from the user.
Advantages
SOA allows you to develop a complex product by integrating different products from different vendors independent of the platform and technology. Thus, it helps to manage complexity involved. And making effective use of SOA concepts, client can be competent enough as the time needed for the development is considerably reduced because of the reuse. It allows an organization to leverage existing assets, rather than building a new product from scratch without making use of existing ones. This also reduces the software development cycle and the cost involved, thus a faster time-to-market is made possible.
Disadvantages
SOA would not be suitable for applications with GUI functionalities. Those applications would become more complex if they use SOA which requires heavy data exchange. Also application requiring asynchronous communication can’t make use of SOA. Also in case of standalone and short lived applications’ implementations, SOA will become an added burden.
So, a wise choice is to be made before selecting the architecture for any software application. SOA as a strategic solution can be opted in long term perspective. Thus, make the best use of Service Oriented Architecture in your software development process.