Prev | Current Page 277 | Next

Brad Ediger

"Advanced Rails"

The term was
coined by Roy Fielding, coauthor of the HTTPspecification, in his 2000 doctoral dissertation
Architectural Styles and the Design of Network-Based Software Architectures.*
The dissertation extracts a set of principles that are common to network architectures,
based on an examination of the structure of the Web and the HTTPprotocol.
Starting with the ???null style,??? which is the absence of constraints on architecture,
Fielding arrives at REST by placing a series of constraints on network architecture:
Client-Server
The client-server constraint imposes a separation of data storage from user interface
and presentation. The most important benefit of this separation is that client
and server can exist in separate organizations and be maintained, developed,
and scaled independently.
* Available from http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm.
186 | Chapter 7: REST, Resources, and Web Services
Stateless
The server may not hold persistent state about its sessions with the client. Each
request from client to server is independent and self-contained. This increases
verbosity, but aids reliability and scalability. When there is little or no stored
context on a server, the system is more resilient to periodic failure, and there are
fewer requirements for inter-server coordination when the system is scaled up.
Cache
This step requires the server to indicate whether or not the client may cache a
response, and to define parameters for such caching.


Pages:
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289