REST Moves To Put XML Data Sharing in Motion

As developers of web services become more interested in ways to support asynchronous communications, various vendors are pushing to improve SOAP-RPC capabilities. Meanwhile, another approach called REST (Representational State Transfer) is gaining developer attention as a way to tie together hundreds -- if not thousands -- of Internet nodes.

Tags: Web Services, Developers, HTTP, Internet, Architecture, SOAP-RPC, Standard,



REST (the term and the concept) was first developed in a doctorate dissertation in 2000 by Roy Fielding, Chairman of the Apache Software Foundation and chief scientist at Day Software Inc., an Internet content management firm. Fielding lays out the case that REST is a distributed computing framework that stresses component interaction and scalability. When implemented correctly, REST can speed dataflow between XML-based Internet servers.



The REST of the Story

According to the REST backers, the Web already has a robust, secure, tested architecture for distributed computing, based on common formats, a standard protocol, and most importantly, a standard naming system URLs and (Uniform Resource Identifiers) URIs.



In specific, REST architecture is based on components already in place that developers are using today to create Web services -- XML, HTTP, and URIs. The idea is that instead of exposing your APIs using a SOAP-RPC model, you use the methods that have already been developed for HTTP --- GET, POST, DELETE, and POST, for example -- to manage XML-formatted data that is organized by URIs.



One Web service that could be re-architected along REST guidelines is UDDI. In his introduction to REST-based Web services, XML guru Paul Prescod shows how UDDI's http://www.webservices.org/index.php/article/articleprint/498/-1/21/
Universal Unique Identifiers (UUIDs) could be replaced with URI-addressed XML documents, and how its specialized methods could be replaced by HTTP methods.



The prominent REST website, RESTwiki, describes why REST is good for data and document collection and sharing over the Internet. "No matter what web server you have, and no matter what web client I have, I know if I see a URL of yours like http://conveyor.com/RESTwiki/, that I can retrieve its contents using HTTP methods, with no advance co-ordination needed, or that I can attempt to manipulate its content with PUT and POST (but that it can tell me, via an HTTP response status code, whether this is ok or not, and why)."



Is it REST versus SOAP-RPC?

One of the reasons why REST has not been more widely adopted is because nobody is marketing it. Although the ideas behind REST have been around for a couple of years, there is no REST consortium, or even any REST standards to develop. It simply represents a different way of thinking about Web services, but one that its proponents argue can take advantage of the performance, security and namespace advances that have been built into the Internet over many years.



So is it REST versus SOAP? Not exactly, according to REST advocate and Idokorro Mobile CTO Mark Baker. SOAP has a "very valuable role in the context of REST," Baker told IDN, but added he's "not very optimistic about its future." Why? "SOAP has come to be synonymous with RPC. If it doesn't break free of that soon, people will start associating their Web services failures with SOAP."



Nonetheless, some REST proponents claim that SOAP-RPC is not as well-suited to enabling the efficient sharing XML-based data or documents over the Internet because SOAP and RPC rely on pre-XML approaches to sharing, using DCOM and CORBA.



For those developers looking to learn more about how to use REST in their applications, Baker advises developers to "study how forms work, how GET and POST are used to coordinate buying books on Amazon, or subscribing to a newsletter. Then think hard about what it would take to follow that same style of computation for machine-to-machine tasks."



More REST Resources & Links



  • Developers interested in learning more about the thinking behind REST Web services can look at REST creator Roy Fielding's dissertation on line from the University of California (Irvine) website. You can also view a slide presentation from Fielding called, "An Architectural Style for Distributed HyperMedia Interaction," which summarizes his views, and compares REST with other historical computing architectures, including client/server, remote access, pipe and filter, among others.



  • Dedicated to all things REST, the RESTwiki site has the most comprehensive set of REST links, a quick 10-minute REST FAQ, as well as an interesting page on convertingXML-RPC or SOAP-RPC to REST.



  • RESTwiki also provides some getting-started code examples for REST adventurers. Noted from the site, "Here are some pseudo-coding examples to illustrate some ideas of REST and HTTP." Examples focus on four aspects of REST : (1) addressable resources; (2) generic interfaces; (3) 'representations'; (4) and stateless messages.



  • IDN found one of the best interviews on "real world" of REST at the Tech Target network of sites. A discussion with Roy Hoobler, director of Internet technologies for Net@Work Inc lays out the evolution of REST thinking -- and how developers can use it for problem-solving.



  • As a follow-up piece to his XML.com introduction to REST, Paul Prescod has written an excellent explanation of the REST approach to asynchrony, addressing, and maintaining shared context between applications.



  • Idokorro Mobile's Mark Baker has given an interesting explanation of why HTTP "defines the single most general coordination language ever developed."




    back