Monday, November 7, 2011

Services! Get Your Services Here!

So what is a Web Service, you say?  According to the W3C, the World Wide Consortium that develops web standards, "a web service is a software system designed to support inter-operable machine-to-machine interaction over a network. It has an interface described in a machine-process-able format (specifically WSDL [web services descriptive language]). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards."  If that just sounded like a bunch of techno-babble, read on!  And hopefully, I'll explain it in plain English for you. 






A web service is a way that one server can speak to another server without any human interaction.  Many online functions can be done with web services, such as online web payments, fraud detection, and package tracking.  There are two primary categories of web services: the "Big Web" service and the "RESTful" service.
The "Big Web" service utilizes XML (extensible markup language), specifically the WSDL and the SOAP standard, to deliver interoperability for remote procedure calls (RPCs) and messaging integration between systems.  The WDSL, the web service descriptive language, is a way to describe the end points of a service call no matter of the format of the message.  The Simple Object Access Protocal (SOAP) is made up of three part: envelope that defines the architecture, a set of encoding rules, and a definition for representing RPCs.  SOAP can be used with many other protocols but primarily with HTTP and HTTP extensible framework.  A "Big Web" service that utilizes SOAP must have these three components:  a formal contract that defines how the web service will interact, must be able to handle complex nonfunctional requirements, and must be able to run asynchronously.  Here are a few examples of  "Big Web" services in action using AJAX: Big Web Examples (IBM)


The "RESTful" service, Representational State Transfer service, limits its architecture to a smaller, standard group of operations such as GET, POST, and DELETE for HTTP making it simple, lightweight, and fast.  This form of web service primarily focuses on stateful resources and the usage of clean URLs.  "RESTful" services can be created in three ways:  using WSDL and SOAP, as an abstraction on top of SOAP, or without SOAP at all. The design of a "RESTful" service is based around resource identification through URIs, having a uniform interface, using self-descriptive messages, and utilizing stateful interactions through hyperlinks.  Here is a similar example to the "Hello World" "Big Web" service example provided above, but this time developed using the "RESTful" implementation:  RESTful Example (Oracle)


So which one do you use?  When comparing the two types, there are four criteria to review.  The first criteria is how you want to use the web.  "Big Web" simply uses the web as a transport medium where as "RESTful" services use it for publishing information.  The next is how much heterogeneity is needed.  "RESTful" systems rely solely on HTTP data types where are "Big Web" is more robust and allows for more customization to connect to legacy systems written in different language such as COBOL.  Another consideration is how loosely coupled should the interacting systems be, or the client to server relationship.  "RESTful" web relies heavily on HTTP connections, but if the web server is down then no transaction can be performed.  This can be overcome however with dynamic late binding, where the server is located at the time of the transaction.  "Big Web" however does not have either the time/availability issue or the location issue.  "RESTful" web services are better suited for basic, ad hoc integration, such as most things over the web, and are relatively inexpensive to develop since they use a light weight architecture. "Big Web" services are better suited for when quality of service really matters, i.e. enterprise application integration.  "RESTful" web services are also better suited for web applications since most clients can consume them letting the server side evolve and scale.

Well that was a quick and dirty overview of the two main types of web services available.  Please check out the links throughout for some additional reading and my sources.

No comments:

Post a Comment