SlideShare a Scribd company logo
1 of 43
Download to read offline
A little REST and Relaxation
ApacheCon


                    Roy T. Fielding, Ph.D.
                     Chief Scientist, Day Software
                     V.P., Apache HTTP Server
                     http://roy.gbiv.com/talks/200711_REST_ApacheCon.pdf




 Leading the Wave
 of Open Source
Between us, we cover all knowledge;
  he knows all that can be known and I know the REST. [Mark Twain]



Representational State Transfer


REST retrospective
What is REST?
Why REST?
REST at Day


Q&A

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   2
Life's race will run, Life's work well done, Life's victory won,
  Now cometh REST. [Dr. Edward Hazen Parker]



Why me?                                                                                                              Oct 07 = 142,805,398 (6,072x)

                                                                                                                                        23,517


             Using XMosaic




                                                                                                                                            L
                                                                                                                                           E
                                                                      libwww-perl




                                                                                                                                        OD
                                                                                                      HTTP editor




                                                                                                                                        M
                                                                                                                                   CT
                                                                                                                                   JE
                                                                                   Relative




                                                                                                                               OB
                            www.ics.uci.edu
                                                                                    URLs




                                                                                                                               P
                                                                                                                               T
                                                                                                                            HT
                                                                                                                          AS
                                                                                                                       NS
                                      wwwstat




                                                                                                                     GI
                                                                                                                    BE
                                                                                            HTML




                                                                                                                ST
                                                                                                      10,022




                                                                                                               RE
                                                                                             2.0
                                             MOMspider                                                                    SJ IETF


                                                          Conditional
                                                                                                      2nd WWW
                                                            GET
                                                                                  2,738
                                                                                            1st WWW
                                                   623
              130

              Jun 93                              Dec 93                           Jun 94              Dec 94                               Jun 95
                                                      Public WWW servers [Matthew Gray]
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                                                      3
Absence of occupation is not REST,
   A mind quite vacant is a mind distress'd. [William Cowper]



The Web Problem (circa 1994)
Early architecture based on solid principles
    ! URLs, separation of concerns, simplicity
         ! lacked architectural description and rationale

Protocols assumed a direct server connection
    ! no awareness of caching, proxies, or spiders
    ! many independent extensions
Emerging awareness of the Web
    ! exponential growth threatened the Internet
         ! commercialization meant new stakeholders with new (selfish) requirements

A modern Web architecture was needed
    ! but how do we avoid breaking the Web in the process?
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007       4
Everywhere I have sought REST and not found it, except
   sitting in a corner by myself with a little book. [Thomas Kempis]



Software Architecture
A software architecture is an abstraction of
the run-time elements of a software system
during some phase of its operation.
    ! A system may be composed of many levels of abstraction
      and many phases of operation, each with its own software
      architecture.
    ! A software architecture is defined by a configuration of
      architectural elements—components, connectors, and
      data—constrained in their relationships in order to achieve
      a desired set of architectural properties.
         ! A configuration is the structure of architectural relationships among components,
           connectors, and data during a period of system run-time.


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                5
Da requiem; requietus ager bene credita reddit. [Ovid]
  (Take REST; a field that has RESTed gives a bountiful crop.)



Architectural Styles
An architectural style is a coordinated set of
architectural constraints that restricts the
roles and features of architectural elements,
and the allowed relationships among those
elements, within any architecture that
conforms to that style.
    ! A style can be applied to many architectures.
    ! An architecture can consist of many styles.




Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   6
Styles of Architectural Design
Design at the right level of abstraction
    ! Styles help architects communicate architecture
    ! Architecture determines potential system properties
    ! Implementation determines actual system properties
Sometimes known by other names
    ! Architectural patterns are styles with common recipes

Just because it’s called architecture ...                                                                            S
                                                                                                                 MER
                                                                                                              TO
                                                                                                        CUS
                                                                                                      e
                                                                                                 ecom
                                                                                            Os b
                                                                                           I
                                                                                      re C
                                                                                  Whe
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                          7
Oh, some seek bread--no more--life's mere subsistence, ...



What is the Web, really?
                                                                                  Information



                                       Browsers




                                                                                        Protocols


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                     8
... And some seek wealth and ease--the common quest; ...



Web Implementation




Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   9
... And some seek fame, that hovers in the distance; ...



Web Architecture
One abstraction above the implementation
Components
    ! User agents, Intermediaries, Servers
    ! Browsers, Spiders, Proxies, Gateways, Origin Servers
Connectors
    ! HTTP: a standard transfer protocol to prefer over many
Data
    ! URI: one identifier standard for all resources
    ! HTML, XML, RDF, ...: common representation formats to
      describe and bind resources
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   10
... But all are seeking REST. [Rev. Frederick Langbridge]



Web Architectural Style
One abstraction level above Architecture
    ! two abstraction levels above implementation
    ! that’s one too many for most folks
An architectural style is a set of constraints
    ! unfortunately, constraints are hard to visualize
         ! kind of like gravity or electromagnetism
         ! observed only by their effect on others

