• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
WebSockets On Fire
 

WebSockets On Fire

on

  • 4,098 views

HTML5 WebCamps talk on WebSockets

HTML5 WebCamps talk on WebSockets

Statistics

Views

Total Views
4,098
Views on SlideShare
2,622
Embed Views
1,476

Actions

Likes
1
Downloads
58
Comments
0

15 Embeds 1,476

http://www.jefclaes.be 891
http://jclaes.blogspot.com 548
http://jclaes.blogspot.co.uk 10
http://jclaes.blogspot.com.au 9
http://jclaes.blogspot.in 4
http://www.linkedin.com 3
http://jclaes.blogspot.pt 2
http://jclaes.blogspot.de 2
http://feeds.feedburner.com 1
http://jclaes.blogspot.ca 1
http://jclaes.blogspot.se 1
http://jclaes.blogspot.com.br 1
http://jclaes.blogspot.fr 1
http://bantam.brushd.local 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    WebSockets On Fire WebSockets On Fire Presentation Transcript

    • WebSockets On Fire
      HTML5 WebCamps 2011
    • Whois
      Jef Claes
      Ferranti Computer Systems
      @JefClaes
      http://jclaes.blogspot.com
      Jef.claes@gmail.com
    • Content
      WHY do we need WebSockets?
      WHATare WebSockets?
      What is the state ofWebSockets TODAY?
      So show me some CODE.
    • Content
      WHY do we need WebSockets?
      WHATare WebSockets?
      What is the state ofWebSockets TODAY?
      So show me some CODE.
    • DIRECT COMMUNICATION between browser and server
    • Chat applications
    • Collaborative tools
    • Socialnetworking
    • Online gaming
    • But haven’t we been doingthisfor a while?
    • COMET
    • 1. Frequent polling
    • Browser
      Server
      HTTP Request
      HTTP Response
    • GET /PollingStock//PollingStock HTTP/1.1Host: localhost:8080User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-usAccept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Connection: keep-aliveReferer: http://www.example.com/PollingStock/Cookie: showInheritedConstant=false; showInheritedProtectedConstant=false; showInheritedProperty=false; showInheritedProtectedProperty=false; showInheritedMethod=false; showInheritedProtectedMethod=false; showInheritedEvent=false; showInheritedStyle=false; showInheritedEffect=falseHTTP/1.x 200 OKX-Powered-By: Servlet/2.5Server: Sun Java System Application Server 9.1_02Content-Type: text/html;charset=UTF-8
    • Request / Response headers = 871 bytes
      1000 clients poll every 10 seconds
      1000 * 871 bytes = 0,8MB / 10 seconds
      0,8 MB * 6 = 4,8 MB / minute
      4,8 MB * 60 = 288 MB / hour
      288 MB * 24 = 6,912 GB / day
    • 2. Long polling
    • Waitfor it...
      Browser
      Server
      HTTP Request
      HTTP Response
    • Say NO to COMET
    • Content
      WHY do we need WebSockets?
      WHATare WebSockets?
      What is the state ofWebSockets TODAY?
      So show me some CODE.
    • ‘TCP for the Web’Full-duplex direct communication
    • Browser
      Server
      HTTP
      HTTP
      WebSocket
      WebSocket
    • WebSockets Handshake
      GET /demo
      HTTP/1.1 Upgrade: WebSocket
      Connection: Upgrade
      Host: example.com
      Origin: http://example.com
      Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5
      Sec-WebSocket-Key2: 12998 5 Y3 1
      .P00 ^n:ds[4U
      HTTP/1.1 101
      WebSocket Protocol Handshake
      Upgrade: WebSocket
      Connection: Upgrade
      Sec-WebSocket-Origin: http://example.com
      Sec-WebSocket-Location: ws://example.com/demo
      Sec-WebSocket-Protocol: sample
      8jKS'y:G*Co,Wxa-
    • WebSockets message
      0x00 wsMessage0xFF
    • Benefits
      Native implemented
      Lessthroughput
      Performance
      Complexity
    • Content
      WHY do we need WebSockets?
      WHATare WebSockets?
      What is the state ofWebSockets TODAY?
      So show me some CODE.
    • 1. HTML5
      Work In Progress
    • 2. Browser support
      IE9: No
      Safari 5, Chrome 10:Yes
      FireFox 4, Opera 11: Yes, but…
      Mobile: No, only Safari :-(
      Source: http://caniuse.com
    • 2. Browser support
      ALTERNATIVES yesssss
      • Silverlight
      • Flash
    • 3. The server
      HTML5 Labs (WCF)
      http://html5labs.interoperabilitybridges.com
      pywebsocket(Apache extension) http://code.google.com/p/pywebsocket/
      jWebSocket (Java)
      http://jwebsocket.org/
      web-socket-ruby (Ruby)
      https://github.com/gimite/web-socket-ruby

    • Content
      WHY do we need WebSockets?
      WHATare WebSockets?
      What is the state ofWebSockets TODAY?
      So show me some CODE.
    • Why?
      Information ASAP
    • Information screens
      Paging
      JIT Printing
      Websites
      Why?
    • 1. NetViewer
    • 2. Current Incidents
    • Silverlightclient
      WCF WebSockets Server
      Dispatcher
      Silverlightclient
      Silverlightclient
      http://html5labs.interoperabilitybridges.com/
    • Code
    • Conclusion
      WebSockets > COMET
      Notquite ready
    • Recommended resources
      http://dev.w3.org/html5/websockets/
      http://html5labs.interoperabilitybridges.com
      http://blogs.msdn.com/b/interoperability/archive/tags/html5/
      http://jclaes.blogspot.com
    • Q & A
    • Joinus
      Twitter:
      @MSDNBelux
      Our tag today: #webcampbe
      Facebook:
      MSDN België (NL)
      MSDN BeLux (FR)
      Latestnews on www.msdn.be
      Always up to date: register to MSDN Flash and Express Yourselfhttp://www.msdn-newsletters.be
    • Thankyou