Successfully reported this slideshow.

HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco

3

Share

Loading in …3
×
1 of 136
1 of 136

HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco

3

Share

Download to read offline

Description

The HTTP protocol has been there for more than 20 years, almost untouched, but the current needs of the web are pushing towards adding some spices into the mix.
In this talk we will have a brief look at the history of HTTP, what SPDY - the "new" protocol proposed by google - brings into the table and how HTTP/2.0 will look like.

Transcript

  1. 1. http://end:of@the.road/? CakeFest, San Francisco, Sep 2013
  2. 2. WARNING
  3. 3. NO CAKEPHP AHEAD
  4. 4. 2ND WARNING
  5. 5. OLD http://www.flickr.com/photos/leoheart/391958347/sizes/o/in/photostream/
  6. 6. AGENDA . History of HTTP . Hidden features . HTTP/2.0 . SPDY
  7. 7. HTTP/X.Y ?
  8. 8. HTTP/1.1?
  9. 9. Web development?
  10. 10. Web development? www Clients M2MServers Automation
  11. 11. Any user can easily interact with a Webpage.
  12. 12. ( except my mom )
  13. 13. What about machines?
  14. 14. They need rules.
  15. 15. www Clients M2MServers Automation logic Web development?
  16. 16. Web development? www Clients M2MServers Automation verbs domains workflows logic
  17. 17. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints
  18. 18. PROTOCOLS
  19. 19. 1991
  20. 20. HTTP/0.9
  21. 21. HTTP/1.0
  22. 22. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints
  23. 23. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding 1996
  24. 24. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996
  25. 25. HTTP/1.1
  26. 26. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996
  27. 27. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS
  28. 28. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS
  29. 29. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS Cache
  30. 30. CACHE
  31. 31. GET /users/1 HTTP/1.1 Host: example.com HTTP/1.1 200 Ok Etag: 123abc GET /users/1 HTTP/1.1 Host: example.com If-None-Match: 123abc HTTP/1.1 304 Not Modified POST /users/1 HTTP/1.1 Host: example.com Etag: 123abcdefgh ... HTTP/1.1 412 Precondition Failed
  32. 32. GET /users/1 HTTP/1.1 Host: example.com HTTP/1.1 200 Ok Cache-Control: max-age=60 GET /users/1 HTTP/1.1 Host: example.com
  33. 33. FOR FREE
  34. 34. and here are a few ways to do so, using expiration validation invalidation
  35. 35. Expiration
  36. 36. GET / HTTP/1.1 Host: www.example.com Expires: 0
  37. 37. GET / HTTP/1.1 Host: www.example.com Expires: 0
  38. 38. GET / HTTP/1.1 Host: www.example.com Expires: Tue, 15 Nov 1994 01:00 GMT
  39. 39. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public
  40. 40. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public
  41. 41. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public Cacheable for 60 seconds
  42. 42. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public Cacheable by both local and shared caches
  43. 43. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600
  44. 44. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 fault-tolerant
  45. 45. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 available during downtime
  46. 46. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 available during revalidation
  47. 47. Validation
  48. 48. GET / HTTP/1.1 Host: www.example. com Etag: 1234
  49. 49. GET / HTTP/1.1 Host: www.example. com Etag: 1234 an identifier for your response
  50. 50. GET / HTTP/1.1 Host: www.example. com If-None-Match: 1234 the browsers asks you if it has been modified Conditional requests
  51. 51. Relax
  52. 52. Calculating an Etag is cheaper than generating a full MVC response
  53. 53. HTTP/1.1 304 Not Modified
  54. 54. GET / HTTP/1.1 Host: www.example.com Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT
  55. 55. GET / HTTP/1.1 Host: www.example.com Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT tell the client about the latest change
  56. 56. GET / HTTP/1.1 Host: www.example.com If-Modified-Since: Tue, 15 Jan 2011 12:00:00 GMT the client asks you if it has been modified since the last time Conditional requests
  57. 57. Relax
  58. 58. Calculating a date is cheaper than retrieving an entire object
  59. 59. HTTP/1.1 304 Not Modified
  60. 60. but hey, you say
  61. 61. 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 )
  62. 62. Nope
  63. 63. ESI was built for that http://www.w3.org/TR/esi-lang
  64. 64. HInclude was built for that http://mnot.github.com/hinclude/
  65. 65. So what does HTTP cache is meant to solve?
  66. 66. Less work
  67. 67. because the hard work is delegated to the browser/proxy http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in/photostream/
  68. 68. evolve
  69. 69. because cache is abstracted from the application
  70. 70. loose coupling
  71. 71. because caching is bound to the protocol, HTTP, not to your implementation ( Sf, RoR, Django )
  72. 72. We’ve just ignored it so far
  73. 73. for 22 years
  74. 74. HTTP/2.0
  75. 75. Nothing to see here.
  76. 76. SPDY
  77. 77. http://dev.chromium.org/spdy/spdy-whitepaper
  78. 78. You're already using it
  79. 79. HTTP on steroids
  80. 80. Requests prioritization
  81. 81. Client Server
  82. 82. Client Server
  83. 83. Client Server
  84. 84. Client Server
  85. 85. Compression
  86. 86. Extended compression
  87. 87. Multiplexing
  88. 88. Client Server R/R model
  89. 89. Client Server R/R model
  90. 90. Client Server R/R model
  91. 91. Client Server Pipelining
  92. 92. Client Server Pipelining
  93. 93. Client Server Multiplexing
  94. 94. Client Server Multiplexing
  95. 95. Client Server Multiplexing
  96. 96. Server push
  97. 97. Result?
  98. 98. Not-so-side effect?
  99. 99. 14 years later...
  100. 100. HTTP/2.0
  101. 101. https://github.com/http2/http2-spec http://tools.ietf.org/html/draft-ietf-httpbis-http2-04
  102. 102. GET /index.html HTTP/1.1 Host: www.example.com SURPRISE!
  103. 103. it will be a binary protocol http://tech.slashdot.org/story/13/07/09/1455200/http-20-will-be-a-binary-protocol
  104. 104. 00 39 01 05 00 00 00 01 84 83 42 11 77 77 77 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 3a 38 30 4c 0d 6d 79 2d 75 73 65 72 2d 61 67 65 6e 74 40 0d 78 2d 73 6f 6d 65 2d 68 65 61 64 65 72 05 66 69 72 73 74
  105. 105. Improved performances http://www.itnews.com.au/News/349694,next-version-of-hyper-text-protocol-to-be-binary.aspx
  106. 106. GET /default.htm HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: HTTP/2.0 HTTP2-Settings: <base64url-encoded HTTP/2.0 settings>
  107. 107. GET /default.htm HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: HTTP/2.0 HTTP2-Settings: <base64url-encoded HTTP/2.0 settings>
  108. 108. Based on?
  109. 109. SPDY http://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0004.html http://www.slideshare.net/mnot/what-http20-will-do-for-you
  110. 110. Which is based on?
  111. 111. HTTP/1.1
  112. 112. SPDY doesnt change the protocol, it just changes the way messages are exchanged over the wire
  113. 113. Semantics are the same.
  114. 114. Workflows are the same.
  115. 115. Verbs are the same.
  116. 116. The interface is the same.
  117. 117. “The minimum bar to entry for replacing HTTP/1.1 is to exactly support its semantics and capabilities, while making it more efficient” Mark Nottingham http://www.mnot.net/blog/2009/11/13/flip
  118. 118. And HTTP/1.1 is based on?
  119. 119. HTTP/1.0
  120. 120. Published 17 years ago
  121. 121. An architecture that lasts 20 years is possible.
  122. 122. ( REST )
  123. 123. ...yawn...
  124. 124. Alessandro Nadalin
  125. 125. Alessandro Nadalin @_odino_
  126. 126. Alessandro Nadalin @_odino_ Namshi | Rocket Internet
  127. 127. Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology
  128. 128. Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology odino.org
  129. 129. Thanks! Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology odino.org

