Information Technology Reference
In-Depth Information
nature and uses the HTTP [37] protocol. Requests can also be relayed via a series
of proxies, filters and caches [57].
Fielding [38] defines six core design principles for the REST architecture:
• The key abstraction of information is a resource. Resources are named by
a URL and any information that can be named can be a resource, e. g. a
person, a service, a document etc.
• Resources are represented by bytes and associated metadata to describe those
bytes. Access to the concrete representation of data is therefore via a layer
of indirection.
• All interactions are context free. Each interaction contains all the information
necessary to understand the request.
• A small number of primitive operations are available. These are essentially
the HTTP POST , PUT , GET and DELETE operations.
• Operations should be idempotent and representational metadata should be
provided to support caching.
• Intermediaries are promoted so that requests may be filtered, redirected,
restricted or modified transparently to both the client and the origin server.
Using the REST web service style, one constructs a URL to represent the
particular service (or resource ) offered. For example the URL:
http://www.glam.ac.uk/students
refers to all students at the University of G lamorgan and the URL:
http://www.glam.ac.uk/students/computerscience
refers to a ll students in the computer science department at Glamorgan while the
URL:
http://www.glam.ac.uk/students/psoule
refers to a particular student. Clients access the requ ired student resource using the
URL and a representation of the resource is returned. This representation places
the client in a state, and when another resource is accessed the new representation
that is returned causes the client to be placed in another state. Therefore each
resource representation causes the client to change (transfer) state hence the name
Representational State Transfer.
Due to its simplicity, REST has become increasingly popular as an alternative
form of web services to the SOAP model [42].
5.6.1
REST Protocol Implementation Overview
To implement our REST protocol we use the Restlet framework [2], a simple
lightweight REST framework that is suitable for both client-side and server-side
web applications.
The REST implementation is contained in a single class, RESTProtocol ,
which extends from the abstract Protocol class and supports the following op-
tions:
Search WWH ::




Custom Search