SlideShare a Scribd company logo
1 of 109
Download to read offline
REST        in peace


PHP.TO.START, July 11 2011 - Turin
AGENDA

             ● Vol. 1: REST in a nutshell
               ○ Tenets
               ○ Antipatterns
             ● Vol. 2: To the rescue
               ○ HTTP cache
               ○ HATEOAS


PHP.TO.START, July 11 2011 - Turin
Sorry for the ugly slide.

           There will be others.
              Really sorry.



PHP.TO.START, July 11 2011 - Turin
REST in a nutshell:




       1. Client <> Server
PHP.TO.START, July 11 2011 - Turin
REST in a nutshell:




                              2. Stateless
PHP.TO.START, July 11 2011 - Turin
REST in a nutshell:




             3. Cacheable
PHP.TO.START, July 11 2011 - Turin
REST in a nutshell:




4. Layered system
PHP.TO.START, July 11 2011 - Turin
REST in a nutshell:



                                 5. Uniform
                                 interface
PHP.TO.START, July 11 2011 - Turin
And obviously nobody had a clue




PHP.TO.START, July 11 2011 - Turin
ANTIPATTERNS


PHP.TO.START, July 11 2011 - Turin
1
                        URIs

PHP.TO.START, July 11 2011 - Turin
"REST is about

 cool URI design"




http://apple.com/users/1/licenses/4.json




PHP.TO.START, July 11 2011 - Turin
"REST is about

 cool URI design"




http://apple.com/users/1/licenses/4.json




PHP.TO.START, July 11 2011 - Turin
http://apple.com/site/en_US/showUsers.jsp?uid=1&license=4




             is OK too

PHP.TO.START, July 11 2011 - Turin
but




PHP.TO.START, July 11 2011 - Turin
cool URIs help you
   think in term of resources
                                     David Zuelke




PHP.TO.START, July 11 2011 - Turin
2
                   URIs (bis)

PHP.TO.START, July 11 2011 - Turin
REST follows a URI schema


                         GET /users
                         POST /users
                         PUT /users/{id}
                         DELETE /users/{id}
                         ...


PHP.TO.START, July 11 2011 - Turin
REST follows a URI schema


                        GET /users
                           POST /users
                        PUT /users/{id}
                         DELETE /users/{id}
                         ...


PHP.TO.START, July 11 2011 - Turin
what if you change your
              URL?



PHP.TO.START, July 11 2011 - Turin
Yeah,
           client is
           broken
PHP.TO.START, July 11 2011 - Turin
RESTful clients should
        be driven by service's
        hypermedia controls
  Roy Fielding : http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven




PHP.TO.START, July 11 2011 - Turin
HATEOAS
PHP.TO.START, July 11 2011 - Turin
3
                  POST is cool

PHP.TO.START, July 11 2011 - Turin
said SOAP 1.1

PHP.TO.START, July 11 2011 - Turin
said SOAP 1.1

PHP.TO.START, July 11 2011 - Turin
loosing meaningful verbs at the protocol level




PHP.TO.START, July 11 2011 - Turin
loosing meaningful verbs at the protocol level

          nothing cacheable by default




PHP.TO.START, July 11 2011 - Turin
loosing meaningful verbs at the protocol level

          nothing cacheable by default

            what about bookmarking?



PHP.TO.START, July 11 2011 - Turin
4
            500 is your friend

PHP.TO.START, July 11 2011 - Turin
said SOAP
                        ( again )




PHP.TO.START, July 11 2011 - Turin
GET /users/300
                  Host: www.example.com




PHP.TO.START, July 11 2011 - Turin
GET /users/300
                  Host: www.example.com




      HTTP/1.1 500 Internal Server Error
      Etag: 1234
      X-Powered-By: php/5.3
      ...

      The record cannot be found

PHP.TO.START, July 11 2011 - Turin
GET /users/300
                  Host: www.example.com




      HTTP/1.1 500 Internal Server Error
      Etag: 1234
      X-Powered-By: php/5.3
      ...

      The record cannot be found

PHP.TO.START, July 11 2011 - Turin
The HTTP protocol is awesome,
     and lets you return meaningful and
     universally-understood status codes




PHP.TO.START, July 11 2011 - Turin
404 Not Found




PHP.TO.START, July 11 2011 - Turin
404 Not Found




                   OMG Link is broken?



PHP.TO.START, July 11 2011 - Turin
202 Accepted




PHP.TO.START, July 11 2011 - Turin
202 Accepted




 You get an immediate OK, and the operation will hopefully complete