Description

The HTTP protocol has been there for more than 20 years, almost untouched, but the current needs of the web are pushing towards adding some spices into the mix.
In this talk we will have a brief look at the history of HTTP, what SPDY - the "new" protocol proposed by google - brings into the table and how HTTP/2.0 will look like.

Transcript

  1. 1. http://end:of@the.road/? CakeFest, San Francisco, Sep 2013
  2. 2. WARNING
  3. 3. NO CAKEPHP AHEAD
  4. 4. 2ND WARNING
  5. 5. OLD http://www.flickr.com/photos/leoheart/391958347/sizes/o/in/photostream/
  6. 6. AGENDA . History of HTTP . Hidden features . HTTP/2.0 . SPDY
  7. 7. HTTP/X.Y ?
  8. 8. HTTP/1.1?
  9. 9. Web development?
  10. 10. Web development? www Clients M2MServers Automation
  11. 11. Any user can easily interact with a Webpage.
  12. 12. ( except my mom )
  13. 13. What about machines?
  14. 14. They need rules.
  15. 15. www Clients M2MServers Automation logic Web development?
  16. 16. Web development? www Clients M2MServers Automation verbs domains workflows logic
  17. 17. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints
  18. 18. PROTOCOLS
  19. 19. 1991
  20. 20. HTTP/0.9
  21. 21. HTTP/1.0
  22. 22. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints
  23. 23. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding 1996
  24. 24. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996
  25. 25. HTTP/1.1
  26. 26. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996
  27. 27. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS
  28. 28. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS
  29. 29. Web development? www Clients M2MServers Automation verbs domains workflows logic constraints Tim Berners-Lee Roy Fielding GET separate connections POST HEAD1996 DIFF PUT DELETE PATCH TRACE OPTIONS Cache
  30. 30. CACHE
  31. 31. GET /users/1 HTTP/1.1 Host: example.com HTTP/1.1 200 Ok Etag: 123abc GET /users/1 HTTP/1.1 Host: example.com If-None-Match: 123abc HTTP/1.1 304 Not Modified POST /users/1 HTTP/1.1 Host: example.com Etag: 123abcdefgh ... HTTP/1.1 412 Precondition Failed
  32. 32. GET /users/1 HTTP/1.1 Host: example.com HTTP/1.1 200 Ok Cache-Control: max-age=60 GET /users/1 HTTP/1.1 Host: example.com
  33. 33. FOR FREE
  34. 34. and here are a few ways to do so, using expiration validation invalidation
  35. 35. Expiration
  36. 36. GET / HTTP/1.1 Host: www.example.com Expires: 0
  37. 37. GET / HTTP/1.1 Host: www.example.com Expires: 0
  38. 38. GET / HTTP/1.1 Host: www.example.com Expires: Tue, 15 Nov 1994 01:00 GMT
  39. 39. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public
  40. 40. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public
  41. 41. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public Cacheable for 60 seconds
  42. 42. GET / HTTP/1.1 Host: www.example.com Cache-Control: max-age=60, public Cacheable by both local and shared caches
  43. 43. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600
  44. 44. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 fault-tolerant
  45. 45. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 available during downtime
  46. 46. GET / HTTP/1.1 Host: www.example.com Cache-Control: stale-if-error=600, stale-while-revalidate=600 available during revalidation
  47. 47. Validation
  48. 48. GET / HTTP/1.1 Host: www.example. com Etag: 1234
  49. 49. GET / HTTP/1.1 Host: www.example. com Etag: 1234 an identifier for your response
  50. 50. GET / HTTP/1.1 Host: www.example. com If-None-Match: 1234 the browsers asks you if it has been modified Conditional requests
  51. 51. Relax
  52. 52. Calculating an Etag is cheaper than generating a full MVC response
  53. 53. HTTP/1.1 304 Not Modified
  54. 54. GET / HTTP/1.1 Host: www.example.com Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT
  55. 55. GET / HTTP/1.1 Host: www.example.com Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT tell the client about the latest change
  56. 56. GET / HTTP/1.1 Host: www.example.com If-Modified-Since: Tue, 15 Jan 2011 12:00:00 GMT the client asks you if it has been modified since the last time Conditional requests
  57. 57. Relax
  58. 58. Calculating a date is cheaper than retrieving an entire object
  59. 59. HTTP/1.1 304 Not Modified
  60. 60. but hey, you say
  61. 61. 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 )
  62. 62. Nope
  63. 63. ESI was built for that http://www.w3.org/TR/esi-lang
  64. 64. HInclude was built for that http://mnot.github.com/hinclude/
  65. 65. So what does HTTP cache is meant to solve?
  66. 66. Less work
  67. 67. because the hard work is delegated to the browser/proxy http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in/photostream/
  68. 68. evolve
  69. 69. because cache is abstracted from the application
  70. 70. loose coupling
  71. 71. because caching is bound to the protocol, HTTP, not to your implementation ( Sf, RoR, Django )
  72. 72. We’ve just ignored it so far
  73. 73. for 22 years
  74. 74. HTTP/2.0
  75. 75. Nothing to see here.
  76. 76. SPDY
  77. 77. http://dev.chromium.org/spdy/spdy-whitepaper
  78. 78. You're already using it
  79. 79. HTTP on steroids
  80. 80. Requests prioritization
  81. 81. Client Server
  82. 82. Client Server
  83. 83. Client Server
  84. 84. Client Server
  85. 85. Compression
  86. 86. Extended compression
  87. 87. Multiplexing
  88. 88. Client Server R/R model
  89. 89. Client Server R/R model
  90. 90. Client Server R/R model
  91. 91. Client Server Pipelining
  92. 92. Client Server Pipelining
  93. 93. Client Server Multiplexing
  94. 94. Client Server Multiplexing
  95. 95. Client Server Multiplexing
  96. 96. Server push
  97. 97. Result?
  98. 98. Not-so-side effect?
  99. 99. 14 years later...
  100. 100. HTTP/2.0
  101. 101. https://github.com/http2/http2-spec http://tools.ietf.org/html/draft-ietf-httpbis-http2-04
  102. 102. GET /index.html HTTP/1.1 Host: www.example.com SURPRISE!
  103. 103. it will be a binary protocol http://tech.slashdot.org/story/13/07/09/1455200/http-20-will-be-a-binary-protocol
  104. 104. 00 39 01 05 00 00 00 01 84 83 42 11 77 77 77 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 3a 38 30 4c 0d 6d 79 2d 75 73 65 72 2d 61 67 65 6e 74 40 0d 78 2d 73 6f 6d 65 2d 68 65 61 64 65 72 05 66 69 72 73 74
  105. 105. Improved performances http://www.itnews.com.au/News/349694,next-version-of-hyper-text-protocol-to-be-binary.aspx
  106. 106. GET /default.htm HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: HTTP/2.0 HTTP2-Settings: <base64url-encoded HTTP/2.0 settings>
  107. 107. GET /default.htm HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: HTTP/2.0 HTTP2-Settings: <base64url-encoded HTTP/2.0 settings>
  108. 108. Based on?
  109. 109. SPDY http://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0004.html http://www.slideshare.net/mnot/what-http20-will-do-for-you
  110. 110. Which is based on?
  111. 111. HTTP/1.1
  112. 112. SPDY doesnt change the protocol, it just changes the way messages are exchanged over the wire
  113. 113. Semantics are the same.
  114. 114. Workflows are the same.
  115. 115. Verbs are the same.
  116. 116. The interface is the same.
  117. 117. “The minimum bar to entry for replacing HTTP/1.1 is to exactly support its semantics and capabilities, while making it more efficient” Mark Nottingham http://www.mnot.net/blog/2009/11/13/flip
  118. 118. And HTTP/1.1 is based on?
  119. 119. HTTP/1.0
  120. 120. Published 17 years ago
  121. 121. An architecture that lasts 20 years is possible.
  122. 122. ( REST )
  123. 123. ...yawn...
  124. 124. Alessandro Nadalin
  125. 125. Alessandro Nadalin @_odino_
  126. 126. Alessandro Nadalin @_odino_ Namshi | Rocket Internet
  127. 127. Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology
  128. 128. Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology odino.org
  129. 129. Thanks! Alessandro Nadalin @_odino_ Namshi | Rocket Internet VP Technology odino.org

More Related Content

More from Alessandro Nadalin

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

×