Docstoc

REST

Document Sample
REST Powered By Docstoc
					 Principled Design of the Modern
        Web Architecture
       Roy T. Fielding and Richard N Taylor


References:
1.   Roy T. Fielding and Richard N. Taylor. ”Principled Design of the Modern Web Architecture.
     In Proc. 22nd International Conference on Software Engineering (ICSE'2000), pages 407-416,
     Limerick, Ireland, 4-11 June 2000. IEEE CS Press
2.   http://www.ics.uci.edu/~fielding/talks/webarch_9805/index.htm (9 december 2002)
3.   http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm (9 december 2002)
4.   http://www.xml.com/pub/a/2002/02/20/rest.html (9 december 2002)
5.   http://internet.conveyor.com/RESTwiki/moin.cgi/ShortSummaryOfRest (9 december 2002)
REpresentational State Transfer
           (REST)
”REST is an abstract model of the web
architecture to guide our redesign and
definition of the Hypertext Transfer
Protocol and the Uniform Resource
Identifiers – the goal is to provide a model
of how the world wide web (web) should
work” (Fielding an Taylor 2000)
Fundamental issue – an example
                          http://www.idi.ntnu.no/emner/dif8914/index.html




      Client
                                                                        Resource

                                    Course Material
                                        DIF8914


 The user wants to fetch a webpage (resource) and does that by selecting a link (URL). In
 return the user gets a Representation of the resource (the course material in DIF 8914).
 The client application is now in a state holding a representation of the course material in
 DIF 8914. Within this file the user discover other links, and by selecting one of these the
 user changes the state of the client application (a representation of another resource is
 downloaded and rendered). between each resource representation the client application
 changes state (it transfers).  Representational State Transfer
      Important issues in REST
• Scalability of component interactions
   – Distributing, components, reducing server processing
• Generality of interfaces
   – All resources are accessed using a generic interface
     (http methods)
• Independent deployment of components
   – components can be connected dynamically (new clients
     to old servers, …)
• Intermediary components
   – reduce interaction latency, enforce security, encapsulate
     legacy systems
Fundamental architectural elements
• REST encompasses the fundamental
  constraints upon components, connectors,
  and data that define the basis of the Web
  architecture, and thus the essence of its
  behavior as a network-based application.
                  Data elements
Data Element            Modern Web Examples

resource                the intended conceptual target of a hypertext reference

resource identifier     URL, URN

representation          HTML document, JPEG image

representation metadata media type, last-modified time

resource metadata       source link, alternates, vary

control data            if-modified-since, cache-control
                        Connector types
”The connectors present an abstract interface for component communication”


All interactions are stateless            Connector         Modern Web Examples
1.   connectors need not retain state
                                          client      libwww, libwww-perl
     between requests
2.   interactions can be processed in     server      libwww, Apache API, NSAPI
     parallell
                                          cache       browser cache, Akamai cache network
3.   intermediary can view and
     understand a request in isolation    resolver    bind (DNS lookup library)

4.   forces all info needed for caching   tunnel      SOCKS, SSL after HTTP CONNECT
     to be present
  Component types
(processing elements)

Component           Modern Web Examples

origin server Apache httpd, Microsoft IIS

gateway      Squid, CGI, Reverse Proxy

proxy        CERN Proxy, Netscape Proxy, Gauntlet

user agent   Netscape Navigator, Lynx, MOMspider
       Architectural views
For describing how the elements work
together to form an architechture
             Process view
• For eliciting the interaction relationship
  among components by revealing the path of
  data as it flows through the system
             Connector view
• Mechanics of the communication between
  components
• Particularly interested in the constraints that
  define the generic resource interface
                Data View
• A data view of an architecture reveals the
  application state as information flows
  through the components
             Concluding remarks (1)
derived from http://internet.conveyor.com/RESTwiki/moin.cgi/ShortSummaryOfRest (9 december 2002)



• Data elements are accessed through a
  standardized interface.
• Components communicate by transferring
  representations of resources through this
  interface rather than operating directly
  upon the resource itself.
• Connectors present an abstract interface
  for component communication, hiding the
  implementation details of communication
  mechanisms.
             Concluding remarks (2)
derived from http://internet.conveyor.com/RESTwiki/moin.cgi/ShortSummaryOfRest (9 december 2002)



• Components use connectors to access,
  provide access or mediate access to
  resources.
• All requests made to connectors must
  contain all the information necessary for
  the understanding of that request without
  depending on any previous request, i.e.
  they are stateless.
• It is important that intermediaries are an
  explicit aspect of the architecture and
  because of REST's characteristics, these
  intermediaries can be more than just

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:5/27/2013
language:English
pages:14
langkunxg langkunxg http://
About