Architecture

What are Web Services

Web Service

What is a web service – a 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

  • what-are-web-servicesWeb 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 services are 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, these components are mainly required. They are

  • Service Provider
  • Service Requester
  • Service Broker

Service Provider

This is the system that provides the services to other applications. It hosts the web service and makes it available to client applications. The provider implements the service and makes it accessible over the Internet, often by deploying it to a web server.

Service Requester (Client)

This is the application or system that consumes or uses the services provided by the service provider. The client makes requests to the web service, often over the HTTP protocol, and handles the responses. Clients can be anything from other web systems to mobile applications.

Service Broker

Often considered part of the service registry or as a mediator between the service registry and the requester, the service broker helps clients find and bind to web services. Its primary functions include:

  • Service Discovery: Helping clients find the web service that fits their needs.
  • Service Binding: Assisting in the setup of a communication session with the web service.
  • Service Resolution: Often, a broker may resolve which service out of multiple available ones best matches the requester’s criteria.

These components use technologies including

  • XML (eXtensible Markup Language)
  • WSDL (Web Services Description Language)
  • SOAP (Simple Object Access Protocol)
  • UDDI (Universal Description Discovery and Integration)

Service Registry

While not always used, a service registry acts as a centralized directory where service providers can publish new services or update existing ones, and where service requesters can find services and obtain details about service interfaces. A common example of a service registry is the Universal Description, Discovery, and Integration (UDDI) registry, although with modern web services, discovery is often handled through other means, such as well-documented APIs available publicly on the Internet.

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.

Show More

Apps Developed

Apps Developed provides you with the latest information on app development including mobile app development, web app development and cloud development.