PHP.TO.START, July 11 2011 - Turin
Pause




PHP.TO.START, July 11 2011 - Turin
World Wide
           Web
PHP.TO.START, July 11 2011 - Turin
the largest data-exchange network on the planet




PHP.TO.START, July 11 2011 - Turin
And meanwhile, at Facebook...



 12TB of new data every day
        (1 year ago)

           500 million users

PHP.TO.START, July 11 2011 - Turin
And meanwhile, at Google...




           1 billion
    unique monthly googlers


PHP.TO.START, July 11 2011 - Turin
via   HTTP             , baby!




PHP.TO.START, July 11 2011 - Turin
HTTP in a nutshell:




       1. Client <> Server
PHP.TO.START, July 11 2011 - Turin
HTTP in a nutshell:




                              2. Stateless
PHP.TO.START, July 11 2011 - Turin
HTTP in a nutshell:



3. widespread cache spec
   http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html


PHP.TO.START, July 11 2011 - Turin
HTTP in a nutshell:
              Lao Tze Song using Firefox
              5
                   Company proxy
                  Great chinese (fire)wall
                       Reverse proxy
                        Origin server

4. Layered system
PHP.TO.START, July 11 2011 - Turin
HTTP in a nutshell:




          5. it is the uniform interface
          between clients and servers
PHP.TO.START, July 11 2011 - Turin
HTTP bleeds REST


PHP.TO.START, July 11 2011 - Turin
1.
         caching & scalability


PHP.TO.START, July 11 2011 - Turin
Types of cache

                         Local

                    Shared/proxy

               Shared/reverse proxy



PHP.TO.START, July 11 2011 - Turin
Types of cache

                         Local

                    Shared/proxy

               Shared/reverse proxy



PHP.TO.START, July 11 2011 - Turin
PHP.TO.START, July 11 2011 - Turin
Types of cache

                         Local

                  Shared/proxy

               Shared/reverse proxy



PHP.TO.START, July 11 2011 - Turin
PHP.TO.START, July 11 2011 - Turin
Types of cache

                         Local

                    Shared/proxy

            Shared/reverse proxy



PHP.TO.START, July 11 2011 - Turin
PHP.TO.START, July 11 2011 - Turin
on the server side




PHP.TO.START, July 11 2011 - Turin
Caching with
               Expiration
               (example)
PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
     Host: www.example.com
     Expires: 0




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
     Host: www.example.com
     Expires: 0




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
     Host: www.example.com
     Expires: Tue, 31 Jan 2011 01:00 GMT




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
         Host: www.example.com
         Cache-Control: max-age=60, public




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
         Host: www.example.com
         Cache-Control: max-age=60, public




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
         Host: www.example.com
         Cache-Control: max-age=60, public


                Cacheable for 60 seconds




PHP.TO.START, July 11 2011 - Turin
HTTP/1.1 200 OK
         Host: www.example.com
         Cache-Control: max-age=60, public


        Cacheable by both local and shared caches




PHP.TO.START, July 11 2011 - Turin
but hey, you say




PHP.TO.START, July 11 2011 - Turin
HTTP's cache fails when dealing with really dynamic
  pages, because consumers will always have to hit the
   origin server, although a part of the page would be
      cacheable ( header and footer, for example )




PHP.TO.START, July 11 2011 - Turin
Nope


                     Nope

PHP.TO.START, July 11 2011 - Turin
ESI was built for that
             http://www.w3.org/TR/esi-lang




PHP.TO.START, July 11 2011 - Turin
<esi:include src="http://php2start.com/talks/1" />




PHP.TO.START, July 11 2011 - Turin
<esi:include src="http://php2start.com/talks/1" />




PHP.TO.START, July 11 2011 - Turin
<esi:include src="http://php2start.com/talks/1" />




PHP.TO.START, July 11 2011 - Turin
1s (tweets)




            3600 post

PHP.TO.START, July 11 2011 - Turin
<esi:include src='tweets.html' />




    <esi:include src='article/12.html'
                    />



PHP.TO.START, July 11 2011 - Turin
So what does HTTP cache is meant to solve?




PHP.TO.START, July 11 2011 - Turin
Less work


PHP.TO.START, July 11 2011 - Turin
http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in/photostream/




  because the hard work is delegated to the browser/proxy


 PHP.TO.START, July 11 2011 - Turin
evolve


PHP.TO.START, July 11 2011 - Turin
because cache is abstracted from the application




