100A Web service is a self contained and self describing application that is available over networks, Internet or intranet. In other words, web services are applications that can be published, located and invoked over networks.
Common Facts About Web Services
- Web services usually include combination of data and programming.
- Web services are really encapsulated so that implementation would never be visible from outside.
- Web services are loosely coupled because of which changes in the implementation do not need changes to the invoking function.
- Web services use a standardized XML messaging system to get invoked and to send response. As every communication is in XML, web services are not tied to any specific programming language or operating system. This interoperability makes web services very popular and widely used. A collection of open protocols or standards including HTTP, HTML, XML, TCP/IP etc are used in case of a web service in order to exchange data. Interoperability is achieved by using these open standards.
- You can build a web service using C# and the same can be invoked from an application which is based on Java Server Pages. The whole application could be running on Linux platform. Similarly, a Java based web service can be accessed from a Visual Basic application. In short, web services can communicate in a programming language and platform independent manner.
Web Services are Not New
Web service is not completely a new concept. Instead, it is just an evolution of the concept of distributed computing. In distributed computing, a client initiates an activity and the server completes it. Here, web services also get initiated by a system and completed by another system. Anyhow, the underlying layers that perform data manipulation and application logic operate differently in distributed computing and web service architecture.
Creating a Web Service
To make a web service available over Internet, three components are mainly required. They are
- Service Provider
- Service Requester
- Service broker
Service Provider
Service provider provides the service and it publishes all its services to a service broker.
Service Requester
Service requester asks service broker to find a suitable service provider and then enjoys the service of the provider by directly binding to it.
Service Broker
Service broker could be considered as a directory of services and acts as a broker between provider and requester. It helps requester to find a suitable service provider and provider to make the requestor know that such a service exists.
These three components use technologies including
- XML (eXtensible Markup Language)
- WSDL (Web Services Description Language)
- SOAP (Simple Object Access Protocol)
- UDDI (Universal Description Discovery and Integration)
Web Service – Real Word Example
You might have noticed weather forecasting systems or weather reports in many of websites. Do you think that it is developed by the technical team who designed the website? In most of the cases, it would be made available as a service from a web service provider who had already developed and made it ready for use. So, if you wish to include a weather forecasting system in your website, you just need to find the web service that provides weather reports and do necessary steps and make it available on your website. You might also have seen stock price information, flight reservation service, currency conversion etc with many websites. All these are made available as service over Internet.
Summary
There are many advantages for web services in cloud computing. First and foremost is reusability. Being a programmer, you might have spent hours and hours to develop a weather forecasting system. If you are ready to make it available as a service over Internet, why others have to spend time again for the same development process? Another advantage is interoperability. How nice it is when a .Net application communicates with a java web service without investing much to make it possible.