Monday, May 19, 2008

Web Services - What, Why, How, and Shortcomings


Web Services

W3C defines it as a "software system designed to support interoperable Machine to Machine interaction over a network". Web Services are actually Web based (http protocol based) appications or components that use XML-based standards and protocols to communicate with the clients. Web Services are language and platform independent as XML is a standard and it uses XML-based open protocols for expressing requests and responses and hence eliminates the dependence on the underlying operating system and programming language.


A Web Service normally implements a discrete business functionality completely. It's self-contained and self-describing and discovered using UDDI. An application based on Web Services is loosely coupled and easier to develop and maintain as the requirements are broken down into various modules, which are designed and developed almost independently and in parallel. The granularity of the services play a big role here. There will always be a trade-off between network latency and ease of use for coarse-grained and fine-grained services. The choice is dependent mainly on the context you're supposed to use the service in.


Why Services?

  • Platform Independence
  • Interoperatability
  • Faster Development
  • Easier to maintain/upgrade with least down-time
  • Integration
  • Modular Approach


How does it work?


A Web Service is a Web based application that means it's 'http' protocol based. It uses XML as a language for communication between different platforms. The Web Services platform can be broken down in three elements which are:

  • SOAP (Simple Object Access Protocol) - this is the communication protocol used by Web Services to communicate between application. SOAP is a XML based protocol and it facilitates a standard format for sending messages over http. Since, it's XML based, so it's extensible and language independent.
  • UDDI (Universal Description, Discovery, and Integration) - It's a directory for storing information about Web Services. The information is stored in form of WSDL documents.
  • WSDL (Web Services Description Language) - As the name suggests, WSDL is a XML-based language which describes a Web Service. A WSDL document gives answer to these questions: What the Service takes as input(s) and what it returns as output, How the Service can be accessed, Where the Service is located. (Note: A detailed post on the details of WSDL will follow soon.)


Shortcomings of Web Services


Platform and Language independence comes with one inherent limitation that a Web Service call will be relatively slower. This is due to the network latency, time taken in conversion to and from XML while sending and receiving requests and responses.


This architecture is still in the very early stages and many new features and enhancements are still awaited. Features like Security and Routing are still missing and hopefully they will also be introduced very soon.


Update[Aug 08, 2008] - WSDL - Web Services Description Language



Share/Save/Bookmark


1 comment:

Manish said...

Good post with an excellent structure. I messed things up in my last interview in answer to questions on Web Services. My answer to the Shortcoming ( I was asked as Limitations) was the worst :-) Now I know what and how to answer those questions. Thanks.

I found the whole site very impressive. Please continue doing good work. I'm waiting for the post on WSDL.