PHP.TO.START, July 11 2011 - Turin
loose coupling


PHP.TO.START, July 11 2011 - Turin
because caching is bound to the protocol, HTTP, not
to your implementation ( Sf, RoR, Django )




PHP.TO.START, July 11 2011 - Turin
2.
     adaptability & durability


PHP.TO.START, July 11 2011 - Turin
Hypermedia
              another long-time friend




PHP.TO.START, July 11 2011 - Turin
Links
              outrageously semplifying




PHP.TO.START, July 11 2011 - Turin
<link rel="payment" href="/checkout" type="text/html" ... />




PHP.TO.START, July 11 2011 - Turin
<link rel="payment" href="/checkout" type="text/html" ... />




PHP.TO.START, July 11 2011 - Turin
<link rel="payment" href="/checkout" type="text/html" ... />




PHP.TO.START, July 11 2011 - Turin
<link rel="payment" href="/checkout" type="text/html" ... />




PHP.TO.START, July 11 2011 - Turin
POST /users
                 Host: www.example.
                 com




      HTTP/1.1 201 Created
      Host: www.example.com
      Etag: 1234
      X-Powered-By: php/5.3
      Location: /users/1
PHP.TO.START, July 11 2011 - Turin
POST /users
                 Host: www.example.
                 com




      HTTP/1.1 201 Created
      Host: www.example.com
      Etag: 1234
      X-Powered-By: php/5.3
      Location: /users/1
PHP.TO.START, July 11 2011 - Turin
POST /users
                 Host: www.example.
                 com




      HTTP/1.1 201 Created
      Host: www.example.com
      Etag: 1234
      X-Powered-By: php/5.3
      Location: /new-users-db/1
PHP.TO.START, July 11 2011 - Turin
POST /users
                 Host: www.example.
                 com




      HTTP/1.1 201 Created
      Host: www.example.com
      Etag: 1234
      X-Powered-By: php/5.3
      Location: /new-users-db/1
PHP.TO.START, July 11 2011 - Turin
consumers of your API are able to follow
             the changes of your design




PHP.TO.START, July 11 2011 - Turin
everything seems
            cool

         But why REST?

PHP.TO.START, July 11 2011 - Turin
Pros



          Performances
PHP.TO.START, July 11 2011 - Turin
Pros

Scalability

PHP.TO.START, July 11 2011 - Turin
Pros

                                     Durability


PHP.TO.START, July 11 2011 - Turin
amazon.it



PHP.TO.START, July 11 2011 - Turin
REST-IT
      https://groups.google.com/forum/#!forum/rest-it




PHP.TO.START, July 11 2011 - Turin
Alessandro Nadalin
Alessandro Nadalin
         odino.org
Alessandro Nadalin
         odino.org
        @_odino_
Alessandro Nadalin
         odino.org
        @_odino_
Thanks

Alessandro Nadalin
         odino.org
        @_odino_
Credits
                   http://www.flickr.com/photos/larachris/16564077/sizes/o/in/photostream/
              http://www.flickr.com/photos/ashatenbroeke/4367373081/sizes/z/in/photostream/
                  http://www.flickr.com/photos/yourdon/3140270189/sizes/l/in/photostream/
                  http://www.flickr.com/photos/jox1989/4964706072/sizes/l/in/photostream/
                   http://www.flickr.com/photos/brainfg/168506259/sizes/o/in/photostream/
                 http://www.flickr.com/photos/norte_it/3897091546/sizes/o/in/photostream/
             http://www.zdnet.com/blog/service-oriented/soap-versus-rest-a-matter-of-style/3568
            http://www.flickr.com/photos/turtlemom_nancy/2046347762/sizes/l/in/photostream/
                  http://www.flickr.com/photos/juanpg/3333385784/sizes/z/in/photostream/
                   http://www.flickr.com/photos/congvo/301678287/sizes/l/in/photostream/
                 http://www.flickr.com/photos/ihasb33r/2573196546/sizes/z/in/photostream/
             http://www.flickr.com/photos/martin_heigan/4544138976/sizes/o/in/photostream/
                  http://www.flickr.com/photos/cknara/4195099999/sizes/o/in/photostream/
                   http://www.flickr.com/photos/1080p/3076529265/sizes/l/in/photostream/
                 http://www.flickr.com/photos/adamrice/280300202/sizes/l/in/photostream/
                  http://www.flickr.com/photos/tomer_a/541411897/sizes/o/in/photostream/
                  http://www.flickr.com/photos/subpra/4514008262/sizes/l/in/photostream/
                 http://www.flickr.com/photos/lippincott/2539720043/sizes/l/in/photostream/
                 http://www.flickr.com/photos/rawryder/5086090931/sizes/l/in/photostream/
                 http://www.flickr.com/photos/robboudon/5312731161/sizes/l/in/photostream/
             http://www.flickr.com/photos/bc-burnslibrary/4158243488/sizes/o/in/photostream/
            http://www.flickr.com/photos/13606325@N08/2416993706/sizes/o/in/photostream/
                http://www.flickr.com/photos/neothezion/5135841069/sizes/l/in/photostream/
                           http://www.flickr.com/photos/planetschwa/2494067809/
                           http://www.flickr.com/photos/thomasthomas/258931782/
               http://www.flickr.com/photos/rustyboxcars/2629631562/sizes/l/in/photostream/
                http://www.flickr.com/photos/ell-r-brown/4138727474/sizes/l/in/photostream/
                 http://www.flickr.com/photos/noah123/5082076630/sizes/z/in/photostream/
                 http://www.flickr.com/photos/jungle_boy/220181177/sizes/l/in/photostream/
                http://www.flickr.com/photos/prettydaisies/872539081/sizes/l/in/photostream/
               http://www.flickr.com/photos/kaptainkobold/76256150/sizes/o/in/photostream/
             http://www.flickr.com/photos/uomoincravatta/1438372865/sizes/z/in/photostream/