Constraints induce architectural properties
    ! both desirable and undesirable properties
         ! a.k.a., software qualities
         ! a.k.a., design trade-offs


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   11
REST is not quitting the busy career;
  REST is the fitting of self to its sphere. [John Sullivan Dwight]



Web Requirements
Low entry barrier
         ! Hypermedia User Interface
         ! Simple protocols for authoring and data transfer

    ! a.k.a., must be Simple, Reusable, and Extensible
Distributed Hypermedia System
         ! Large data transfers
         ! Sensitive to user-perceived latency

    ! a.k.a., must be Data-driven, Streamable, and Cacheable
Multiple organizational boundaries
         ! Anarchic scalability
         ! Gradual and fragmented change (deployment)

    ! a.k.a, must be Scalable, Evolvable, Visible, Reliable, ...
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   12
Agenda


REST retrospective
What is REST?
Why REST?
REST at Day


Q&A

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   13
Sometimes the most urgent and vital thing you can possibly do
  is take a complete REST. [Ashleigh Brilliant]



REST on a slide

                                                                                                pro




                                                                                      layered
                                                                                                      gra
                          replicated                                                                        mm                uniform interface
                                                                                                                 abl
                                                            separated                                               e
                  RR                                 CS                            LS                                   VM            U
                                                                  i nt
                                                                 pr erme
                                                                    oc d
 on-demand                              stateless                      es iat                         mobile                              simple
                                                                         sin e
                                                                                                                                          visible
                                                                            g
                    $                              CSS                            LCS                                   COD

                                                                                                                              reusable
                                         reliable                            shared                     extensible
                           cacheable                              scalable                       multi-
                                                  C$SS                            LC$SS           org. LCODC$SS                     REST


                                               Figure 5-9. REST Derivation by Style Constraints


the disadvantages) of the optional constraints when they are known to be in effect for some
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                                                     14
How beautiful it is to do nothing,
  and then REST afterward. [Spanish Proverb]



Style = nil

                 Starting from a condition of no constraints…




                                                                      WWW



Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   15
REST is not idleness, ...



Style += Client/Server

                  Apply separation of concerns: Client-Server




            improves UI portability                                               simplifies server


                                                  enables multiple organizational domains



Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                       16
... and to lie sometimes on the grass ...



Style                                += Stateless

                           Constrain interaction to be stateless…




                                                                                  simplifies server

                      degrades efficiency                                         improves scalability

                                                                                  improves reliability


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                          17
... under the trees on a summer's day, ...



Style                                += Caching

                                   Add optional non-shared caching


                                                          $




                                                          $

                                                                                  reduces average latency

                      degrades reliability                                        improves efficiency

                                                                                  improves scalability


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                             18
... listening to the murmur of water, ...



Style                                += Uniform Interface

                   Apply generality: uniform interface constraint


                                                         $



                                                                                   $



                                                         $

                                                                                  improves visibility

                      degrades efficiency                                               independent evolvability

                                                                                  decouples implementation


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                    19
... or watching the clouds float across the sky, ...



Style                                += Layered System
                 Apply info hiding: layered system constraints

                                                                                           $
                                              $

                    $


                                                  $                                                  $
                    $




                                                $                                 $



                 adds latency                         shared caching              legacy encapsulation

            simplifies clients                                  improves scalability             load balancing


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                   20
... is by no means a waste of time. [Sir John Lubbock]



REST Style
                        Finally, allow code-on-demand (applets/js)


                                                                                            $
                                              $

                    $


                                                  $                                                   $
                    $




                                                $                                 $




            simplifies clients                                     improves extensibility       reduces visibility


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                      21
REST Uniform Interface
All important resources are identified by one
(uniform) resource identifier mechanism
         ! simple, visible, reusable, stateless communication

Access methods (actions) mean the same for
all resources (universal semantics)
         ! layered system, cacheable, and shared caches

Resources are manipulated through
the exchange of representations
         ! simple, visible, reusable, cacheable, and stateless communication

Exchanged as self-descriptive messages
         ! layered system, cacheable, and shared caches

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   22
REST Uniform Interface
Hypertext as the engine of application state
    ! A successful response indicates (or contains) a current
      representation of the state of the identified resource;
      the resource remains hidden behind the interface.
    ! Some representations contain links to potential next
      application states, including direction on how to transition
      to those states when a transition is selected.
    ! Each steady-state (Web page) embodies
      the current application state
             ! simple, visible, scalable, reliable, reusable, and cacheable

    ! All application state (not resource state) is kept on client
    ! All shared state (not session state) is kept on origin server

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   23
Hypertext Clarification
Hypertext has many (old) definitions
    ! quot;By 'hypertext,' I mean non-sequential writing — text that branches and allows choices
      to the reader, best read at an interactive screen. As popularly conceived, this is a series
      of text chunks connected by links which offer the reader different pathwaysquot;
      [Theodor H. Nelson]
    ! “Hypertext is a computer-supported medium for information in which many interlinked
      documents are displayed with their links on a high-resolution computer screen.”
      [Jeffrey Conklin]

When I say Hypertext, I mean ...
    ! The simultaneous presentation of information and controls
      such that the information becomes the affordance through
      which the user obtains choices and selects actions.
    ! Hypertext does not need to be HTML on a browser
         ! machines can follow links when they understand
           the data format and relationship types

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                24
Hypertext Clarification
Hypertext has many (old) definitions
    ! quot;By 'hypertext,' I mean non-sequential writing — text that branches and allows choices
               Hypertext = non-linear documents
      to the reader, best read at an interactive screen. As popularly conceived, this is a series
      of text chunks connected by links which offer the reader different pathwaysquot;
      [Theodor H. Nelson]
    ! “Hypertext is a computer-supported medium for information in which many interlinked
               Hypertext = selectable GUI controls
      documents are displayed with their links on a high-resolution computer screen.”
      [Jeffrey Conklin]

When I say Hypertext, I mean ...
    ! The simultaneous presentation of information and controls
        Hypertext = data-guided controls
      such that the information becomes the affordance through
      which the user obtains choices and selects actions.
    ! Hypertext does not need to be HTML on a browser
         ! machines can follow links when they understand
           the data format and relationship types

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                24
Agenda


REST retrospective
What is REST?
Why REST?
REST at Day


Q&A

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   25
Benefits of REST-based Architecture
Maximizes reuse
    ! uniform resources having identifiers = Bigger WWW
    ! visibility results in serendipity
Minimizes coupling to enable evolution
    ! uniform interface hides all implementation details
    ! hypertext allows late-binding of application control-flow
    ! gradual and fragmented change across organizations
Eliminates partial failure conditions
    ! server failure does not befuddle client state
    ! shared state is recoverable as a resource
Scales without bound
    ! services can be layered, clustered, and cached
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   26
Benefits of REST-based Architecture
Simplifies
    ! hypertext is standardized (fewer UIs)
Simplifies
    ! identification is standardized (less communication)
Simplifies
    ! exchange protocols are standardized (fewer integrations)
Simplifies
    ! interactions are standardized (fewer semantics)
Simplifies
    ! data formats are standardized (fewer translations)

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   27
What if: Non-Uniform Interface
If the interface would be resource-specific...
    ! URI is no longer sufficient for resource identification
         ! lose benefit of URI exchange (assumed GET)
         ! require resource description language

    ! Information becomes segregated by resource type
         ! walled into gardens (loss of power laws / pagerank)
         ! important information must be replicated

    ! Intermediaries cannot encapsulate services
         ! unable to anticipate resource behavior
         ! too complex to cache based on method semantics

    ! No more serendipity
         ! mashups must be defined per interface
         ! services become tightly coupled

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   28
What if: Non-Uniform Interface
        se Bu
If the interface would be resource-specific...
               rlonger sufficient for resource identification
                           tw
    ! URI is no io
                    us           ou
           ob           ly
         ! lose benefit of URI exchange (assumed GET)

                                       ld
                vbecomes segregated by resource type
         ! require resource description language
                              su
    ! Information io                      an
                     us            gg          yo
                          ly
         ! walled into gardens (loss of power laws / pagerank)

                                        esservicesn
         ! important information must be replicated

                               du                      e
    ! Intermediaries cannot encapsulate t
                                     mb suc
         ! unable to anticipate resource behavior


                                           ide h a
         ! too complex to cache based on method semantics

    ! No more serendipity
                                                 a? n
         ! mashups must be defined per interface
         ! services become tightly coupled

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   28
Client:    Excuse me. Did you say knives?
  Architect: Rotating knives, yes. [Monty Python’s Flying Circus]



Industry Practice
Meanwhile, in a parallel universe ...
    ! http://www.youtube.com/watch?v=-RxhkWLJH4Y
         ! Microsoft was selling COM+/DCOM
         ! IBM and friends were selling CORBA
         ! Sun was selling RMI
         ! W3C was developing XML

    ! Then SOAP was dropped on the shower floor
      as an Internet Draft
         ! and quickly laughed out of the IETF
         ! only to be picked up by IBM and renamed “Web Services”

    ! and REST became the only counter-argument
      to multi-billions in advertising


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   29
Cast off the cares that have so long oppressed;
  REST, sweetly REST! [Jane Laurie Borthwick]



Industry Reaction?
Not very constructive
    ! proponents labeled as RESTafarians
    ! arguments derided as a “religion”
    ! excused as “too simple for real services”
Service-Oriented Architecture (SOA)
    ! a direct response to REST
    ! attempt at an architectural style for WS
         ! without any constraints

    ! What is SOA?
         ! Wardrobe, Musical Notes, or Legos?
         ! http://www.youtube.com/profile_videos?user=richneckyogi


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   30
REST is sweet after strife. [Lord Edward Robert Bulwer Lytton]



Industry Acceptance
Something has changed ...
    ! People started to talk about the value of URIs
      (reusable resources)
    ! Google maps decided to encourage reuse (Mashups)
    ! O’Reilly began talking about Web 2.0
    ! Rails reminded people that frameworks can be simple

and REST(ful) became an industry buzzword

                                                                Yikes!
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   31
Agenda


REST retrospective
What is REST?
Why REST?
REST at Day


Q&A

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   32
REST when you're weary. Refresh and renew yourself, your body,
  your mind, your spirit. Then get back to work. [Ralph Marston]



Vision




                      1 Everything is Content




Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   33
REST when you're weary. Refresh and renew yourself, your body,
  your mind, your spirit. Then get back to work. [Ralph Marston]



Vision
                                                                  REST
               All important resources
               have uniform identifiers
                1 Everything is Content




Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   33
Intermediary and Cache Friendly



                                                                    Intermediary
                                                                    Proxy Cache




               Users                                    Webserver
                                                                                   Communiqué Author
               (Authors)                                Dispatcher Cache
                                                                                   Standalone or AppServer
                                                                                                    Centralized DataSource
                                                                                                    RDBMS, NFS, SAN
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                         34
Intermediary and Cache Friendly

                                                                   REST
Layered Client/Server Design                                        Intermediary
                                                                    Proxy Cache


 for Intermediate Processing


               Users                                    Webserver
                                                                                   Communiqué Author
               (Authors)                                Dispatcher Cache
                                                                                   Standalone or AppServer
                                                                                                    Centralized DataSource
                                                                                                    RDBMS, NFS, SAN
Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                         34
Sep-04-07




Standards


                Accounting                         Marketing                           Legal               HR                         R&D




                                                                             Web Frontend



             Application A                    Application B                       Application C      Application D               Application E




                                                                              JSR-170 API



                                                                                                  Java Content Repository


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                                                  35
Sep-04-07




Standards

                                                                   REST
                       All resources
                Accounting                         Marketing                           Legal               HR                         R&D




                   have uniform interface
                                                                             Web Frontend



             Application A                    Application B                       Application C      Application D               Application E




                                                                              JSR-170 API



                                                                                                  Java Content Repository


Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007                                                                  35
Products




Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   36
Products

                                                                   REST
         Hypertext is the
    Engine of Application State



Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   36
Let the weary at length possess quiet REST.
  [Lucius Annaeus Seneca]



Agenda


REST retrospective
What is REST?
Why REST?
REST at Day


Q&A

Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007   37

More Related Content

What's hot

Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™
Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™
Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™Olatunji Adetunji
 
2010 Mazda CX9 Annapolis
2010 Mazda CX9 Annapolis2010 Mazda CX9 Annapolis
2010 Mazda CX9 AnnapolisPreston Mazda
 
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate Development
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate DevelopmentForm Based Code in @NewportVT: Partnerships = Refreshing Real Estate Development
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate DevelopmentPatricia M Sears
 
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)SynergisIT
 
I City General Iii Kd
I City General Iii KdI City General Iii Kd
I City General Iii KdKoen Delvaux
 

What's hot (6)

Iberian june 2010
Iberian june 2010Iberian june 2010
Iberian june 2010
 
Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™
Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™
Seo firms seo-consulting-services-affordable-seo-packages-seo web-analyst®™
 
2010 Mazda CX9 Annapolis
2010 Mazda CX9 Annapolis2010 Mazda CX9 Annapolis
2010 Mazda CX9 Annapolis
 
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate Development
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate DevelopmentForm Based Code in @NewportVT: Partnerships = Refreshing Real Estate Development
Form Based Code in @NewportVT: Partnerships = Refreshing Real Estate Development
 
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)
Webinar trendsinitstaffing-dec2011-111206090207-phpapp01(2)
 
I City General Iii Kd
I City General Iii KdI City General Iii Kd
I City General Iii Kd
 

Viewers also liked

Aunque sòlo sea porque el combustible sirve sòlo para arder
Aunque sòlo sea porque el combustible sirve sòlo para arder Aunque sòlo sea porque el combustible sirve sòlo para arder
Aunque sòlo sea porque el combustible sirve sòlo para arder autobombo
 
Palermo II
Palermo IIPalermo II
Palermo IIF. Ovies
 
UNA PALMERA RARITA
UNA PALMERA RARITAUNA PALMERA RARITA
UNA PALMERA RARITArocor
 
Celje (Eslovenia)
Celje (Eslovenia)Celje (Eslovenia)
Celje (Eslovenia)F. Ovies
 
Theatre Booking System Lesson 3
Theatre Booking System   Lesson 3Theatre Booking System   Lesson 3
Theatre Booking System Lesson 3mrbelshaw
 

Viewers also liked (8)

Standard32
Standard32Standard32
Standard32
 
test helvetica
test helveticatest helvetica
test helvetica
 
Aunque sòlo sea porque el combustible sirve sòlo para arder
Aunque sòlo sea porque el combustible sirve sòlo para arder Aunque sòlo sea porque el combustible sirve sòlo para arder
Aunque sòlo sea porque el combustible sirve sòlo para arder
 
Palermo II
Palermo IIPalermo II
Palermo II
 
UNA PALMERA RARITA
UNA PALMERA RARITAUNA PALMERA RARITA
UNA PALMERA RARITA
 
Celje (Eslovenia)
Celje (Eslovenia)Celje (Eslovenia)
Celje (Eslovenia)
 
Chapter 16 review
Chapter 16 reviewChapter 16 review
Chapter 16 review
 
Theatre Booking System Lesson 3
Theatre Booking System   Lesson 3Theatre Booking System   Lesson 3
Theatre Booking System Lesson 3
 

