http://end:of@the.road/?
CakeFest, San Francisco, Sep 2013
WARNING
NO
CAKEPHP
AHEAD
2ND WARNING
OLD
http://www.flickr.com/photos/leoheart/391958347/sizes/o/in/photostream/
AGENDA
. History of HTTP
. Hidden features
. HTTP/2.0
. SPDY
HTTP/X.Y ?
HTTP/1.1?
Web development?
Web development?
www
Clients
M2MServers
Automation
Any user can easily
interact with a
Webpage.
( except my mom )
What about machines?
They need rules.
www
Clients
M2MServers
Automation
logic
Web development?
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
PROTOCOLS
1991
HTTP/0.9
HTTP/1.0
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
HTTP/1.1
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
Web development?
www
Clients
M2MServers
Automation
verbs
domains
workflows
logic
constraints
Tim Berners-Lee
Roy Fielding
...
CACHE
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...
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
FOR FREE
and here are a few ways to do
so, using
expiration
validation
invalidation
Expiration
GET / HTTP/1.1
Host: www.example.com
Expires: 0
GET / HTTP/1.1
Host: www.example.com
Expires: 0
GET / HTTP/1.1
Host: www.example.com
Expires: Tue, 15 Nov 1994 01:00 GMT
GET / HTTP/1.1
Host: www.example.com
Cache-Control: max-age=60, public
GET / HTTP/1.1
Host: www.example.com
Cache-Control: max-age=60, public
GET / HTTP/1.1
Host: www.example.com
Cache-Control: max-age=60, public
Cacheable for 60 seconds
GET / HTTP/1.1
Host: www.example.com
Cache-Control: max-age=60, public
Cacheable by both local and shared caches
GET / HTTP/1.1
Host: www.example.com
Cache-Control: stale-if-error=600, stale-while-revalidate=600
GET / HTTP/1.1
Host: www.example.com
Cache-Control: stale-if-error=600, stale-while-revalidate=600
fault-tolerant
GET / HTTP/1.1
Host: www.example.com
Cache-Control: stale-if-error=600, stale-while-revalidate=600
available during downti...
GET / HTTP/1.1
Host: www.example.com
Cache-Control: stale-if-error=600, stale-while-revalidate=600
available during revali...
Validation
GET / HTTP/1.1
Host: www.example.
com
Etag: 1234
GET / HTTP/1.1
Host: www.example.
com
Etag: 1234
an identifier for your response
GET / HTTP/1.1
Host: www.example.
com
If-None-Match: 1234
the browsers asks you if it has been modified
Conditional reques...
Relax
Calculating an Etag is cheaper than generating a full MVC
response
HTTP/1.1 304 Not Modified
GET / HTTP/1.1
Host: www.example.com
Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT
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
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 m...
Relax
Calculating a date is cheaper than retrieving an entire object
HTTP/1.1 304 Not Modified
but hey, you say
HTTP's cache fails when dealing with really dynamic
pages, because consumers will always have to hit the
origin server, al...
Nope
ESI was built for that
http://www.w3.org/TR/esi-lang
HInclude was built for that
http://mnot.github.com/hinclude/
So what does HTTP cache is meant to solve?
Less work
because the hard work is delegated to the browser/proxy
http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in...
evolve
because cache is abstracted from the application
loose coupling
because caching is bound to the protocol, HTTP,
not to your implementation ( Sf, RoR, Django )
We’ve just ignored it
so far
for 22 years
HTTP/2.0
Nothing to see here.
SPDY
http://dev.chromium.org/spdy/spdy-whitepaper
You're already using it
HTTP on steroids
Requests prioritization
Client Server
Client Server
Client Server
Client Server
Compression
Extended compression
Multiplexing
Client Server
R/R model
Client Server
R/R model
Client Server
R/R model
Client Server
Pipelining
Client Server
Pipelining
Client Server
Multiplexing
Client Server
Multiplexing
Client Server
Multiplexing
Server push
Result?
Not-so-side effect?
14 years later...
HTTP/2.0
https://github.com/http2/http2-spec
http://tools.ietf.org/html/draft-ietf-httpbis-http2-04
GET /index.html HTTP/1.1
Host: www.example.com
SURPRISE!
it will be a binary protocol
http://tech.slashdot.org/story/13/07/09/1455200/http-20-will-be-a-binary-protocol
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...
Improved performances
http://www.itnews.com.au/News/349694,next-version-of-hyper-text-protocol-to-be-binary.aspx
GET /default.htm HTTP/1.1
Host: server.example.com
Connection: Upgrade, HTTP2-Settings
Upgrade: HTTP/2.0
HTTP2-Settings: <...
GET /default.htm HTTP/1.1
Host: server.example.com
Connection: Upgrade, HTTP2-Settings
Upgrade: HTTP/2.0
HTTP2-Settings: <...
Based on?
SPDY
http://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0004.html
http://www.slideshare.net/mnot/what-http20-will...
Which is based on?
HTTP/1.1
SPDY doesnt change the protocol,
it just changes the way messages are
exchanged over the wire
Semantics are the same.
Workflows are the same.
Verbs are the same.
The interface is the same.
“The minimum bar to entry for replacing
HTTP/1.1 is to exactly support its semantics
and capabilities, while making it mor...
And HTTP/1.1 is based on?
HTTP/1.0
Published 17 years ago
An architecture that lasts 20 years is possible.
( REST )
...yawn...
Alessandro Nadalin
Alessandro Nadalin
@_odino_
Alessandro Nadalin
@_odino_
Namshi | Rocket Internet
Alessandro Nadalin
@_odino_
Namshi | Rocket Internet
VP Technology
Alessandro Nadalin
@_odino_
Namshi | Rocket Internet
VP Technology
odino.org
Thanks!
Alessandro Nadalin
@_odino_
Namshi | Rocket Internet
VP Technology
odino.org
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 Francisco
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 Francisco
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 Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
Upcoming SlideShare
Loading in …5
×

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

3,054 views

Published on

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.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,054
On SlideShare
0
From Embeds
0
Number of Embeds
386
Actions
Shares
0
Downloads
7
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

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

  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

×