REST White Paper
REST White Paper
Long before SOA became a buzzword and SOAP became a necessary part of our SOA
infrastructure, there was REST. And though SOAP and its other WS-* specs have stolen the
limelight from this alternative service-oriented architecture, REST is gaining a lot of traction as
Web 2.0 takes the Internet by storm.
REST (Representational State Transfer) which was detailed in Roy Thomas Fielding's doctorate
dissertation "Architectural Styles and the Design of Network-based Software Architectures" in
year 2000, which can dramatically reduce the investment necessary to provide service-oriented
access to enterprise resources. Fielding used the term to describe a technique and best practices
for retrieving data formatted in XML over HTTP for use in applications.
The Fundamentals
Resource: A resource is something identified by a URI, retrievable. On the Web, it’s not a
resource that is retrieved, but a representation of a resource.
Advantages of REST
It uses well documented, well established, well used technology and methodology.
It's already here today; in fact it's been here for the last 12 years!
Resource centric rather than method centric.
Given a URI anyone already knows how to access it.
It's not another protocol on top of another protocol on top of another protocol on top of...
The response payload can be of any format (some may call this a disadvantage, however the
Web copes with it, it's just a case of defining the application grammar).
Uses the inherent HTTP security model, certain methods to certain URIs can easily be
restricted by firewall configuration, unlike other XML over HTTP messaging formats.
REST makes sense, use what we already have; it is the next logical extension of the web.
The WEB 2.0 has gain tremendous attention in the recent years. However, ignoring REST in WEB
2.0 is like saying if it’s a liquid, it can be drunk by humans. Sure, humans can drink anything that
is a liquid, but the bigger question is, will you survive? Sometimes you will, and sometimes you
won’t!
As they say "A picture says a thousand words", The Role of REST in WEB 2.0 can be understood
from the image given below:
RESTifying SOA. (SOA everywhere, Heard of WOA !!!! )
WOA is the most interoperable, easiest to implement, and most highly scalable technique for
building great, open Web services that anyone can use. But it is definitely not the hammer for
every job. Certain applications, particularly in the high-end of the enterprise, just flat-out require
the more sophisticated portions of the SOA stack.
REST in Co-Evolution of SOA and Web 2.0
However, there is also where the differences start. Interoperability is accomplished very
differently in Web 2.0 than it is in formal SOA. Web 2.0 adherents tend to let others integrate
with them using Web-Oriented Architectures (WOAs) based on REST, JSON, and
POX/HTTP more than the SOAP approach that enterprises often prefer. SOAP is the
underpinning standard of the majority of SOAs, and complex variants collectively known as
WS-* are on the way to increase SOAP's features for the enterprise by adding transactions,
policies, advanced security, routing, and much more.
Well, that depends on the situation and the need. Similarly Web services work well with both the
styles of use (i.e REST and SOAP). In a highly competitive business environment, the risk of lost
time and investment means that making the best decision up front is vital to success.
Web services are about interoperability, and SOAP and REST deliver the goods. We can use
either SOAP or REST to build web services. But what is the best way to create a loosely-coupled
Service interface? That again depends on the enterprise. The business doesn’t care about the
resources or even the Services themselves, but rather the business value that result from
interacting with those resources and Services. It’s up to the architect to understand when to apply
different architectural and implementation styles to best address their organization’s ongoing
business challenges.
“Finally we conclude by stating that REST is here to bring out the better of two worlds namely
SOA and WEB 2.0”