Websocket shanon
Upcoming SlideShare
Loading in...5
×
 

Websocket shanon

on

  • 5,608 views

株式会社シャノン社内勉強会の資料

株式会社シャノン社内勉強会の資料
Websocket, node.js, socket.ioについて知らない人に向けてのざっくり資料

Statistics

Views

Total Views
5,608
Views on SlideShare
3,105
Embed Views
2,503

Actions

Likes
3
Downloads
53
Comments
0

7 Embeds 2,503

http://shanon-tech.blogspot.com 1814
http://shanon-tech.blogspot.jp 675
http://webcache.googleusercontent.com 9
http://rss.ameba.jp 2
http://search.yahoo.co.jp 1
http://shanon-tech.blogspot.sg 1
http://go.idwebspace.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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

Websocket shanon Websocket shanon Presentation Transcript

  • WebSocket 2011/08/15 @11 8 15
  • Push/Push Like11 8 15
  • Push/Push Like XMLHttpRequest (Ajax: ) Comet (Long Polling Push) Flash (Action Script ) iframe (11 8 15 View slide
  • WebSocket11 8 15 View slide
  • WebSocket W3C IETF XMLHttpRequest Comet TCP HTML5 API http://dev.w3.org/html5/websockets/11 8 15
  • WebSocket Web TCP HTTP TCP URI HTTP “ws://” ”wss://”11 8 15
  • Ajax, Comet Polling http://prog.re-d.net/demo/slide/20110528/11 8 15
  • WebSocket http://prog.re-d.net/demo/slide/20110528/11 8 15
  • HTTP11 8 15
  • Ajax, Comet -> ->11 8 15
  • Client API11 8 15
  • API var ws = new WebSocket("ws://example.com/service"); ws.onopen = function() { // Web Socket is connected. You can send data by send() method. ws.send("message to send"); .... }; ws.onmessage = function (evt) { var received_msg = evt.data; ... }; ws.onclose = function() { // websocket is closed. }; http://dev.w3.org/html5/websockets/11 8 15
  • Server Handshake11 8 15
  • -> ※ HTTP GET /demo HTTP/1.1 Host: example.com Connection: Upgrade Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 Sec-WebSocket-Protocol: sample Upgrade: WebSocket Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Origin: http://example.com ^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 Key1, Key2, MD5 Sec-WebSocket-Protocol: sample 8jKSy:G*Co,Wxa-11 8 15
  • & Challenge & Response & & & http://www.sophia-it.com/content/%E3%83%81%E3%83%A3%E3%83%AC%E3%83%B3%E3%82%B8%26%E3%83%AC%E3%82%B9%E3%83%9D%E3%83%B3%E3%82%B9%E6%96%B9%E5%BC%8F11 8 15
  • 1 0x00[Data]0xFF ※11 8 15
  • Google Ian Hickson editor of HTML5 specification Reducing kilobytes of data to 2 bytes…and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make WebSocket seriously interesting to Google. 2 150ms 50ms 2 WebSocket Google11 8 15
  • WebSocket11 8 15
  • PC Chrome4 /Safari5 OK Opera,Firefox Off IE iOS 4.2.1 Safari OK android (webkit )11 8 15
  • node.js socket.io WebSocket Flash Jsonp XHR Java Play! Jetty Grizzly11 8 15
  • Perl Mojolicious Catalyst FW Ruby em-websocket Python pywebsocket C mod_websocket lighttpd11 8 15
  • Kaazing Java .NET Pusher REST API WebSocket push11 8 15
  • 11 8 15
  • 11 8 15
  • http://dev.w3.org/html5/websockets/ 7 W3C WebSocket11 8 15
  • http://dev.w3.org/html5/websockets/ 7 W3C WebSocket Σ( Д !11 8 15
  • WebSocket11 8 15
  • 11 8 15
  • 11 8 15
  • 11 8 15
  • Socket.io11 8 15
  • Socket.io11 8 15
  • Socket.io WebSocket+α node.js Push http://socket.io/ https://github.com/LearnBoost/socket.io https://github.com/LearnBoost/socket.io-spec11 8 15
  • WebSocket Flash Ajax long polling Ajax multipart polling Forever iframe JSONP polling11 8 15
  • IE5.5 iPhone Safari iPad Safari Safari3 Android Webkit Chrome3 WebOS Webkit Firefox3 Opera10.6111 8 15
  • IE5.5 iPhone Safari iPad Safari Safari3 Android Webkit Chrome3 WebOS Webkit Firefox3 Opera10.6111 8 15
  • WebSocket11 8 15
  • node.js Javascript Google V8 I/O11 8 15
  • 11 8 15
  • http://d.hatena.ne.jp/ikeike443/2011080811 8 15
  • 11 8 15
  • Push11 8 15
  • 11 8 15