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

SockJS - LNUG Nov 2011

majek04
November 23, 2011

SockJS - LNUG Nov 2011

majek04

November 23, 2011
Tweet

More Decks by majek04

Other Decks in Programming

Transcript

  1. SockJS
    WebSocket emulation kept simple, stupid
    Marek Majkowski
    [email protected]
    Wednesday, 23 November 11

    View full-size slide

  2. Wednesday, 23 November 11

    View full-size slide

  3. Wednesday, 23 November 11

    View full-size slide

  4. @sockjs
    github.com/sockjs
    Wednesday, 23 November 11

    View full-size slide

  5. Wednesday, 23 November 11

    View full-size slide

  6. History of Comet Fallbacks
    JSO
    N
    P
    Forever IFram
    e
    AJAX
    multipart
    EventSource
    W
    ebSocket
    postM
    essage
    Orbited Socket.io SockJS
    AJAX
    polling
    AJAX
    CO
    RS
    2005 2007 2009
    2006 2010 2011
    2008
    Wednesday, 23 November 11

    View full-size slide

  7. Orbited
    Wednesday, 23 November 11

    View full-size slide

  8. Socket.io
    Wednesday, 23 November 11

    View full-size slide

  9. Socket.io
    Wednesday, 23 November 11

    View full-size slide

  10. Socket.io cross domain
    Opera IE8, IE9
    WebSockets - -
    Flash Socket ? ?
    AJAX CORS - ~
    Forever IFrame - -
    JSONP + +
    Wednesday, 23 November 11

    View full-size slide

  11. postMessage
    Wednesday, 23 November 11

    View full-size slide

  12. SockJS cross domain
    Opera IE8, IE9
    WebSockets - -
    Flash Socket ? ?
    postMessage + AJAX CORS + +
    postMessage + Forever IFrame + +
    JSONP + +
    Wednesday, 23 November 11

    View full-size slide

  13. #sockjs
    SockJS
    1. Fallbacks
    2. Cross domain support
    3. Scalability explained (sticky sessions)
    4. Specified protocol, multilingual
    5. WebSocket like API
    Wednesday, 23 November 11

    View full-size slide

  14. History of Comet Fallbacks
    JSO
    N
    P
    Forever IFram
    e
    AJAX
    multipart
    EventSource
    W
    ebSocket
    postM
    essage
    Orbited Socket.io
    SockJS
    AJAX
    polling
    AJAX
    CO
    RS
    2005 2007 2009
    2006 2010 2011
    2008
    W
    ebSocket
    WebSocket
    ????
    Wednesday, 23 November 11

    View full-size slide

  15. WebSockets
    hixie-75 4 5.0.0
    hixie-76 4
    (disabled)
    6 5.0.1 11
    (disabled)
    hybi-07 6
    hybi-10 7 14 10-dev
    hybi-17 16-dev
    Wednesday, 23 November 11

    View full-size slide

  16. @sockjs
    http://sockjs.org
    github.com/sockjs/sockjs-client
    Wednesday, 23 November 11

    View full-size slide