Sunday, February 18, 2007

SWS - Web Services Revisited

Today while reading a paper on Semantic Web Services I just did a google on Web Services. Guess what? Google search result returned 1,250,000,000 ie 1.25 billion pages. Well I cannot blame google here as every third page(technical) in the world talks about Web Services, SOA, REST, UDDI etc :). Sometimes I wonder how it is going to be developing applications in 5-10 yrs time. We will be developing services and that will be sold by the companies worldwide.

More than enough can be found about what the Web Services are and how important they are in current world etc. So I would rather not go into that detail and concentrate on bullet-points instead.

What makes a Web-Service special? This is the question many people asked me in the initial days of Web-Services. Well we all (most of us) come from an OO Programming background where we learn to use (rather re-use) classes. Web-Services take this concept of re-usability to the next level where we can re-use the application as it is. In real world OO can be explained as talking to someone about how the car looks like and WS is actually handing over the car-keys to him.

What was there Before Web-Services?
Before we got acquainted with Web Services we had few technolgies in past. The computer system started with a piece of monolithic application and then we moved to 2-Tier, 3-Tier and n-tier application where we created abstraction or layers in between logical separation of application components (eg Presentation, Business Logic, Data Access etc). When we moved our applications to n-tier we came across several technologies which helped client application to commonicate with server component.

Before we reached to Web-Services we had Remote Procedure Call(RPC), Common Object Request Broker Architecture (CORBA), Component Object Model(COM) and Distributed COM (DCOM), Remote Invocation Method(RMI), Messaging(IBM MSMQ) etc. The common thing among all these technolgies were that they viewed application as components and their primary focus was to use component's functionality in a way that it could be independent of Hardware Platform, Location, Language, Operating System etc. Upto an Extent they did succeed in achieving the same.

Technology Enablers for Web-Services: A while ago there were talks about Application Service Provider (ASP) model. The idea was to enable organizations renting their applications from ASP vendors and not to worry about hardware purchase, software license, upgrades, availability, scalability etc. Though this idea died prematurely, the Web Services are expected to bring renaissance to the ASP model. Lets have a look at the technologies which enable Web-Services.
  1. Extensible Markup Language(XML) is to data of Semantics what HTML is to rendering of Web documents. XML does not impose a set of pre-defined tags like HTML does. The beauty of XML document is that it is hierarchical in nature. A XML document is called Well-Formed if it confirms to the basic syntax rule of XML and is valid if it is Well-Formed and confirms to the rule of DTD or XML schema.
  2. Web Services Description Language (WSDL) is used to describe Web Services. The WSDL document provides enough information about how to interact with the Web-Services. The WSDL document contains Five Elements three abstract elements and two concrete elements.
    • The Abstract Elements define the interfaces. Types are embedded XML schema where data types are defined; messages describe details of methods and their parameters; portType defines operation in terms of input/output messages.
    • The Concrete Elements on other hands defines physical properties; binding provides protocol information for the operation and service address provides URI for locating a service.
  3. The Simple Object Access Protocol (SOAP) is an XML based communication protocol and encoding format for inter-application communication. This is backbone of Web-Services. SOAP consists of following parts:
    • Envelope header which specifies application level requirements, digital signature
    • Envelope body describes message content and processing instructions. It also contains application specific data like method name, parameters and return values.
    • Encoding rules which is used for application defined data types based on W3C XML schema specifications.
    • The RPC conventions specifies a convention for representing Remote Procedure Calls and responses.
  4. Universal Description Discovery and Integration (UDDI) registry is a collection of information on all the registered web services. Its main purpose is enabling dynamic discovery of Web-Services. It is a free public registry. Vendors publish their services and consumers search for Web Services they need. The UDDI has three major components:
    • white pages which contains address, contact details and known identifiers for the Web Services.
    • yellow pages contain industrial categorization of the Web Service based on standard taxonomies.
    • green pages contain technical information about services.
How are Web Services Used?
  • Web Services are provided over HTTP protocol. When a Software is available as Web Services it takes away the issues like platform, hardware, Operating system, programming language etc from the organization using it. This opens a whole new way of developing applications. In future the applications will be developed by selecting the appropriate Web Services published by different vendors and one application to tie them all together.
  • Large corporations have systems which is been in places for many decades. These systems are running on mainframe and developed using COBOL etc. But even today they are the backbone of the organization. But in todays world the demand has been raised to access those applications over web. Web services are used here to provide a wrapper for the legacy system using Web Services framework.
  • In the global economy an organization needs to lias with multiple vendors, customers etc and most of the time they are spread globally. Web-Services are useful there to develop an interorganizational system which can interoperate with applications of Vendors, Customers etc.
  • Business Process Integration (BPI) is a methodology of coordinating and executing sequence of steps to accomplish a Business task. Each step could be a different application which is located at either Customer or vendor site or is internal to the organization.
This is about the Web-Services in a nutshell. Next post onwards will start putting my thoughts on Semantic Web Web Services (SWWS).

Until Next Time...:)

0 comments: