Thursday, November 10, 2011

Week 12 MIST 7500 - Web Services







So what exactly is Web Services?  According to WC3 the definition of Web Services is:

A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). 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.

Sounds rather complex, but when you think about it simply, it's basically one machine talking to another without human intervention over some medium. 




One of the things we have been doing this semester is using Amazon's Web Services (or their Cloud technology).  No longer do we need physical machines to house our apps or databases, we can store all of them on the cloud and they can easily speak to one another through the necessary protocols. 

So what is Big Web Services?

Big web services use XML messages that follow the Simple Object Access Protocol (SOAP) standard, an XML language defining a message architecture and message formats. Such systems often contain a machine-readable description of the operations offered by the service, written in the Web Services Description Language (WSDL), an XML language for defining interfaces syntactically.

SOAP is mostly used for Enterprise applications to integrate wide types and no. of applications and another trend is to integrate with legacy systems, etc. On the Internet side of things — Google is consistent in implementing their web services using SOAP, with the exception of Blogger, which uses XML-RPC.

What is REST?
 
REST defines a set of architectural principles by which you can design Web services that focus on a system's resources, including how resource states are addressed and transferred over HTTP by a wide range of clients written in different languages. If measured by the number of Web services that use it, REST has emerged in the last few years alone as a predominant Web service design model. In fact, REST has had such a large impact on the Web that it has mostly displaced SOAP- and WSDL-based interface design because it's a considerably simpler style to use. 

Differences between the two:

The main advantages of REST web services are:
  • Lightweight – not a lot of extra xml markup
  • Human Readable Results
  • Easy to build – no toolkits required
SOAP also has some advantages:
  • Easy to consume – sometimes
  • Rigid – type checking, adheres to a contract
  • Development tools

For consuming web services, its sometimes a toss up between which is easier. For instance Google’s AdWords web service is really hard to consume, it uses SOAP headers, and a number of other things that make it kind of difficult. On the other hand, Amazon’s REST web service can sometimes be tricky to parse because it can be highly nested, and the result schema can vary quite a bit based on what you search for.

Bottomline:  Choose Wisely!

No comments:

Post a Comment