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

Writing Real Time Web Apps

Writing Real Time Web Apps

Given at Fluent 2014

Wesley Hales

March 14, 2014
Tweet

More Decks by Wesley Hales

Other Decks in Technology

Transcript

  1. Enter SPDY • SPDY addresses RTTs and PLTs (Goal is

    50% reduction in PLT) • Almost everything we’re doing on the front end to improve perf is handled by SPDY • Resource Inlining (SPDY Push) • No need for spriting! • A pushed resource goes into your browsers cache - nothing more, nothing less.! • GZIP (Headers but not content/images)! • Prioritization @wesleyhales
  2. SPDY The starting point of HTTP 2.0 - Nov 2014

    Proposed Standard ! http://zoompf.com/blog/2013/04/maximizing-spdy-and-ssl-performance Encapsulates HTTP Requests Transmits Content over SSL Channel 
 (for better security and compatibility with existing network infrastructure) ! @wesleyhales
  3. SPDY • Google property latency improvements from Nov 20th 2013

    • Time to first byte request to window onload event http://blog.chromium.org/2013/11/making-web-faster-with-spdy-and-http2.html @wesleyhales
  4. HTTP 2.0 “HTTP/2 isn’t magic Web performance pixie dust; you

    can’t drop it in and expect your page load times to decrease by 50%.” - Mark Nottingham (chair) @wesleyhales
  5. WebSockets • Don’t confuse with SPDY push. And It’s not

    a spec with intentions of increasing PLT (Page Load Time) • WebSockets can be layered over a SPDY connection @wesleyhales
  6. SPDY+WebSocket • Jetty 9 • Node • Ruby • Proxy

    (nginx , HAProxy) • Apache (mod_spdy) @wesleyhales
  7. Writing Real Time Apps • RPC (Remote Procedure Call) and

    PubSub (Publish & Subscribe) messaging patterns on top of raw WebSocket • WebSocket requires a sub-protocol • WAMP, JSON-RPC, custom @wesleyhales
  8. WAMP - RPC When the execution of the remote procedure

    finishes, the server responds by sending a message of type CALLRESULT or CALLERROR. @wesleyhales