Similar to 200711 R E S T Apache Con

Brochure ITM Platform (English)
Brochure ITM Platform (English)Brochure ITM Platform (English)
Brochure ITM Platform (English)Daniel Piret
 
Brochure itm platform
Brochure itm platformBrochure itm platform
Brochure itm platformITM Platform
 
Ps 58 1888 sanborn map
Ps 58 1888 sanborn mapPs 58 1888 sanborn map
Ps 58 1888 sanborn mapproteusgowanus
 
Wmpid phases rf1_8x11 aerial photo
Wmpid phases rf1_8x11  aerial photoWmpid phases rf1_8x11  aerial photo
Wmpid phases rf1_8x11 aerial photoTheresa Wagaman
 
E-readness in Latin America
E-readness in Latin AmericaE-readness in Latin America
E-readness in Latin AmericaWilliam GOURG
 
Deel 2 overzicht workshops
Deel 2 overzicht workshopsDeel 2 overzicht workshops
Deel 2 overzicht workshopssaMBO-ICT
 

Similar to 200711 R E S T Apache Con (10)

Brochure ITM Platform (English)
Brochure ITM Platform (English)Brochure ITM Platform (English)
Brochure ITM Platform (English)
 
Brochure itm platform
Brochure itm platformBrochure itm platform
Brochure itm platform
 
Ps 58 1888 sanborn map
Ps 58 1888 sanborn mapPs 58 1888 sanborn map
Ps 58 1888 sanborn map
 
Wmpid phases rf1_8x11 aerial photo
Wmpid phases rf1_8x11  aerial photoWmpid phases rf1_8x11  aerial photo
Wmpid phases rf1_8x11 aerial photo
 
Test
TestTest
Test
 
VoIP_Access
VoIP_AccessVoIP_Access
VoIP_Access
 
E-readness in Latin America
E-readness in Latin AmericaE-readness in Latin America
E-readness in Latin America
 
Fayette Front Aug26
Fayette Front  Aug26Fayette Front  Aug26
Fayette Front Aug26
 
Deel 2 overzicht workshops
Deel 2 overzicht workshopsDeel 2 overzicht workshops
Deel 2 overzicht workshops
 
Campusmap
CampusmapCampusmap
Campusmap
 

More from day

Performance Pack
Performance PackPerformance Pack
Performance Packday
 
Scala for scripting
Scala for scriptingScala for scripting
Scala for scriptingday
 
Scala4sling
Scala4slingScala4sling
Scala4slingday
 
Testing Zen
Testing ZenTesting Zen
Testing Zenday
 
Java Persistence Frameworks
Java Persistence FrameworksJava Persistence Frameworks
Java Persistence Frameworksday
 
Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009day
 
Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3day
 
Tarpm Clustering
Tarpm ClusteringTarpm Clustering
Tarpm Clusteringday
 
Tech Summit 08 Support Initiative
Tech Summit 08 Support InitiativeTech Summit 08 Support Initiative
Tech Summit 08 Support Initiativeday
 
Non Cms For Web Apps
Non Cms For Web AppsNon Cms For Web Apps
Non Cms For Web Appsday
 
Getting Into The Flow With Cq Dam
Getting Into The Flow With Cq DamGetting Into The Flow With Cq Dam
Getting Into The Flow With Cq Damday
 
Dispatcher Oom
Dispatcher OomDispatcher Oom
Dispatcher Oomday
 
Advanced Collaboration And Beyond
Advanced Collaboration And BeyondAdvanced Collaboration And Beyond
Advanced Collaboration And Beyondday
 
Wc Mand Connectors2
Wc Mand Connectors2Wc Mand Connectors2
Wc Mand Connectors2day
 
Jackrabbit Roadmap
Jackrabbit RoadmapJackrabbit Roadmap
Jackrabbit Roadmapday
 
Doc Book Vs Dita
Doc Book Vs DitaDoc Book Vs Dita
Doc Book Vs Ditaday
 
Doc Book Vs Dita Teresa
Doc Book Vs Dita TeresaDoc Book Vs Dita Teresa
Doc Book Vs Dita Teresaday
 
862
862862
862day
 
Apache Con Us2007 Sanselan
Apache Con Us2007 SanselanApache Con Us2007 Sanselan
Apache Con Us2007 Sanselanday
 
Apache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In ActionApache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In Actionday
 

More from day (20)

Performance Pack
Performance PackPerformance Pack
Performance Pack
 
Scala for scripting
Scala for scriptingScala for scripting
Scala for scripting
 
Scala4sling
Scala4slingScala4sling
Scala4sling
 
Testing Zen
Testing ZenTesting Zen
Testing Zen
 
Java Persistence Frameworks
Java Persistence FrameworksJava Persistence Frameworks
Java Persistence Frameworks
 
Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009
 
Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3
 
Tarpm Clustering
Tarpm ClusteringTarpm Clustering
Tarpm Clustering
 
Tech Summit 08 Support Initiative
Tech Summit 08 Support InitiativeTech Summit 08 Support Initiative
Tech Summit 08 Support Initiative
 
Non Cms For Web Apps
Non Cms For Web AppsNon Cms For Web Apps
Non Cms For Web Apps
 
