Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTTP2 for the web developer devoxx

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Brian Clozel
November 11, 2015

Transcript

26 slides
  1. Client Server Stream: 3 HEADERS
 GET /java Stream: 5 DATA

    Stream: 5 HEADERS
 POST /devoxx Stream: 5 DATA Stream: 3 HEADERS Stream: 3 DATA Stream: 5 HEADERS Stream: 3 DATA
  2. How should we adapt? • What about « front-end optimizations

    »? • undo concatenation • keep gzipping content • use ETags, Cache-Control directives • use JS module loaders
  3. Client Server Stream: 3 HEADERS
 GET /index.html Stream: 8 RST_STREAM

    CANCEL Stream: 10 RST_STREAM CANCEL Stream: 3 PUSH_PROMISE Promised Stream: 8
 GET /main.css Stream: 8 HEADERS Stream: 3 PUSH_PROMISE Promised Stream: 10
 GET /script.js
  4. « The server SHOULD send PUSH_PROMISE (Section 6.6) frames prior

    to sending any frames that reference the promised responses. This avoids a race where clients issue requests prior to receiving any PUSH_PROMISE frames. »
  5. Client Server Stream: 3 HEADERS
 GET /index.html Stream: 3 PUSH_PROMISE

    Promised Stream: 8
 GET /main.css Stream: 3 HEADERS Stream: 3 DATA Stream: 5 HEADERS
 GET /main.css [Parsing HTML…] !!!
  6. Who knows best, then? • Server-side application • HTML structure

    • number/size of resources • HTTP client • heuristics • state of cache • CPU, battery, local network • Us, developers?
  7. Implementation checklist • IO & programming model? • serious TLS

    support? • Server Push support? • Stream prioritization support? • Bonus: reactive streams friendly?

More Decks by Brian Clozel

Other Decks in Programming