PHP.TO.START, July 11 2011 - Turin

More Related Content

More from Alessandro Nadalin

Spa, isomorphic and back to the server our journey with js @ frontend con po...
Spa, isomorphic and back to the server  our journey with js @ frontend con po...Spa, isomorphic and back to the server  our journey with js @ frontend con po...
Spa, isomorphic and back to the server our journey with js @ frontend con po...Alessandro Nadalin
 
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...Alessandro Nadalin
 
Scaling at Namshi @ Seamless Ecommerce Dubai 2017
Scaling at Namshi @ Seamless Ecommerce Dubai 2017Scaling at Namshi @ Seamless Ecommerce Dubai 2017
Scaling at Namshi @ Seamless Ecommerce Dubai 2017Alessandro Nadalin
 
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in Dubai
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in DubaiAccelerated Mobile Pages @ Dubytes meetup Dec 2016 in Dubai
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in DubaiAlessandro Nadalin
 
A tech team of ~10 @ Rocket Tech Summit 2016 in Berlin
A tech team of ~10 @ Rocket Tech Summit 2016 in BerlinA tech team of ~10 @ Rocket Tech Summit 2016 in Berlin
A tech team of ~10 @ Rocket Tech Summit 2016 in BerlinAlessandro Nadalin
 
React native in the wild @ Codemotion 2016 in Rome
React native in the wild @ Codemotion 2016 in RomeReact native in the wild @ Codemotion 2016 in Rome
React native in the wild @ Codemotion 2016 in RomeAlessandro Nadalin
 
Dockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeDockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeAlessandro Nadalin
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinAlessandro Nadalin
 
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...Alessandro Nadalin
 
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...Alessandro Nadalin
 
A Rocket Internet experience @ ForumPHP Paris 2013
A Rocket Internet experience @ ForumPHP Paris 2013A Rocket Internet experience @ ForumPHP Paris 2013
A Rocket Internet experience @ ForumPHP Paris 2013Alessandro Nadalin
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoAlessandro Nadalin
 
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Alessandro Nadalin
 
GraphDB in PHP @ Codemotion 03/23/2012
GraphDB in PHP @ Codemotion 03/23/2012GraphDB in PHP @ Codemotion 03/23/2012
GraphDB in PHP @ Codemotion 03/23/2012Alessandro Nadalin
 
REST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzREST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzAlessandro Nadalin
 
The state of your own hypertext preprocessor
The state of your own hypertext preprocessorThe state of your own hypertext preprocessor
The state of your own hypertext preprocessorAlessandro Nadalin
 
REST in peace @ Osidays 2011 India 11-21-2011
REST in peace @ Osidays 2011 India 11-21-2011REST in peace @ Osidays 2011 India 11-21-2011
REST in peace @ Osidays 2011 India 11-21-2011Alessandro Nadalin
 
Got units? @ Osidays 2011 India 11-20-2011
Got units? @ Osidays 2011 India 11-20-2011Got units? @ Osidays 2011 India 11-20-2011
Got units? @ Osidays 2011 India 11-20-2011Alessandro Nadalin
 