Getting Into The Flow With Cq Dam
Getting Into The Flow With Cq DamGetting Into The Flow With Cq Dam
Getting Into The Flow With Cq Dam
 
Dispatcher Oom
Dispatcher OomDispatcher Oom
Dispatcher Oom
 
Advanced Collaboration And Beyond
Advanced Collaboration And BeyondAdvanced Collaboration And Beyond
Advanced Collaboration And Beyond
 
Wc Mand Connectors2
Wc Mand Connectors2Wc Mand Connectors2
Wc Mand Connectors2
 
Jackrabbit Roadmap
Jackrabbit RoadmapJackrabbit Roadmap
Jackrabbit Roadmap
 
Doc Book Vs Dita
Doc Book Vs DitaDoc Book Vs Dita
Doc Book Vs Dita
 
Doc Book Vs Dita Teresa
Doc Book Vs Dita TeresaDoc Book Vs Dita Teresa
Doc Book Vs Dita Teresa
 
862
862862
862
 
Apache Con Us2007 Sanselan
Apache Con Us2007 SanselanApache Con Us2007 Sanselan
Apache Con Us2007 Sanselan
 
Apache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In ActionApache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In Action
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

200711 R E S T Apache Con

  • 1. A little REST and Relaxation ApacheCon Roy T. Fielding, Ph.D. Chief Scientist, Day Software V.P., Apache HTTP Server http://roy.gbiv.com/talks/200711_REST_ApacheCon.pdf Leading the Wave of Open Source
  • 2. Between us, we cover all knowledge; he knows all that can be known and I know the REST. [Mark Twain] Representational State Transfer REST retrospective What is REST? Why REST? REST at Day Q&A Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 2
  • 3. Life's race will run, Life's work well done, Life's victory won, Now cometh REST. [Dr. Edward Hazen Parker] Why me? Oct 07 = 142,805,398 (6,072x) 23,517 Using XMosaic L E libwww-perl OD HTTP editor M CT JE Relative OB www.ics.uci.edu URLs P T HT AS NS wwwstat GI BE HTML ST 10,022 RE 2.0 MOMspider SJ IETF Conditional 2nd WWW GET 2,738 1st WWW 623 130 Jun 93 Dec 93 Jun 94 Dec 94 Jun 95 Public WWW servers [Matthew Gray] Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 3
  • 4. Absence of occupation is not REST, A mind quite vacant is a mind distress'd. [William Cowper] The Web Problem (circa 1994) Early architecture based on solid principles ! URLs, separation of concerns, simplicity ! lacked architectural description and rationale Protocols assumed a direct server connection ! no awareness of caching, proxies, or spiders ! many independent extensions Emerging awareness of the Web ! exponential growth threatened the Internet ! commercialization meant new stakeholders with new (selfish) requirements A modern Web architecture was needed ! but how do we avoid breaking the Web in the process? Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 4
  • 5. Everywhere I have sought REST and not found it, except sitting in a corner by myself with a little book. [Thomas Kempis] Software Architecture A software architecture is an abstraction of the run-time elements of a software system during some phase of its operation. ! A system may be composed of many levels of abstraction and many phases of operation, each with its own software architecture. ! A software architecture is defined by a configuration of architectural elements—components, connectors, and data—constrained in their relationships in order to achieve a desired set of architectural properties. ! A configuration is the structure of architectural relationships among components, connectors, and data during a period of system run-time. Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 5
  • 6. Da requiem; requietus ager bene credita reddit. [Ovid] (Take REST; a field that has RESTed gives a bountiful crop.) Architectural Styles An architectural style is a coordinated set of architectural constraints that restricts the roles and features of architectural elements, and the allowed relationships among those elements, within any architecture that conforms to that style. ! A style can be applied to many architectures. ! An architecture can consist of many styles. Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 6
  • 7. Styles of Architectural Design Design at the right level of abstraction ! Styles help architects communicate architecture ! Architecture determines potential system properties ! Implementation determines actual system properties Sometimes known by other names ! Architectural patterns are styles with common recipes Just because it’s called architecture ... S MER TO CUS e ecom Os b I re C Whe Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 7
  • 8. Oh, some seek bread--no more--life's mere subsistence, ... What is the Web, really? Information Browsers Protocols Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 8
  • 9. ... And some seek wealth and ease--the common quest; ... Web Implementation Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 9
  • 10. ... And some seek fame, that hovers in the distance; ... Web Architecture One abstraction above the implementation Components ! User agents, Intermediaries, Servers ! Browsers, Spiders, Proxies, Gateways, Origin Servers Connectors ! HTTP: a standard transfer protocol to prefer over many Data ! URI: one identifier standard for all resources ! HTML, XML, RDF, ...: common representation formats to describe and bind resources Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 10
  • 11. ... But all are seeking REST. [Rev. Frederick Langbridge] Web Architectural Style One abstraction level above Architecture ! two abstraction levels above implementation ! that’s one too many for most folks An architectural style is a set of constraints ! unfortunately, constraints are hard to visualize ! kind of like gravity or electromagnetism ! observed only by their effect on others Constraints induce architectural properties ! both desirable and undesirable properties ! a.k.a., software qualities ! a.k.a., design trade-offs Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 11
  • 12. REST is not quitting the busy career; REST is the fitting of self to its sphere. [John Sullivan Dwight] Web Requirements Low entry barrier ! Hypermedia User Interface ! Simple protocols for authoring and data transfer ! a.k.a., must be Simple, Reusable, and Extensible Distributed Hypermedia System ! Large data transfers ! Sensitive to user-perceived latency ! a.k.a., must be Data-driven, Streamable, and Cacheable Multiple organizational boundaries ! Anarchic scalability ! Gradual and fragmented change (deployment) ! a.k.a, must be Scalable, Evolvable, Visible, Reliable, ... Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 12
  • 13. Agenda REST retrospective What is REST? Why REST? REST at Day Q&A Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 13
  • 14. Sometimes the most urgent and vital thing you can possibly do is take a complete REST. [Ashleigh Brilliant] REST on a slide pro layered gra replicated mm uniform interface abl separated e RR CS LS VM U i nt pr erme oc d on-demand stateless es iat mobile simple sin e visible g $ CSS LCS COD reusable reliable shared extensible cacheable scalable multi- C$SS LC$SS org. LCODC$SS REST Figure 5-9. REST Derivation by Style Constraints the disadvantages) of the optional constraints when they are known to be in effect for some Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 14
  • 15. How beautiful it is to do nothing, and then REST afterward. [Spanish Proverb] Style = nil Starting from a condition of no constraints… WWW Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 15
  • 16. REST is not idleness, ... Style += Client/Server Apply separation of concerns: Client-Server improves UI portability simplifies server enables multiple organizational domains Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 16
  • 17. ... and to lie sometimes on the grass ... Style += Stateless Constrain interaction to be stateless… simplifies server degrades efficiency improves scalability improves reliability Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 17
  • 18. ... under the trees on a summer's day, ... Style += Caching Add optional non-shared caching $ $ reduces average latency degrades reliability improves efficiency improves scalability Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 18
  • 19. ... listening to the murmur of water, ... Style += Uniform Interface Apply generality: uniform interface constraint $ $ $ improves visibility degrades efficiency independent evolvability decouples implementation Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 19
  • 20. ... or watching the clouds float across the sky, ... Style += Layered System Apply info hiding: layered system constraints $ $ $ $ $ $ $ $ adds latency shared caching legacy encapsulation simplifies clients improves scalability load balancing Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 20
  • 21. ... is by no means a waste of time. [Sir John Lubbock] REST Style Finally, allow code-on-demand (applets/js) $ $ $ $ $ $ $ $ simplifies clients improves extensibility reduces visibility Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 21
  • 22. REST Uniform Interface All important resources are identified by one (uniform) resource identifier mechanism ! simple, visible, reusable, stateless communication Access methods (actions) mean the same for all resources (universal semantics) ! layered system, cacheable, and shared caches Resources are manipulated through the exchange of representations ! simple, visible, reusable, cacheable, and stateless communication Exchanged as self-descriptive messages ! layered system, cacheable, and shared caches Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 22
  • 23. REST Uniform Interface Hypertext as the engine of application state ! A successful response indicates (or contains) a current representation of the state of the identified resource; the resource remains hidden behind the interface. ! Some representations contain links to potential next application states, including direction on how to transition to those states when a transition is selected. ! Each steady-state (Web page) embodies the current application state ! simple, visible, scalable, reliable, reusable, and cacheable ! All application state (not resource state) is kept on client ! All shared state (not session state) is kept on origin server Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 23
  • 24. Hypertext Clarification Hypertext has many (old) definitions ! quot;By 'hypertext,' I mean non-sequential writing — text that branches and allows choices to the reader, best read at an interactive screen. As popularly conceived, this is a series of text chunks connected by links which offer the reader different pathwaysquot; [Theodor H. Nelson] ! “Hypertext is a computer-supported medium for information in which many interlinked documents are displayed with their links on a high-resolution computer screen.” [Jeffrey Conklin] When I say Hypertext, I mean ... ! The simultaneous presentation of information and controls such that the information becomes the affordance through which the user obtains choices and selects actions. ! Hypertext does not need to be HTML on a browser ! machines can follow links when they understand the data format and relationship types Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 24
  • 25. Hypertext Clarification Hypertext has many (old) definitions ! quot;By 'hypertext,' I mean non-sequential writing — text that branches and allows choices Hypertext = non-linear documents to the reader, best read at an interactive screen. As popularly conceived, this is a series of text chunks connected by links which offer the reader different pathwaysquot; [Theodor H. Nelson] ! “Hypertext is a computer-supported medium for information in which many interlinked Hypertext = selectable GUI controls documents are displayed with their links on a high-resolution computer screen.” [Jeffrey Conklin] When I say Hypertext, I mean ... ! The simultaneous presentation of information and controls Hypertext = data-guided controls such that the information becomes the affordance through which the user obtains choices and selects actions. ! Hypertext does not need to be HTML on a browser ! machines can follow links when they understand the data format and relationship types Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 24
  • 26. Agenda REST retrospective What is REST? Why REST? REST at Day Q&A Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 25
  • 27. Benefits of REST-based Architecture Maximizes reuse ! uniform resources having identifiers = Bigger WWW ! visibility results in serendipity Minimizes coupling to enable evolution ! uniform interface hides all implementation details ! hypertext allows late-binding of application control-flow ! gradual and fragmented change across organizations Eliminates partial failure conditions ! server failure does not befuddle client state ! shared state is recoverable as a resource Scales without bound ! services can be layered, clustered, and cached Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 26
  • 28. Benefits of REST-based Architecture Simplifies ! hypertext is standardized (fewer UIs) Simplifies ! identification is standardized (less communication) Simplifies ! exchange protocols are standardized (fewer integrations) Simplifies ! interactions are standardized (fewer semantics) Simplifies ! data formats are standardized (fewer translations) Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 27
  • 29. What if: Non-Uniform Interface If the interface would be resource-specific... ! URI is no longer sufficient for resource identification ! lose benefit of URI exchange (assumed GET) ! require resource description language ! Information becomes segregated by resource type ! walled into gardens (loss of power laws / pagerank) ! important information must be replicated ! Intermediaries cannot encapsulate services ! unable to anticipate resource behavior ! too complex to cache based on method semantics ! No more serendipity ! mashups must be defined per interface ! services become tightly coupled Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 28
  • 30. What if: Non-Uniform Interface se Bu If the interface would be resource-specific... rlonger sufficient for resource identification tw ! URI is no io us ou ob ly ! lose benefit of URI exchange (assumed GET) ld vbecomes segregated by resource type ! require resource description language su ! Information io an us gg yo ly ! walled into gardens (loss of power laws / pagerank) esservicesn ! important information must be replicated du e ! Intermediaries cannot encapsulate t mb suc ! unable to anticipate resource behavior ide h a ! too complex to cache based on method semantics ! No more serendipity a? n ! mashups must be defined per interface ! services become tightly coupled Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 28
  • 31. Client: Excuse me. Did you say knives? Architect: Rotating knives, yes. [Monty Python’s Flying Circus] Industry Practice Meanwhile, in a parallel universe ... ! http://www.youtube.com/watch?v=-RxhkWLJH4Y ! Microsoft was selling COM+/DCOM ! IBM and friends were selling CORBA ! Sun was selling RMI ! W3C was developing XML ! Then SOAP was dropped on the shower floor as an Internet Draft ! and quickly laughed out of the IETF ! only to be picked up by IBM and renamed “Web Services” ! and REST became the only counter-argument to multi-billions in advertising Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 29
  • 32. Cast off the cares that have so long oppressed; REST, sweetly REST! [Jane Laurie Borthwick] Industry Reaction? Not very constructive ! proponents labeled as RESTafarians ! arguments derided as a “religion” ! excused as “too simple for real services” Service-Oriented Architecture (SOA) ! a direct response to REST ! attempt at an architectural style for WS ! without any constraints ! What is SOA? ! Wardrobe, Musical Notes, or Legos? ! http://www.youtube.com/profile_videos?user=richneckyogi Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 30
  • 33. REST is sweet after strife. [Lord Edward Robert Bulwer Lytton] Industry Acceptance Something has changed ... ! People started to talk about the value of URIs (reusable resources) ! Google maps decided to encourage reuse (Mashups) ! O’Reilly began talking about Web 2.0 ! Rails reminded people that frameworks can be simple and REST(ful) became an industry buzzword Yikes! Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 31
  • 34. Agenda REST retrospective What is REST? Why REST? REST at Day Q&A Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 32
  • 35. REST when you're weary. Refresh and renew yourself, your body, your mind, your spirit. Then get back to work. [Ralph Marston] Vision 1 Everything is Content Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 33
  • 36. REST when you're weary. Refresh and renew yourself, your body, your mind, your spirit. Then get back to work. [Ralph Marston] Vision REST All important resources have uniform identifiers 1 Everything is Content Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 33
  • 37. Intermediary and Cache Friendly Intermediary Proxy Cache Users Webserver Communiqué Author (Authors) Dispatcher Cache Standalone or AppServer Centralized DataSource RDBMS, NFS, SAN Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 34
  • 38. Intermediary and Cache Friendly REST Layered Client/Server Design Intermediary Proxy Cache for Intermediate Processing Users Webserver Communiqué Author (Authors) Dispatcher Cache Standalone or AppServer Centralized DataSource RDBMS, NFS, SAN Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 34
  • 39. Sep-04-07 Standards Accounting Marketing Legal HR R&D Web Frontend Application A Application B Application C Application D Application E JSR-170 API Java Content Repository Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 35
  • 40. Sep-04-07 Standards REST All resources Accounting Marketing Legal HR R&D have uniform interface Web Frontend Application A Application B Application C Application D Application E JSR-170 API Java Content Repository Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 35
  • 41. Products Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 36
  • 42. Products REST Hypertext is the Engine of Application State Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 36
  • 43. Let the weary at length possess quiet REST. [Lucius Annaeus Seneca] Agenda REST retrospective What is REST? Why REST? REST at Day Q&A Roy T. Fielding. “A little REST and Relaxation.” ApacheCon US, 15 November 2007 37