Representational state transfer (REST) is "ideally suited as an implementation for data services," says Peter Lacey,...
senior consultant, Burton Group Inc.
Because the REST style, unlike object oriented programming styles, is all about naming things with Uniform Resource Identifiers (URIs) so they can be retrieved, it is uniquely suited for creating data services applications, he said. He made Burton's case for this use of REST as an addendum to a Webcast the analyst firm did this past week covering how SOA principles apply to data access and management.
Lacey began by explaining what REST is and how it fits into the data services world. "It's a style," he said of REST. It's not a technology. It's a style of distributed computing that promotes a resource as its key abstraction. A resource then is simply anything that can be named, and by named I mean it can be provided with a URI."
In terms of business data, the named resource could be something obvious such as an employee or a stock item or a document, he said.
"But it can also be fairly unobvious things like the third item purchased today, or all sales for 2007, or just the second quarter, or just yesterday, or just yesterday at 3, and so on," Lacey explained. "There is an infinite supply of URIs, which you can use to name an infinite number of resources. In short, a resource is simply data and that's interesting when you're talking about data services."
He said the original paper that first described REST noted that unlike a distributed object system "the nature and state of an architecture's data elements is a key aspect of REST."
"In other words, in REST data is a first class citizen," Lacey said. "Unlike systems like SOAP or DCOM or CORBA where the process is the focus, in REST the data is the focus."
That is what makes REST uniquely applicable to data services, the Burton consultant said.
Get ready for ROA
While acknowledging that everyone is "up to here" with buzzwords, Lacey offered yet another one, resource-oriented architecture (ROA), for data services using REST.
"If REST is a style then a resource-oriented architecture is an implementation of that style in the same way that if object-oriented programming is a style, then Java is an implementation," Lacey said. "resource-oriented architecture is REST applied to the real world."
In that world, he explained, every piece of information has its own URL. HTTP is used to make data and services available over a network. Resources are accessible via a uniform interface. And actions on those resources come down to the four common commands, GET, PUT, DELETE, POST.
"The last critical component in a resource-oriented architecture is that every resource should contain links to other resources," Lacey said. "In other words, we provide discovery. We create a Web so that if I get an employee, it also might provide links to his manager. It might provide links to his department. So I can spider down through my resources and get to the information I want."
He said the concept of using REST for data services is being validated in the emergence of platforms for it, including Astoria, an early beta at Microsoft labs, and an open source platform called SnapLogic. He said alternatively developers can use mature development frameworks that are available including Restlet, which he called the most mature, followed by Ruby on Rails. For Python programmers there is Django and CherryPy.
Beta development projects that may also be helpful, Lacey said, are IBM's Project Zero and Microsoft's .NET 3.5, which will have more REST in it. In the Java world there is JAX-RS, which will provide a REST API for Java, he said.
"All those can be played with today," Lacey said. "The mature products can be used now to build RESTful data services."