Graph databases in PHP @ PHPCon Poland 10-22-2011
Graph databases in PHP @ PHPCon Poland 10-22-2011 Graph databases in PHP @ PHPCon Poland 10-22-2011
Graph databases in PHP @ PHPCon Poland 10-22-2011 Alessandro Nadalin
 

More from Alessandro Nadalin (20)

Spa, isomorphic and back to the server our journey with js @ frontend con po...
Spa, isomorphic and back to the server  our journey with js @ frontend con po...Spa, isomorphic and back to the server  our journey with js @ frontend con po...
Spa, isomorphic and back to the server our journey with js @ frontend con po...
 
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...
SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2...
 
Scaling at Namshi @ Seamless Ecommerce Dubai 2017
Scaling at Namshi @ Seamless Ecommerce Dubai 2017Scaling at Namshi @ Seamless Ecommerce Dubai 2017
Scaling at Namshi @ Seamless Ecommerce Dubai 2017
 
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in Dubai
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in DubaiAccelerated Mobile Pages @ Dubytes meetup Dec 2016 in Dubai
Accelerated Mobile Pages @ Dubytes meetup Dec 2016 in Dubai
 
A tech team of ~10 @ Rocket Tech Summit 2016 in Berlin
A tech team of ~10 @ Rocket Tech Summit 2016 in BerlinA tech team of ~10 @ Rocket Tech Summit 2016 in Berlin
A tech team of ~10 @ Rocket Tech Summit 2016 in Berlin
 
React native in the wild @ Codemotion 2016 in Rome
React native in the wild @ Codemotion 2016 in RomeReact native in the wild @ Codemotion 2016 in Rome
React native in the wild @ Codemotion 2016 in Rome
 
Dockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeDockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in Rome
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
 
Namshi in 2014: let's rock!
Namshi in 2014: let's rock!Namshi in 2014: let's rock!
Namshi in 2014: let's rock!
 
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
 
A Rocket Internet experience @ ForumPHP Paris 2013
A Rocket Internet experience @ ForumPHP Paris 2013A Rocket Internet experience @ ForumPHP Paris 2013
A Rocket Internet experience @ ForumPHP Paris 2013
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
 
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
 
GraphDB in PHP @ Codemotion 03/23/2012
GraphDB in PHP @ Codemotion 03/23/2012GraphDB in PHP @ Codemotion 03/23/2012
GraphDB in PHP @ Codemotion 03/23/2012
 
REST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzREST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in Mainz
 
The state of your own hypertext preprocessor
The state of your own hypertext preprocessorThe state of your own hypertext preprocessor
The state of your own hypertext preprocessor
 
REST in peace @ Osidays 2011 India 11-21-2011
REST in peace @ Osidays 2011 India 11-21-2011REST in peace @ Osidays 2011 India 11-21-2011
REST in peace @ Osidays 2011 India 11-21-2011
 
Got units? @ Osidays 2011 India 11-20-2011
Got units? @ Osidays 2011 India 11-20-2011Got units? @ Osidays 2011 India 11-20-2011
Got units? @ Osidays 2011 India 11-20-2011
 
Graph databases in PHP @ PHPCon Poland 10-22-2011
Graph databases in PHP @ PHPCon Poland 10-22-2011 Graph databases in PHP @ PHPCon Poland 10-22-2011
Graph databases in PHP @ PHPCon Poland 10-22-2011
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

