Web Services Architecture

Just for me!!!

A quick primer on web services, lest I forget :):

What is a web service and why is it there?
Two different pieces of hardware running two different pieces of software on two different operating platforms (systems), now they want to communicate accross a network, what will you do, you will write a web service.

What could be the best example of such scenario, ofcourse it is the internet. Millions of completely different systems connected with eachother and wishing to communicate. Do not confuse Communication of these systems with things like emails, online chats etc. It is an actual system to system or software to software or service to service level direct communication.

A bit of history:
It was also possible to achieve this before the advent of Web Services. This was done using Remote Procedure Calls (RPC) for communication between DCOM and CORBA objects. However, this had security and compatibility issues, most of such communication was blocked by proxy servers and firewalls. Web Services came in and used HTTP for communication which is already compatible accross different browsers and systems.

High Level Architecture (kind of :)):
So, a web service will be communicated by an outside system. In such a scenario, the web service has to outline a couple of things for everyone to know, one: What it does, two: How it does it.

So, “what it does” is specified in some document (or agreement) e.g. I am a calculator and I calculate additions, multiplications, subtractions and divisions.

And, “how it does” is actually the architecture of the web service. First of all, what ever is to be specified in this section, it has to be machine readable and processable. If so, this can be done only by a proper programming language. So, the language we use here is called Web Service Definition Language (WSDL). This language defines the architecture of the web service i.e. it defines message formats to be used, what datatypes will be used, what will be the transport protocol for communication etc etc.

Since web service is going to be accessed through the web, it has to expose itself through a network location. That will be the point of contact for the web service. Web service will also use that network location to give some description about itself e.g. message exchange patterns etc etc.

We are talking about message passing among web services, which is a primary way of web service communication. How is that achieved. For that we have got a complete framework know as Simple Object Access Protocol (SOAP). It is web protocol or a standard framework for passing and exchanging messages between web services. It has a complete specification for message formats, Message Exchange Patterns (MEP), underlying transport protocol bindings, message processing models and protocol extensibility. SOAP messages use XML formatted messages which can be carried by HTTP, SMTP, FTP etc etc.

A bit Technical:
A SOAP message is acutally a method invocation of a remote object, and the serialization of the argument list of that method that must be moved from the local environment to the remote environment.

WSDL describes Web Services starting with the messages that are exchanged between the requester and the provider. The messages themselves are described abstractly and then bound to a concrete network protocol and message format.

Web Service definitions can be mapped to any implementation language, platform, object model, or messaging system. As long as both the sender and receiver agree on the service description e.g. WSDL file, the implementation behind the Web Service could be anything.

So, I talked about four necessities for a web service to run:

  1. It shoud decide about Service Provisioning (What is it going to do e.g. im a calculator)
  2. It should provide a Machine Readable/Processable definition of itself  to the world (thats done using WSDL)
  3. Then it should expose itself through a network location so that it can be accessed by other systems in the network (usually internet)
  4. Then there should be a standard way of commnication with the web service (that is done using SOAP messaging)

Hope this helps me–:)

  1. No comments yet.
  1. January 4, 2010 at 9:24 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: