User:Etan Wexler/Representational State Transfer

Representational State Transfer (REST) is a style of software architecture for hypermedia systems of global scale, systems like the World Wide Web.

Origins
Roy Fielding iteratively and collaboratively developed the ideas of Representational State Transfer, beginning in 1994 and culminating in his 2000 doctoral dissertation, “Architectural Styles and the Design of Network-based Software Architectures”. .

(motivations: chapters 4 and 6)

Terminology

 * software architecture : ...
 * architectural style : ...
 * principle : ...
 * architectural element : ...
 * architectural property : ...
 * datum : ...
 * data : ...
 * component : ...
 * connector : ...
 * distributed : ...
 * network-based : ...
 * Internet-scale : ...

Principles
Fielding refers to principles of software engineering.

Abstraction
Abstraction is the “hiding [of] some of the details of a system through encapsulation in order to better identify and sustain its properties”.

Architectural elements
...

Components
...

User agent
...

Origin server
...

Proxy
...

Gateway
...

Connectors
...

Client
...

Server
...

Cache
...

Resolver
...

Tunnel
...

Data
...

Resource
...

Resource identifier
...

Representation
...

Representation metadata
...

Resource metadata
...

Control data
...

Architectural properties
...

Network performance
...

User-perceived performance
...

Network efficiency
...

Scalability
...

Simplicity
...

Evolvability
...

Extensibility
...

Customizability
...

Configurability
...

Reusability
...

Visibility
...

Portability
...

Reliability
...

Architectural constraints
A system which follows REST
 * has clients that initiate communication, sending request messages to servers, which respond with response messages;
 * maintains state of any given session on the client, not on the server;
 * communicates state in request messages at a level sufficient to let a server understand and correctly process the request messages;
 * provides caches which store response messages and from which the system delivers a response message to those request messages which are substantially similar to the request message that first prompted the response message;
 * identifies resources, which are things of any type, using resource identifiers, which are relatively small data of a single type;
 * manipulates resources through representations, which are the combination of a byte stream and metadata, where the metadata enable correct interpretation of the byte stream;
 * describes each message within that message;
 * encapsulates application state in hypermedia;
 * separates functionality into layers, each of which relies on an immediately underlying layer to provide certain services (the bottom layer relying on a layer outside the system), and each of which provides certain services to the immediately overlying layer;
 * allows program code in representations in response messages.

Advertised benefits
(constraints induce properties)

Fielding constructed REST to contend well with heterogeneous software, global scale, partial failure, administrative boundaries, trust boundaries, and the scope of human discourse.

World Wide Web
The World Wide Web (sic) is the most prominent example of an application whose architecture largely adheres to REST. Key technologies of the World Wide Web include Uniform Resource Identifiers (URIs) and version 1.1 of the Hypertext Transfer Protocol (HTTP/1.1).

(chapter 6: evaluating the WWW, applying REST)

REST outside the Web
Aside from the World Wide Web, certain architectures have characteristics of REST:
 * Content repository API for Java (JCR)

Popular usage of the name
The name “REST” is, circa 2006, finding frequent use in a loose sense to describe some programmatic interfaces to portions of the World Wide Web that use Extensible Markup Language (XML), YAML, Javascript Object Notation (JSON), or plain text over the Hypertext Transfer Protocol (HTTP) without an intermediate messaging layer. This usage of the name “REST” serves to distinguish the interfaces from those interfaces which employ Simple Object Access Protocol (SOAP) or remote procedure call (RPC).

(RPC has no intermediate messaging layer: how does RPC differ from soi disant REST?)

Neologisms
People have coined new words around REST. Systems that obey the REST constraints are RESTful (sic). Some of REST’s advocates call themselves “RESTafarians” (sic), the label being a pun on “Rastafarian”.