Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

REST in peace @ Codemotion 2011 Slide 1 REST in peace @ Codemotion 2011 Slide 2 REST in peace @ Codemotion 2011 Slide 3 REST in peace @ Codemotion 2011 Slide 4 REST in peace @ Codemotion 2011 Slide 5 REST in peace @ Codemotion 2011 Slide 6 REST in peace @ Codemotion 2011 Slide 7 REST in peace @ Codemotion 2011 Slide 8 REST in peace @ Codemotion 2011 Slide 9 REST in peace @ Codemotion 2011 Slide 10 REST in peace @ Codemotion 2011 Slide 11 REST in peace @ Codemotion 2011 Slide 12 REST in peace @ Codemotion 2011 Slide 13 REST in peace @ Codemotion 2011 Slide 14 REST in peace @ Codemotion 2011 Slide 15 REST in peace @ Codemotion 2011 Slide 16 REST in peace @ Codemotion 2011 Slide 17 REST in peace @ Codemotion 2011 Slide 18 REST in peace @ Codemotion 2011 Slide 19 REST in peace @ Codemotion 2011 Slide 20 REST in peace @ Codemotion 2011 Slide 21 REST in peace @ Codemotion 2011 Slide 22 REST in peace @ Codemotion 2011 Slide 23 REST in peace @ Codemotion 2011 Slide 24 REST in peace @ Codemotion 2011 Slide 25 REST in peace @ Codemotion 2011 Slide 26 REST in peace @ Codemotion 2011 Slide 27 REST in peace @ Codemotion 2011 Slide 28 REST in peace @ Codemotion 2011 Slide 29 REST in peace @ Codemotion 2011 Slide 30 REST in peace @ Codemotion 2011 Slide 31 REST in peace @ Codemotion 2011 Slide 32 REST in peace @ Codemotion 2011 Slide 33 REST in peace @ Codemotion 2011 Slide 34 REST in peace @ Codemotion 2011 Slide 35 REST in peace @ Codemotion 2011 Slide 36 REST in peace @ Codemotion 2011 Slide 37 REST in peace @ Codemotion 2011 Slide 38 REST in peace @ Codemotion 2011 Slide 39 REST in peace @ Codemotion 2011 Slide 40 REST in peace @ Codemotion 2011 Slide 41 REST in peace @ Codemotion 2011 Slide 42 REST in peace @ Codemotion 2011 Slide 43 REST in peace @ Codemotion 2011 Slide 44 REST in peace @ Codemotion 2011 Slide 45 REST in peace @ Codemotion 2011 Slide 46 REST in peace @ Codemotion 2011 Slide 47 REST in peace @ Codemotion 2011 Slide 48 REST in peace @ Codemotion 2011 Slide 49 REST in peace @ Codemotion 2011 Slide 50 REST in peace @ Codemotion 2011 Slide 51 REST in peace @ Codemotion 2011 Slide 52 REST in peace @ Codemotion 2011 Slide 53 REST in peace @ Codemotion 2011 Slide 54 REST in peace @ Codemotion 2011 Slide 55 REST in peace @ Codemotion 2011 Slide 56 REST in peace @ Codemotion 2011 Slide 57 REST in peace @ Codemotion 2011 Slide 58 REST in peace @ Codemotion 2011 Slide 59 REST in peace @ Codemotion 2011 Slide 60 REST in peace @ Codemotion 2011 Slide 61 REST in peace @ Codemotion 2011 Slide 62 REST in peace @ Codemotion 2011 Slide 63 REST in peace @ Codemotion 2011 Slide 64 REST in peace @ Codemotion 2011 Slide 65 REST in peace @ Codemotion 2011 Slide 66 REST in peace @ Codemotion 2011 Slide 67 REST in peace @ Codemotion 2011 Slide 68 REST in peace @ Codemotion 2011 Slide 69 REST in peace @ Codemotion 2011 Slide 70 REST in peace @ Codemotion 2011 Slide 71 REST in peace @ Codemotion 2011 Slide 72 REST in peace @ Codemotion 2011 Slide 73 REST in peace @ Codemotion 2011 Slide 74 REST in peace @ Codemotion 2011 Slide 75 REST in peace @ Codemotion 2011 Slide 76 REST in peace @ Codemotion 2011 Slide 77 REST in peace @ Codemotion 2011 Slide 78 REST in peace @ Codemotion 2011 Slide 79 REST in peace @ Codemotion 2011 Slide 80 REST in peace @ Codemotion 2011 Slide 81 REST in peace @ Codemotion 2011 Slide 82 REST in peace @ Codemotion 2011 Slide 83 REST in peace @ Codemotion 2011 Slide 84 REST in peace @ Codemotion 2011 Slide 85 REST in peace @ Codemotion 2011 Slide 86 REST in peace @ Codemotion 2011 Slide 87 REST in peace @ Codemotion 2011 Slide 88 REST in peace @ Codemotion 2011 Slide 89 REST in peace @ Codemotion 2011 Slide 90 REST in peace @ Codemotion 2011 Slide 91 REST in peace @ Codemotion 2011 Slide 92 REST in peace @ Codemotion 2011 Slide 93 REST in peace @ Codemotion 2011 Slide 94 REST in peace @ Codemotion 2011 Slide 95 REST in peace @ Codemotion 2011 Slide 96 REST in peace @ Codemotion 2011 Slide 97 REST in peace @ Codemotion 2011 Slide 98 REST in peace @ Codemotion 2011 Slide 99 REST in peace @ Codemotion 2011 Slide 100 REST in peace @ Codemotion 2011 Slide 101 REST in peace @ Codemotion 2011 Slide 102 REST in peace @ Codemotion 2011 Slide 103 REST in peace @ Codemotion 2011 Slide 104 REST in peace @ Codemotion 2011 Slide 105 REST in peace @ Codemotion 2011 Slide 106 REST in peace @ Codemotion 2011 Slide 107 REST in peace @ Codemotion 2011 Slide 108 REST in peace @ Codemotion 2011 Slide 109 REST in peace @ Codemotion 2011 Slide 110 REST in peace @ Codemotion 2011 Slide 111 REST in peace @ Codemotion 2011 Slide 112 REST in peace @ Codemotion 2011 Slide 113 REST in peace @ Codemotion 2011 Slide 114 REST in peace @ Codemotion 2011 Slide 115 REST in peace @ Codemotion 2011 Slide 116 REST in peace @ Codemotion 2011 Slide 117 REST in peace @ Codemotion 2011 Slide 118 REST in peace @ Codemotion 2011 Slide 119 REST in peace @ Codemotion 2011 Slide 120 REST in peace @ Codemotion 2011 Slide 121 REST in peace @ Codemotion 2011 Slide 122 REST in peace @ Codemotion 2011 Slide 123 REST in peace @ Codemotion 2011 Slide 124 REST in peace @ Codemotion 2011 Slide 125 REST in peace @ Codemotion 2011 Slide 126 REST in peace @ Codemotion 2011 Slide 127 REST in peace @ Codemotion 2011 Slide 128 REST in peace @ Codemotion 2011 Slide 129 REST in peace @ Codemotion 2011 Slide 130 REST in peace @ Codemotion 2011 Slide 131 REST in peace @ Codemotion 2011 Slide 132 REST in peace @ Codemotion 2011 Slide 133 REST in peace @ Codemotion 2011 Slide 134 REST in peace @ Codemotion 2011 Slide 135 REST in peace @ Codemotion 2011 Slide 136 REST in peace @ Codemotion 2011 Slide 137 REST in peace @ Codemotion 2011 Slide 138 REST in peace @ Codemotion 2011 Slide 139 REST in peace @ Codemotion 2011 Slide 140 REST in peace @ Codemotion 2011 Slide 141 REST in peace @ Codemotion 2011 Slide 142 REST in peace @ Codemotion 2011 Slide 143 REST in peace @ Codemotion 2011 Slide 144 REST in peace @ Codemotion 2011 Slide 145 REST in peace @ Codemotion 2011 Slide 146 REST in peace @ Codemotion 2011 Slide 147 REST in peace @ Codemotion 2011 Slide 148 REST in peace @ Codemotion 2011 Slide 149 REST in peace @ Codemotion 2011 Slide 150 REST in peace @ Codemotion 2011 Slide 151 REST in peace @ Codemotion 2011 Slide 152 REST in peace @ Codemotion 2011 Slide 153 REST in peace @ Codemotion 2011 Slide 154 REST in peace @ Codemotion 2011 Slide 155 REST in peace @ Codemotion 2011 Slide 156 REST in peace @ Codemotion 2011 Slide 157 REST in peace @ Codemotion 2011 Slide 158 REST in peace @ Codemotion 2011 Slide 159 REST in peace @ Codemotion 2011 Slide 160 REST in peace @ Codemotion 2011 Slide 161 REST in peace @ Codemotion 2011 Slide 162 REST in peace @ Codemotion 2011 Slide 163 REST in peace @ Codemotion 2011 Slide 164 REST in peace @ Codemotion 2011 Slide 165 REST in peace @ Codemotion 2011 Slide 166 REST in peace @ Codemotion 2011 Slide 167 REST in peace @ Codemotion 2011 Slide 168 REST in peace @ Codemotion 2011 Slide 169 REST in peace @ Codemotion 2011 Slide 170 REST in peace @ Codemotion 2011 Slide 171 REST in peace @ Codemotion 2011 Slide 172 REST in peace @ Codemotion 2011 Slide 173 REST in peace @ Codemotion 2011 Slide 174 REST in peace @ Codemotion 2011 Slide 175 REST in peace @ Codemotion 2011 Slide 176 REST in peace @ Codemotion 2011 Slide 177 REST in peace @ Codemotion 2011 Slide 178 REST in peace @ Codemotion 2011 Slide 179 REST in peace @ Codemotion 2011 Slide 180 REST in peace @ Codemotion 2011 Slide 181 REST in peace @ Codemotion 2011 Slide 182 REST in peace @ Codemotion 2011 Slide 183 REST in peace @ Codemotion 2011 Slide 184 REST in peace @ Codemotion 2011 Slide 185 REST in peace @ Codemotion 2011 Slide 186 REST in peace @ Codemotion 2011 Slide 187 REST in peace @ Codemotion 2011 Slide 188 REST in peace @ Codemotion 2011 Slide 189 REST in peace @ Codemotion 2011 Slide 190 REST in peace @ Codemotion 2011 Slide 191 REST in peace @ Codemotion 2011 Slide 192 REST in peace @ Codemotion 2011 Slide 193 REST in peace @ Codemotion 2011 Slide 194 REST in peace @ Codemotion 2011 Slide 195 REST in peace @ Codemotion 2011 Slide 196 REST in peace @ Codemotion 2011 Slide 197 REST in peace @ Codemotion 2011 Slide 198 REST in peace @ Codemotion 2011 Slide 199 REST in peace @ Codemotion 2011 Slide 200 REST in peace @ Codemotion 2011 Slide 201 REST in peace @ Codemotion 2011 Slide 202 REST in peace @ Codemotion 2011 Slide 203 REST in peace @ Codemotion 2011 Slide 204 REST in peace @ Codemotion 2011 Slide 205 REST in peace @ Codemotion 2011 Slide 206 REST in peace @ Codemotion 2011 Slide 207
Upcoming SlideShare
Awareness, Accessibility and Barriers in Utilization of Rastriya Swasthya Bima Yozna Services among BPL Families in Puri District, Odisha
Next
Download to read offline and view in fullscreen.

4 Likes

Share

Download to read offline

REST in peace @ Codemotion 2011

Download to read offline

Presentation at the 2011 Codemotion (formerly known as the italian JavaDay) about RESTful architectures and caching with Edge Side Includes specification.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

REST in peace @ Codemotion 2011

  1. 1. REST in peace Rome, March 5th 2011 Licensed under CC license
  2. 2. Agenda Rest in a nutshell ESI in a nutshell The uniform interface Pros/Cons Bad APIs ESI + REST Problems Licensed under CC license Rome, March 5th 2011
  3. 3. Sorry for the ugly slide. There will be others. Really sorry. Licensed under CC license Rome, March 5th 2011
  4. 4. Let's go! Licensed under CC license Rome, March 5th 2011
  5. 5. Let's go back! Licensed under CC license Rome, March 5th 2011
  6. 6. 2000 Fielding's dissertation: REpresentational State Transfer http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm Licensed under CC license Rome, March 5th 2011
  7. 7. REST in a nutshell: Licensed under CC license Rome, March 5th 2011
  8. 8. REST in a nutshell: 1. Client <> Server Licensed under CC license Rome, March 5th 2011
  9. 9. REST in a nutshell: 2. Stateless Licensed under CC license Rome, March 5th 2011
  10. 10. Recover and failover paradise Licensed under CC license Rome, March 5th 2011
  11. 11. What about the user session? Licensed under CC license Rome, March 5th 2011
  12. 12. Must die Licensed under CC license Rome, March 5th 2011
  13. 13. What about the user cookies? Licensed under CC license Rome, March 5th 2011
  14. 14. Should die Licensed under CC license Rome, March 5th 2011
  15. 15. Wondering why? Licensed under CC license Rome, March 5th 2011
  16. 16. Wondering why? Send a cookie via FTP. http://www.google.it/search?sourceid=chrome&client=ubuntu&channel=cs&ie=UTF-8&q=ftp+cookies And http://www.ics.uci.edu/~fielding/pubs/dissertation/evaluation.htm#sec_6_3_4_2 Licensed under CC license Rome, March 5th 2011
  17. 17. REST in a nutshell: 3. Cacheable Licensed under CC license Rome, March 5th 2011
  18. 18. REST in a nutshell: When dealing with safe methods, the response should be able to tell the client, or whatever stands behind the request, how to cache it. Licensed under CC license Rome, March 5th 2011
  19. 19. REST in a nutshell: 4. Layered system Licensed under CC license Rome, March 5th 2011
  20. 20. REST in a nutshell: 5. Uniform interface Licensed under CC license Rome, March 5th 2011
  21. 21. Uniform interface hierarchic resource identification HTTP verbs to perform operations manipulation through representation HATEOAS Licensed under CC license Rome, March 5th 2011
  22. 22. Richardson maturity model hierarchic resource identification HTTP verbs to perform operations manipulation through representation HATEOAS Really well explained by Fowler: http://martinfowler. com/articles/richardsonMaturityModel.html#level0 Licensed under CC license Rome, March 5th 2011
  23. 23. Richardson maturity model mess hierarchic resource identification HTTP verbs to perform operations HATEOAS Licensed under CC license Rome, March 5th 2011
  24. 24. Richardson maturity model 0. mess hierarchic resource identification HTTP verbs to perform operations HATEOAS Licensed under CC license Rome, March 5th 2011
  25. 25. 0 Using HTTP Licensed under CC license Rome, March 5th 2011
  26. 26. Without giving a f*** Licensed under CC license Rome, March 5th 2011
  27. 27. Richardson maturity model 1. 0. mess hierarchic resource identification HTTP verbs to perform operations HATEOAS Licensed under CC license Rome, March 5th 2011
  28. 28. 1 mytastyproduct.com/users mytastyproduct.com/users/1/licenses/4 Licensed under CC license Rome, March 5th 2011
  29. 29. Richardson maturity model 1. 0. mess hierarchic resource identification 2. HTTP verbs to perform operations HATEOAS Licensed under CC license Rome, March 5th 2011
  30. 30. 2 Licensed under CC license Rome, March 5th 2011
  31. 31. Richardson maturity model 1. 0. mess hierarchic resource identification 2. HTTP verbs to perform operations 3. HATEOAS Licensed under CC license Rome, March 5th 2011
  32. 32. 3. GOD http://www.slideshare.net/trilancer/why-hateoas-1547275 Licensed under CC license Rome, March 5th 2011
  33. 33. Hyperlinks Licensed under CC license Rome, March 5th 2011
  34. 34. Hypermedia formats http://amundsen.com/hypermedia/ Licensed under CC license Rome, March 5th 2011
  35. 35. Single entry point Licensed under CC license Rome, March 5th 2011
  36. 36. Uniform interface is interesting. Everyone seem to have its own RESTful "service". But no one seem to entirely implement a uniform interface. Licensed under CC license Rome, March 5th 2011
  37. 37. Uniform interface is interesting. Everyone seem to have its own RESTful "service". But no one seem to entirely implement a uniform interface. That means... ...? Licensed under CC license Rome, March 5th 2011
  38. 38. No RESTful stuff Licensed under CC license Rome, March 5th 2011
  39. 39. But don't be too religious. Licensed under CC license Rome, March 5th 2011
  40. 40. But don't be too religious. Cookies stuff included. REST gets raped everyday, get over it. Licensed under CC license Rome, March 5th 2011
  41. 41. Counterorder Licensed under CC license Rome, March 5th 2011
  42. 42. Let's be religious 'bout that! Licensed under CC license Rome, March 5th 2011
  43. 43. Just for a couple minutes :) Licensed under CC license Rome, March 5th 2011
  44. 44. API #fail Licensed under CC license Rome, March 5th 2011
  45. 45. Licensed under CC license Rome, March 5th 2011
  46. 46. flickr.com/people/{user-id} Licensed under CC license Rome, March 5th 2011
  47. 47. flickr.com/photos/{user-id} Licensed under CC license Rome, March 5th 2011
  48. 48. flickr.com/photos/{user-id} flickr.com/users/{user-id}/photos/ Licensed under CC license Rome, March 5th 2011
  49. 49. flickr.photos.delete Licensed under CC license Rome, March 5th 2011
  50. 50. wow, a delete! Licensed under CC license Rome, March 5th 2011
  51. 51. POST Licensed under CC license Rome, March 5th 2011
  52. 52. Is that even legal? Licensed under CC license Rome, March 5th 2011
  53. 53. Licensed under CC license Rome, March 5th 2011
  54. 54. GET /api.twitter.com/1/users/show.format Licensed under CC license Rome, March 5th 2011
  55. 55. GET /api.twitter.com/1/users/show.format GET /api.twitter.com/1/users/ HTTP Accept header: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Licensed under CC license Rome, March 5th 2011
  56. 56. GET /api.twitter.com/1/users/search.format?query... Licensed under CC license Rome, March 5th 2011
  57. 57. GET /api.twitter.com/1/users/search.format?query... GET /api.twitter.com/1/users?name=jack Licensed under CC license Rome, March 5th 2011
  58. 58. Licensed under CC license Rome, March 5th 2011
  59. 59. Only JSON responses Licensed under CC license Rome, March 5th 2011
  60. 60. JSON is evil Licensed under CC license Rome, March 5th 2011
  61. 61. { "date": "2011-01-01", "stock": "100", "price": "12" } Licensed under CC license Rome, March 5th 2011
  62. 62. The business evolves Licensed under CC license Rome, March 5th 2011
  63. 63. { "date": "2011-01-01", "stock": "100", "price": [ {"currency": "EUR", "amount": "12"}, {"currency": "USD", "amount": "10"} ] } Credits: http://twitter.com/#!/odracci Licensed under CC license Rome, March 5th 2011
  64. 64. Yeah, client is broken Licensed under CC license Rome, March 5th 2011
  65. 65. No good Licensed under CC license Rome, March 5th 2011
  66. 66. BTW <xml...> <product...> <price currency="EUR">25</price> <price currency="USD">23</price> </product> </xml> Licensed under CC license Rome, March 5th 2011
  67. 67. Well, getting back to... Licensed under CC license Rome, March 5th 2011
  68. 68. Licensed under CC license Rome, March 5th 2011
  69. 69. Create a new class http://<server>:[<port>]/class/<database>/<class-name> Licensed under CC license Rome, March 5th 2011
  70. 70. Response? Licensed under CC license Rome, March 5th 2011
  71. 71. HTTP/1.1 201 Created Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Date: Fri Feb 18 03:21:09 CET 2011 Content-Type: text/plain Server: OrientDB Server v.0.9.24 Connection: Keep-Alive Set-Cookie: OSESSIONID=OS12979956697985725150466358620636; Path=/; HttpOnly CONTENT-LENGTH: 221 Licensed under CC license Rome, March 5th 2011
  72. 72. CAN I HAZ HATEOAZ? Licensed under CC license Rome, March 5th 2011
  73. 73. HTTP 201 Created Location /bla bla bla bla... http://en.wikipedia.org/wiki/HTTP_location Licensed under CC license Rome, March 5th 2011
  74. 74. I am really ashamed of having bothered you for 78 slides to say how to perform a GET Licensed under CC license Rome, March 5th 2011
  75. 75. ESI in peace Rome, March 5th 2011 Licensed under CC license Rome, March 5th 2011
  76. 76. Edge Side Includes A de facto standard for bla bla bla... Licensed under CC license Rome, March 5th 2011
  77. 77. Edge Side Includes A de facto standard for bla bla bla... Server side includes ( not SSI! ) usually handled by the architecture's ESI processor. http://www.w3.org/TR/esi-lang http://www.w3.org/TR/edge-arch Licensed under CC license Rome, March 5th 2011
  78. 78. Include <esi:include src="http://codemotion.it/talks/1" /> Licensed under CC license Rome, March 5th 2011
  79. 79. Try/Catch <esi:try> <esi:attempt> <esi:comment text="The REST talk"/> <esi:include src="http://codemotion.it/talks/1" /> </esi:attempt> Licensed under CC license Rome, March 5th 2011
  80. 80. Fallback <esi:try> <esi:attempt> <esi:comment text="The REST talk"/> <esi:include src="http://codemotion.it/talks/1" /> </esi:attempt> <esi:except> <esi:comment text="fallback"/> <p>epic fail</p> </esi:except> </esi:try> Licensed under CC license Rome, March 5th 2011
  81. 81. Pitfalls Licensed under CC license Rome, March 5th 2011
  82. 82. Pitfalls Processor configuration Licensed under CC license Rome, March 5th 2011
  83. 83. Pitfalls Processor configuration Implementation of fallbacks for handling errors Licensed under CC license Rome, March 5th 2011
  84. 84. Pitfalls Processor configuration Implementation of fallbacks for handling errors it relies on the processor, which gains importance, for creating any single response ( not really true :-) ) Licensed under CC license Rome, March 5th 2011
  85. 85. Pros Licensed under CC license Rome, March 5th 2011
  86. 86. Pros Licensed under CC license Performances Rome, March 5th 2011
  87. 87. Pros Effective gateway cache Licensed under CC license Rome, March 5th 2011
  88. 88. Pros Scalability Licensed under CC license Rome, March 5th 2011
  89. 89. Which leads us to... Licensed under CC license Rome, March 5th 2011
  90. 90. REST+ESI in peace Rome, March 5th 2011 Licensed under CC license Rome, March 5th 2011
  91. 91. This is a response Licensed under CC license Rome, March 5th 2011
  92. 92. aggregating many resources Licensed under CC license Rome, March 5th 2011
  93. 93. So here's a resource. Licensed under CC license Rome, March 5th 2011
  94. 94. So here's a resource. Or, better, its representation. Licensed under CC license Rome, March 5th 2011
  95. 95. Five minutes cache 2 days cache Licensed under CC license Rome, March 5th 2011
  96. 96. Let's write our own caching system Licensed under CC license Rome, March 5th 2011
  97. 97. because we need to cache different resources with different expiring intervals odino@odino-phenom:~$ ab -n 1000 -c 10 http://127. 0.0.1/tmp/esi.php This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http: //www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Licensed under CC license Rome, March 5th 2011
  98. 98. Hell no! Licensed under CC license Rome, March 5th 2011
  99. 99. USE ESI and HTTP cache Licensed under CC license Rome, March 5th 2011
  100. 100. Understanding the web cache http://www.mnot.net/cache_docs/#WORK HTTP cache http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html Licensed under CC license Rome, March 5th 2011
  101. 101. Without a single LoC Licensed under CC license Rome, March 5th 2011
  102. 102. ehm... Licensed under CC license Rome, March 5th 2011
  103. 103. With a few LoCs, gotta admit Licensed under CC license Rome, March 5th 2011
  104. 104. The Architecture Licensed under CC license Rome, March 5th 2011
  105. 105. Client Reverse proxy / ESI processor Application Database Licensed under CC license Rome, March 5th 2011
  106. 106. No problems, uh? Licensed under CC license Rome, March 5th 2011
  107. 107. Hell Licensed under CC license no! Rome, March 5th 2011
  108. 108. 1. Complexity Licensed under CC license Rome, March 5th 2011
  109. 109. 1. Complexity Resolved by your needs Licensed under CC license Rome, March 5th 2011
  110. 110. 2. Caching Licensed under CC license Rome, March 5th 2011
  111. 111. 2. Caching Resolved by the gateway cache aka your reverse proxy aka, most of the time, Varnish Licensed under CC license Rome, March 5th 2011
  112. 112. You know Varnish, don't you? Licensed under CC license Rome, March 5th 2011
  113. 113. Without varnish Concurrency Level: 10 Time taken for tests: 1.467 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 5476471 bytes HTML transferred: 5285280 bytes Requests per second: 681.69 [#/sec] (mean) Time per request: 14.670 [ms] (mean) Time per request: 1.467 [ms] (mean, across all concurrent requests) Transfer rate: 3645.73 [Kbytes/sec] received Licensed under CC license Rome, March 5th 2011
  114. 114. With varnish Concurrency Level: 10 Time taken for tests: 0.179 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 5479938 bytes HTML transferred: 5288556 bytes Requests per second: 5587.65 [#/sec] (mean) Time per request: 1.790 [ms] (mean) Time per request: 0.179 [ms] (mean, across all concurrent requests) Transfer rate: 29902.34 [Kbytes/sec] received Licensed under CC license Rome, March 5th 2011
  115. 115. AWESOME huh? Licensed under CC license Rome, March 5th 2011
  116. 116. NO. Licensed under CC license Rome, March 5th 2011
  117. 117. Where's my HATEOAS, again? Licensed under CC license Rome, March 5th 2011
  118. 118. Defining a request header in ESI <esi:environment> <esi:request_header name="Accept" value="text/vnd.odino.xhtml"/> </esi:environment> Licensed under CC license Rome, March 5th 2011
  119. 119. Defining a request header in ESI <esi:environment> <esi:request_header name="Accept" value="text/vnd.odino.xhtml"/> </esi:environment> Content Negotiation Licensed under CC license Rome, March 5th 2011
  120. 120. Awful support Licensed under CC license Rome, March 5th 2011
  121. 121. Client Reverse proxy ? Application Licensed under CC license Rome, March 5th 2011
  122. 122. Client Reverse proxy ESI processor Application Licensed under CC license Rome, March 5th 2011
  123. 123. Some freaking crazy people built a webserver Licensed under CC license Rome, March 5th 2011
  124. 124. in PHP Licensed under CC license Rome, March 5th 2011
  125. 125. with the RAD framework Symfony2 http://symfony-reloaded.org/ https://github.com/pminnieur/ServerBundle Licensed under CC license Rome, March 5th 2011
  126. 126. That means you should be able to write your own reverse proxy acting as an ESI processor. I mean, if they were able to write a webserver... Licensed under CC license Rome, March 5th 2011
  127. 127. in PHP Licensed under CC license Rome, March 5th 2011
  128. 128. you have no excuses Licensed under CC license Rome, March 5th 2011
  129. 129. But please Licensed under CC license Rome, March 5th 2011
  130. 130. Make it support all the ESI stuff Licensed under CC license Rome, March 5th 2011
  131. 131. Not like Varnish http://www.varnish-cache.org/trac/wiki/ESIfeatures Licensed under CC license Rome, March 5th 2011
  132. 132. Extended content negotiation Licensed under CC license Rome, March 5th 2011
  133. 133. text/vnd.xhtml+xml;profile=esi Chapter 8: http://www.rfc-editor.org/rfc/rfc3236.txt Licensed under CC license Rome, March 5th 2011
  134. 134. Response to the proc text/vnd.xhtml+xml;profile=esi <head> .... </head> <body> <esi ... /> </body> Licensed under CC license Rome, March 5th 2011
  135. 135. Profile is used because the browser won't render such this kind of formats: Licensed under CC license Rome, March 5th 2011
  136. 136. text/vnd.xhesiml+xml Licensed under CC license Rome, March 5th 2011
  137. 137. Response for fragments text/vnd.xhesiml+xml <div> .... </div> <span> <esi ... /> </span> Licensed under CC license Rome, March 5th 2011
  138. 138. Client Reverse proxy Supporting all the ESI ESI processor specification http://www.w3.org/TR/esi-lang Application Licensed under CC license Rome, March 5th 2011
  139. 139. Overhead? Licensed under CC license Rome, March 5th 2011
  140. 140. Is that a problem? Licensed under CC license Rome, March 5th 2011
  141. 141. Client Reverse proxy Supporting all the ESI ESI processor specification http://www.w3.org/TR/esi-lang Application Licensed under CC license Rome, March 5th 2011
  142. 142. Varnish is there for a reason Licensed under CC license Rome, March 5th 2011
  143. 143. Because at that Licensed under CC license Rome, March 5th 2011
  144. 144. Varnish ROCKS! Licensed under CC license Rome, March 5th 2011
  145. 145. Ready to include a resource with our custom hypermedia format <esi:environment> <esi:request_header name="Accept" value="text/vnd.blablabla"/> </esi:environment> Licensed under CC license Rome, March 5th 2011
  146. 146. But don't screw everything forgetting the remaining parts of HATEOAS, like hypermedia relations. http://www.slideshare.net/adorepump/hateoas-the-confusing-bit-from-rest http://tech.groups.yahoo.com/group/rest-discuss/message/17011 Licensed under CC license Rome, March 5th 2011
  147. 147. So, with a Licensed under CC license Rome, March 5th 2011
  148. 148. Layered Licensed under CC license Rome, March 5th 2011
  149. 149. Cacheable Licensed under CC license Rome, March 5th 2011
  150. 150. Stateless Licensed under CC license Rome, March 5th 2011
  151. 151. Driven by Licensed under CC license Rome, March 5th 2011
  152. 152. Uniform interface Licensed under CC license Rome, March 5th 2011
  153. 153. and hypermedia Licensed under CC license Rome, March 5th 2011
  154. 154. architecture Licensed under CC license Rome, March 5th 2011
  155. 155. Oh Licensed under CC license dear Rome, March 5th 2011
  156. 156. Richardson maturity model level 3 Licensed under CC license Rome, March 5th 2011
  157. 157. Again... Licensed under CC license Rome, March 5th 2011
  158. 158. Pros Licensed under CC license Performances Rome, March 5th 2011
  159. 159. Pros Scalability Licensed under CC license Rome, March 5th 2011
  160. 160. Pros Durability Licensed under CC license Rome, March 5th 2011
  161. 161. Where to REST in peace Rome, March 5th 2011 Licensed under CC license Rome, March 5th 2011
  162. 162. any webservice Licensed under CC license Rome, March 5th 2011
  163. 163. machine to machine Licensed under CC license Rome, March 5th 2011
  164. 164. Be the next AtomPub http://bitworking.org/projects/atom/rfc5023.html Licensed under CC license Rome, March 5th 2011
  165. 165. Actually... Licensed under CC license Rome, March 5th 2011
  166. 166. Licensed under CC license Rome, March 5th 2011
  167. 167. "REST is software design on the scale of decades: every detail is intended to promote software longevity and independent evolution. Many of the constraints are directly opposed to short-term efficiency. Unfortunately, people are fairly good at short-term design, and usually awful at long-term design. " Roy Fielding Licensed under CC license Rome, March 5th 2011
  168. 168. Put a bit of REST everywhere Licensed under CC license Rome, March 5th 2011
  169. 169. http://articles.sfgate.com/2011-02-20/opinion/28613184_1_news-network-cable-and-satellite-website http://tech.groups.yahoo.com/group/rest-discuss/message/17370 +2.500% traffic Licensed under CC license Rome, March 5th 2011
  170. 170. Rules of good design Licensed under CC license Rome, March 5th 2011
  171. 171. No need to be religious Licensed under CC license Rome, March 5th 2011
  172. 172. This talk sucks in peace Rome, March 5th 2011 Licensed under CC license Rome, March 5th 2011
  173. 173. 1 Licensed under CC license Rome, March 5th 2011
  174. 174. Agile development vs REST Licensed under CC license Rome, March 5th 2011
  175. 175. Agile development vs REST mmmmmmmmmmmm................ http://www.odino.org/288/restful-and-agile-love-hate-love Licensed under CC license Rome, March 5th 2011
  176. 176. 2 Licensed under CC license Rome, March 5th 2011
  177. 177. Browsers suck Licensed under CC license Rome, March 5th 2011
  178. 178. HTTP authentication http://www.odino.org/238/mockups-of-web-authentication-the-rest-rescue Licensed under CC license Rome, March 5th 2011
  179. 179. 3 Licensed under CC license Rome, March 5th 2011
  180. 180. HTML5 Licensed under CC license Rome, March 5th 2011
  181. 181. Everybody loves it Licensed under CC license Rome, March 5th 2011
  182. 182. I HATE HTML5 Licensed under CC license Rome, March 5th 2011
  183. 183. Original specification: "support for PUT and DELETE verbs" Licensed under CC license Rome, March 5th 2011
  184. 184. People went insane Licensed under CC license Rome, March 5th 2011
  185. 185. Current status? Licensed under CC license Rome, March 5th 2011
  186. 186. Removed Licensed under CC license Rome, March 5th 2011
  187. 187. There are no use cases Licensed under CC license Rome, March 5th 2011
  188. 188. They said Licensed under CC license Rome, March 5th 2011
  189. 189. http://www.w3.org/TR/2010/WD-html5-diff-20101019/#changes-2010-06-24 Licensed under CC license Rome, March 5th 2011
  190. 190. Then people got mad Licensed under CC license Rome, March 5th 2011
  191. 191. A disclaimer in peace Rome, March 5th 2011 Licensed under CC license Rome, March 5th 2011
  192. 192. JSON does not suck. At all. http://www.slideshare.net/Wombert/xml-versus-the-new-kids-on-the-block-phpbnl11-20110129 Licensed under CC license Rome, March 5th 2011
  193. 193. Varnish does not suck. At all. Licensed under CC license Rome, March 5th 2011
  194. 194. HTML5 does not suck. At all. http://www.html5rocks.com/ Licensed under CC license Rome, March 5th 2011
  195. 195. OrientDB rocks Ask Luca Garulli, he might be in this room http://www.orientechnologies.com/ Licensed under CC license Rome, March 5th 2011
  196. 196. Everything is a tradeoff Licensed under CC license Rome, March 5th 2011
  197. 197. Hints? Licensed under CC license Rome, March 5th 2011
  198. 198. David Zuelke knows best Licensed under CC license Rome, March 5th 2011
  199. 199. Design HTTP interfaces and RESTful webservices http://www.slideshare.net/Wombert/designing-http-interfaces-and-restful-web-services-phpbnl11-20110128 Licensed under CC license Rome, March 5th 2011
  200. 200. Others know best Licensed under CC license Rome, March 5th 2011
  201. 201. 300 RESTful boring slides :) http://www.slideshare.net/guilhermecaelum/rest-in-practice REST as the DBMS of the web http://www.slideshare.net/dnene/rest-representational-state-transfer-explained Licensed under CC license Rome, March 5th 2011
  202. 202. amazon.it Licensed under CC license Rome, March 5th 2011
  203. 203. Thanks! Alessandro Nadalin odino.org
  204. 204. @_odino_ #codemotion Licensed under CC license Rome, March 5th 2011
  205. 205. 12 - 14 May, Verona
  206. 206. 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/
  • luanatf

    Mar. 25, 2012
  • cbeschi

    Mar. 20, 2011
  • lvca

    Mar. 9, 2011
  • filosganga

    Mar. 7, 2011

Presentation at the 2011 Codemotion (formerly known as the italian JavaDay) about RESTful architectures and caching with Edge Side Includes specification.

Views

Total views

4,758

On Slideshare

0

From embeds

0

Number of embeds

465

Actions

Downloads

60

Shares

0

Comments

0

Likes

4

×