1. 문서 목적 및 범위




2. 개요 및 필요성
구현현황(오픈소스) :
                                       pywebsocket ,
Web Socket API (Web application WG)    phpwebsocket,
                                       jWebSocket,
                                       web-socket- ruby,
                                       Socket.IO-node


                                      기타 :
                                      응용 방안: W3C Web&TV,…
                                      신규 표준 아이템? mobility..
                                                Web RFID API
WebSockets




http://tools.ietf.org/wg/hybi/   http://www.w3.org/TR/websockets/
Network comunication




 2007
                        API




 WHATWG
                  Web Socket API

                 Server-Sent Events
                                        W3C




  Web App WG
                    HTML5 Web
                     Messaging




API
                 Network information




Device
                        API
                   Web real-time



WG
WRT
                 communication API
                                       IETF
                                       HyBI




                Web socket protocol


                       DASH
                                        MPEG




                  AHS(Adaptive HTTP
                  Streaming)
                                        3GPP




                      WRAPI
                 (Web-Runtime API)
                OpenCM(Connection
                                       CD




                 Management) API
                                       OMA




               MobSocNet
               (MSN Enabler)
응용 분야 및 요구사항
구현 방안
                        Application
        Native

                        TCP/UDP/RTP




                 HTML     Web App
        Web
                 HTTP       ???
HTML Protocol 동작 개요 : Polling
HTML 1.0 vs HTML 1.1 : : Polling




         Connectionless
         Stateless -> (해결) Server-side
Web Page                   Web Application
Text-based Protocol         Two-Way Connection,
Connectionless, stateless   Dynamic, Real-time,…
Polling                     Push
(참고) Long Polling vs HTTP Streaming
 ( 원본 : @Kuruma )
Goal : Two-Way Communication
This specification defines an API that enables Web pages to
use the WebSocket protocol for two-way communication
with a remote host.
a socket that works anywhere across the web
Bidirectional
TCP-based independent App protocol
1. Script Execution

2. HTTP Handshake
 •   Port80, 443

3. WebSocket Data Transfer


@Kuruma
1. WebSocket(url [, protocol])

2. Event Handlers
 •   Onopen
 •   Onmessage
 •   Onerror
 •   onclose

3. Methods
 •   Boolean send(data)
 •   Void close()                @Kuruma
HTTP     TCP
                     HTTP Upgrade Request
                                            HTTP
1     Client                                Server




GET /chat HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Origin: http://example.com
Sec-WebSocket-Version: 6
HTTP     TCP
                             HTTP Upgrade Request
                                                          HTTP
  1    Client                                             Server


       HTTP     TCP                                       HTTP
  2    Client                                             Server
                      HTTP Switching Protocols Response




HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
HTTP     TCP
                                 HTTP Upgrade Request
                                                                  HTTP
1   Client                                                        Server


    HTTP     TCP                                                  HTTP
2   Client                                                        Server
                          HTTP Switching Protocols Response



    Web      TCP   WebSocket Messages                             Web
3   Socket                                                        Socket
                                           WebSocket Messages




                                            Binary or UTF8
                                            Messages or streams
 Websocket Protocol 기능 보완
 . 보안, 세션관리, Binary Data…
http://tools.ietf.org/wg/hybi/
http://www.w3.org/TR/websockets/




http://www.slideshare.net/rmoriz/pushing-the-web-websockets
( 원본 : @Kuruma )
W3C      W3C        W3C API
                          API      API        Third
                          First    Second     Draft
                          Draft    Draft




JAN                                                      IETF HyBi   IETF v00   IETF v01   IETF v02    IETF v03   IETF v04    IETF v05     IETF v06             ~80 drafts       APR
2009      First
                    [Revs 02 – 76]                       WG                                                                                                     so far and       2011
          Working                                        Adopts                                                                                                 still changing
          Draft


       1/9/09          4/23/09 10/29/09   12/22/09                   5/23/10    9/1/10     9/24/10    10/17/10     1/11/11 2/8/11        2/9/11       2/25/11    3/11/11

                                            Implemented                    Breaking change                  Potential Security Issue Identified
                                            in browsers v.75               WebSockets v.76                  WebSockets disabled
Ws
Ws
Ws

Ws

  • 2.
    1. 문서 목적및 범위 2. 개요 및 필요성
  • 3.
    구현현황(오픈소스) : pywebsocket , Web Socket API (Web application WG) phpwebsocket, jWebSocket, web-socket- ruby, Socket.IO-node 기타 : 응용 방안: W3C Web&TV,… 신규 표준 아이템? mobility.. Web RFID API
  • 5.
    WebSockets http://tools.ietf.org/wg/hybi/ http://www.w3.org/TR/websockets/
  • 6.
    Network comunication 2007 API WHATWG Web Socket API Server-Sent Events W3C Web App WG HTML5 Web Messaging API Network information Device API Web real-time WG WRT communication API IETF HyBI Web socket protocol DASH MPEG AHS(Adaptive HTTP Streaming) 3GPP WRAPI (Web-Runtime API) OpenCM(Connection CD Management) API OMA MobSocNet (MSN Enabler)
  • 7.
    응용 분야 및요구사항
  • 8.
    구현 방안 Application Native TCP/UDP/RTP HTML Web App Web HTTP ???
  • 9.
    HTML Protocol 동작개요 : Polling
  • 10.
    HTML 1.0 vsHTML 1.1 : : Polling Connectionless Stateless -> (해결) Server-side
  • 12.
    Web Page Web Application Text-based Protocol Two-Way Connection, Connectionless, stateless Dynamic, Real-time,… Polling Push
  • 13.
    (참고) Long Pollingvs HTTP Streaming ( 원본 : @Kuruma )
  • 14.
    Goal : Two-WayCommunication
  • 15.
    This specification definesan API that enables Web pages to use the WebSocket protocol for two-way communication with a remote host.
  • 16.
    a socket thatworks anywhere across the web Bidirectional TCP-based independent App protocol
  • 17.
    1. Script Execution 2.HTTP Handshake • Port80, 443 3. WebSocket Data Transfer @Kuruma
  • 18.
    1. WebSocket(url [,protocol]) 2. Event Handlers • Onopen • Onmessage • Onerror • onclose 3. Methods • Boolean send(data) • Void close() @Kuruma
  • 22.
    HTTP TCP HTTP Upgrade Request HTTP 1 Client Server GET /chat HTTP/1.1 Host: example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Origin: http://example.com Sec-WebSocket-Version: 6
  • 23.
    HTTP TCP HTTP Upgrade Request HTTP 1 Client Server HTTP TCP HTTP 2 Client Server HTTP Switching Protocols Response HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
  • 24.
    HTTP TCP HTTP Upgrade Request HTTP 1 Client Server HTTP TCP HTTP 2 Client Server HTTP Switching Protocols Response Web TCP WebSocket Messages Web 3 Socket Socket WebSocket Messages Binary or UTF8 Messages or streams
  • 25.
     Websocket Protocol기능 보완 . 보안, 세션관리, Binary Data…
  • 26.
  • 29.
    ( 원본 :@Kuruma )
  • 30.
    W3C W3C W3C API API API Third First Second Draft Draft Draft JAN IETF HyBi IETF v00 IETF v01 IETF v02 IETF v03 IETF v04 IETF v05 IETF v06 ~80 drafts APR 2009 First [Revs 02 – 76] WG so far and 2011 Working Adopts still changing Draft 1/9/09 4/23/09 10/29/09 12/22/09 5/23/10 9/1/10 9/24/10 10/17/10 1/11/11 2/8/11 2/9/11 2/25/11 3/11/11 Implemented Breaking change Potential Security Issue Identified in browsers v.75 WebSockets v.76 WebSockets disabled

Editor's Notes

  • #2 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #3 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #4 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #5 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #7 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #8 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #9 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #12 Long Polling : COMET technique, (http://en.wikipedia.org/wiki/Comet_(programming)) W3C, Server-Sent Event SpecificationHidden iFrame
  • #14 HTTP Live Streaming (also known as HLS) is an HTTP-based media streamingcommunications protocol implemented by Apple Inc. as part of their QuickTime X and iPhone software systems. It works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport streamQuickTime Player
  • #15 HTTP Live Streaming (also known as HLS) is an HTTP-based media streamingcommunications protocol implemented by Apple Inc. as part of their QuickTime X and iPhone software systems. It works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport streamQuickTime Player
  • #16 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #22 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #23 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #33 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser
  • #34 Real Time Web - web apps (Twitter, Facebook, Stock Tickers, Games) - its HARD to push information to a browser