REST in peace @ PHP.TO.START 07-11-2011

  • 1. REST in peace PHP.TO.START, July 11 2011 - Turin
  • 2. AGENDA ● Vol. 1: REST in a nutshell ○ Tenets ○ Antipatterns ● Vol. 2: To the rescue ○ HTTP cache ○ HATEOAS PHP.TO.START, July 11 2011 - Turin
  • 3. Sorry for the ugly slide. There will be others. Really sorry. PHP.TO.START, July 11 2011 - Turin
  • 4. REST in a nutshell: 1. Client <> Server PHP.TO.START, July 11 2011 - Turin
  • 5. REST in a nutshell: 2. Stateless PHP.TO.START, July 11 2011 - Turin
  • 6. REST in a nutshell: 3. Cacheable PHP.TO.START, July 11 2011 - Turin
  • 7. REST in a nutshell: 4. Layered system PHP.TO.START, July 11 2011 - Turin
  • 8. REST in a nutshell: 5. Uniform interface PHP.TO.START, July 11 2011 - Turin
  • 9. And obviously nobody had a clue PHP.TO.START, July 11 2011 - Turin
  • 11. 1 URIs PHP.TO.START, July 11 2011 - Turin
  • 12. "REST is about cool URI design" http://apple.com/users/1/licenses/4.json PHP.TO.START, July 11 2011 - Turin
  • 13. "REST is about cool URI design" http://apple.com/users/1/licenses/4.json PHP.TO.START, July 11 2011 - Turin
  • 14. http://apple.com/site/en_US/showUsers.jsp?uid=1&license=4 is OK too PHP.TO.START, July 11 2011 - Turin
  • 16. cool URIs help you think in term of resources David Zuelke PHP.TO.START, July 11 2011 - Turin
  • 17. 2 URIs (bis) PHP.TO.START, July 11 2011 - Turin
  • 18. REST follows a URI schema GET /users POST /users PUT /users/{id} DELETE /users/{id} ... PHP.TO.START, July 11 2011 - Turin
  • 19. REST follows a URI schema GET /users POST /users PUT /users/{id} DELETE /users/{id} ... PHP.TO.START, July 11 2011 - Turin
  • 20. what if you change your URL? PHP.TO.START, July 11 2011 - Turin
  • 21. Yeah, client is broken PHP.TO.START, July 11 2011 - Turin
  • 22. RESTful clients should be driven by service's hypermedia controls Roy Fielding : http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven PHP.TO.START, July 11 2011 - Turin
  • 24. 3 POST is cool PHP.TO.START, July 11 2011 - Turin
  • 25. said SOAP 1.1 PHP.TO.START, July 11 2011 - Turin
  • 26. said SOAP 1.1 PHP.TO.START, July 11 2011 - Turin
  • 27. loosing meaningful verbs at the protocol level PHP.TO.START, July 11 2011 - Turin
  • 28. loosing meaningful verbs at the protocol level nothing cacheable by default PHP.TO.START, July 11 2011 - Turin
  • 29. loosing meaningful verbs at the protocol level nothing cacheable by default what about bookmarking? PHP.TO.START, July 11 2011 - Turin
  • 30. 4 500 is your friend PHP.TO.START, July 11 2011 - Turin
  • 31. said SOAP ( again ) PHP.TO.START, July 11 2011 - Turin
  • 32. GET /users/300 Host: www.example.com PHP.TO.START, July 11 2011 - Turin
  • 33. GET /users/300 Host: www.example.com HTTP/1.1 500 Internal Server Error Etag: 1234 X-Powered-By: php/5.3 ... The record cannot be found PHP.TO.START, July 11 2011 - Turin
  • 34. GET /users/300 Host: www.example.com HTTP/1.1 500 Internal Server Error Etag: 1234 X-Powered-By: php/5.3 ... The record cannot be found PHP.TO.START, July 11 2011 - Turin
  • 35. The HTTP protocol is awesome, and lets you return meaningful and universally-understood status codes PHP.TO.START, July 11 2011 - Turin
  • 36. 404 Not Found PHP.TO.START, July 11 2011 - Turin
  • 37. 404 Not Found OMG Link is broken? PHP.TO.START, July 11 2011 - Turin
  • 39. 202 Accepted You get an immediate OK, and the operation will hopefully complete PHP.TO.START, July 11 2011 - Turin
  • 41. World Wide Web PHP.TO.START, July 11 2011 - Turin
  • 42. the largest data-exchange network on the planet PHP.TO.START, July 11 2011 - Turin
  • 43. And meanwhile, at Facebook... 12TB of new data every day (1 year ago) 500 million users PHP.TO.START, July 11 2011 - Turin
  • 44. And meanwhile, at Google... 1 billion unique monthly googlers PHP.TO.START, July 11 2011 - Turin
  • 45. via HTTP , baby! PHP.TO.START, July 11 2011 - Turin
  • 46. HTTP in a nutshell: 1. Client <> Server PHP.TO.START, July 11 2011 - Turin
  • 47. HTTP in a nutshell: 2. Stateless PHP.TO.START, July 11 2011 - Turin
  • 48. HTTP in a nutshell: 3. widespread cache spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html PHP.TO.START, July 11 2011 - Turin
  • 49. HTTP in a nutshell: Lao Tze Song using Firefox 5 Company proxy Great chinese (fire)wall Reverse proxy Origin server 4. Layered system PHP.TO.START, July 11 2011 - Turin
  • 50. HTTP in a nutshell: 5. it is the uniform interface between clients and servers PHP.TO.START, July 11 2011 - Turin
  • 51. HTTP bleeds REST PHP.TO.START, July 11 2011 - Turin
  • 52. 1. caching & scalability PHP.TO.START, July 11 2011 - Turin
  • 53. Types of cache Local Shared/proxy Shared/reverse proxy PHP.TO.START, July 11 2011 - Turin
  • 54. Types of cache Local Shared/proxy Shared/reverse proxy PHP.TO.START, July 11 2011 - Turin
  • 55. PHP.TO.START, July 11 2011 - Turin
  • 56. Types of cache Local Shared/proxy Shared/reverse proxy PHP.TO.START, July 11 2011 - Turin
  • 57. PHP.TO.START, July 11 2011 - Turin
  • 58. Types of cache Local Shared/proxy Shared/reverse proxy PHP.TO.START, July 11 2011 - Turin
  • 59. PHP.TO.START, July 11 2011 - Turin
  • 60. on the server side PHP.TO.START, July 11 2011 - Turin
  • 61. Caching with Expiration (example) PHP.TO.START, July 11 2011 - Turin
  • 62. HTTP/1.1 200 OK Host: www.example.com Expires: 0 PHP.TO.START, July 11 2011 - Turin
  • 63. HTTP/1.1 200 OK Host: www.example.com Expires: 0 PHP.TO.START, July 11 2011 - Turin
  • 64. HTTP/1.1 200 OK Host: www.example.com Expires: Tue, 31 Jan 2011 01:00 GMT PHP.TO.START, July 11 2011 - Turin
  • 65. HTTP/1.1 200 OK Host: www.example.com Cache-Control: max-age=60, public PHP.TO.START, July 11 2011 - Turin
  • 66. HTTP/1.1 200 OK Host: www.example.com Cache-Control: max-age=60, public PHP.TO.START, July 11 2011 - Turin
  • 67. HTTP/1.1 200 OK Host: www.example.com Cache-Control: max-age=60, public Cacheable for 60 seconds PHP.TO.START, July 11 2011 - Turin
  • 68. HTTP/1.1 200 OK Host: www.example.com Cache-Control: max-age=60, public Cacheable by both local and shared caches PHP.TO.START, July 11 2011 - Turin
  • 69. but hey, you say PHP.TO.START, July 11 2011 - Turin
  • 70. HTTP's cache fails when dealing with really dynamic pages, because consumers will always have to hit the origin server, although a part of the page would be cacheable ( header and footer, for example ) PHP.TO.START, July 11 2011 - Turin
  • 71. Nope Nope PHP.TO.START, July 11 2011 - Turin
  • 72. ESI was built for that http://www.w3.org/TR/esi-lang PHP.TO.START, July 11 2011 - Turin
  • 76. 1s (tweets) 3600 post PHP.TO.START, July 11 2011 - Turin
  • 77. <esi:include src='tweets.html' /> <esi:include src='article/12.html' /> PHP.TO.START, July 11 2011 - Turin
  • 78. So what does HTTP cache is meant to solve? PHP.TO.START, July 11 2011 - Turin
  • 79. Less work PHP.TO.START, July 11 2011 - Turin
  • 80. http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in/photostream/ because the hard work is delegated to the browser/proxy PHP.TO.START, July 11 2011 - Turin
  • 82. because cache is abstracted from the application PHP.TO.START, July 11 2011 - Turin
  • 84. because caching is bound to the protocol, HTTP, not to your implementation ( Sf, RoR, Django ) PHP.TO.START, July 11 2011 - Turin
  • 85. 2. adaptability & durability PHP.TO.START, July 11 2011 - Turin
  • 86. Hypermedia another long-time friend PHP.TO.START, July 11 2011 - Turin
  • 87. Links outrageously semplifying PHP.TO.START, July 11 2011 - Turin
  • 88. <link rel="payment" href="/checkout" type="text/html" ... /> PHP.TO.START, July 11 2011 - Turin
  • 89. <link rel="payment" href="/checkout" type="text/html" ... /> PHP.TO.START, July 11 2011 - Turin
  • 90. <link rel="payment" href="/checkout" type="text/html" ... /> PHP.TO.START, July 11 2011 - Turin
  • 91. <link rel="payment" href="/checkout" type="text/html" ... /> PHP.TO.START, July 11 2011 - Turin
  • 92. POST /users Host: www.example. com HTTP/1.1 201 Created Host: www.example.com Etag: 1234 X-Powered-By: php/5.3 Location: /users/1 PHP.TO.START, July 11 2011 - Turin
  • 93. POST /users Host: www.example. com HTTP/1.1 201 Created Host: www.example.com Etag: 1234 X-Powered-By: php/5.3 Location: /users/1 PHP.TO.START, July 11 2011 - Turin
  • 94. POST /users Host: www.example. com HTTP/1.1 201 Created Host: www.example.com Etag: 1234 X-Powered-By: php/5.3 Location: /new-users-db/1 PHP.TO.START, July 11 2011 - Turin
  • 95. POST /users Host: www.example. com HTTP/1.1 201 Created Host: www.example.com Etag: 1234 X-Powered-By: php/5.3 Location: /new-users-db/1 PHP.TO.START, July 11 2011 - Turin
  • 96. consumers of your API are able to follow the changes of your design PHP.TO.START, July 11 2011 - Turin
  • 97. everything seems cool But why REST? PHP.TO.START, July 11 2011 - Turin
  • 98. Pros Performances PHP.TO.START, July 11 2011 - Turin
  • 100.
  • 101. Pros Durability PHP.TO.START, July 11 2011 - Turin
  • 103. REST-IT https://groups.google.com/forum/#!forum/rest-it PHP.TO.START, July 11 2011 - Turin
  • 105. Alessandro Nadalin odino.org
  • 106. Alessandro Nadalin odino.org @_odino_
  • 107. Alessandro Nadalin odino.org @_odino_
  • 108. Thanks Alessandro Nadalin odino.org @_odino_
  • 109. Credits http://www.flickr.com/photos/larachris/16564077/sizes/o/in/photostream/ http://www.flickr.com/photos/ashatenbroeke/4367373081/sizes/z/in/photostream/ http://www.flickr.com/photos/yourdon/3140270189/sizes/l/in/photostream/ http://www.flickr.com/photos/jox1989/4964706072/sizes/l/in/photostream/ http://www.flickr.com/photos/brainfg/168506259/sizes/o/in/photostream/ http://www.flickr.com/photos/norte_it/3897091546/sizes/o/in/photostream/ http://www.zdnet.com/blog/service-oriented/soap-versus-rest-a-matter-of-style/3568 http://www.flickr.com/photos/turtlemom_nancy/2046347762/sizes/l/in/photostream/ http://www.flickr.com/photos/juanpg/3333385784/sizes/z/in/photostream/ http://www.flickr.com/photos/congvo/301678287/sizes/l/in/photostream/ http://www.flickr.com/photos/ihasb33r/2573196546/sizes/z/in/photostream/ http://www.flickr.com/photos/martin_heigan/4544138976/sizes/o/in/photostream/ http://www.flickr.com/photos/cknara/4195099999/sizes/o/in/photostream/ http://www.flickr.com/photos/1080p/3076529265/sizes/l/in/photostream/ http://www.flickr.com/photos/adamrice/280300202/sizes/l/in/photostream/ http://www.flickr.com/photos/tomer_a/541411897/sizes/o/in/photostream/ http://www.flickr.com/photos/subpra/4514008262/sizes/l/in/photostream/ http://www.flickr.com/photos/lippincott/2539720043/sizes/l/in/photostream/ http://www.flickr.com/photos/rawryder/5086090931/sizes/l/in/photostream/ http://www.flickr.com/photos/robboudon/5312731161/sizes/l/in/photostream/ http://www.flickr.com/photos/bc-burnslibrary/4158243488/sizes/o/in/photostream/ http://www.flickr.com/photos/13606325@N08/2416993706/sizes/o/in/photostream/ http://www.flickr.com/photos/neothezion/5135841069/sizes/l/in/photostream/ http://www.flickr.com/photos/planetschwa/2494067809/ http://www.flickr.com/photos/thomasthomas/258931782/ http://www.flickr.com/photos/rustyboxcars/2629631562/sizes/l/in/photostream/ http://www.flickr.com/photos/ell-r-brown/4138727474/sizes/l/in/photostream/ http://www.flickr.com/photos/noah123/5082076630/sizes/z/in/photostream/ http://www.flickr.com/photos/jungle_boy/220181177/sizes/l/in/photostream/ http://www.flickr.com/photos/prettydaisies/872539081/sizes/l/in/photostream/ http://www.flickr.com/photos/kaptainkobold/76256150/sizes/o/in/photostream/ http://www.flickr.com/photos/uomoincravatta/1438372865/sizes/z/in/photostream/ PHP.TO.START, July 11 2011 - Turin