SlideShare a Scribd company logo
1 of 69
Download to read offline
WebSocket

              Chrome+HTML5 Conference
              2011/8/21



                        http://slidesha.re/p18o4P

11   8   28
•
       ◦ http://bit.ly/toka20
     ◦ Chrome Web Store
       ◦ http://bit.ly/toka20-B1
     ◦ Chrome DevTools
  ◦ http://bit.ly/toka20-B2
 • WebSocket
         ◦ http://bit.ly/toka20-B3

 • Twitter
    ◦ #html5j
 • Facebook
         ◦ http://www.facebook.com/html5j
11   8   28
Twitter http://twitter.com/komasshu
                Blog http://blog.livedoor.jp/kotesaki/
              Chrome+HTML5 Conference

              HTML5

              Google API Expert(HTML5)
              Microsoft Most Valuable Professional(IE)
11   8   28
11   8   28
Today’s Main Idea


          WebSocket




11   8   28
WebSocket




                          ( ∀   )
11   8   28
WebSocket




                          ( ∀   )
11   8   28
WebSocket




11   8   28
11   8   28
11   8   28
Agenda

              WebSocket

              Comet



              Getting Started!!

                                  http://www.flickr.com/photos/27048731@N03/4004513994/




11   8   28
Agenda

              WebSocket

              Comet



              Getting Started!!
                                  http://www.flickr.com/photos/johnlinford/3754434641/




11   8   28
WebSocket
                                 The WebSocket protocol
                         draft-ietf-hybi-thewebsocketprotocol-10

              Abstract

              The WebSocket protocol enables two-way communication
              between a client running untrusted code running in a
              controlled environment to a remote host that has opted-in
              to communications from that code. The security model used
              for this is the Origin-based security model commonly used
              by Web browsers. The protocol consists of an opening
              handshake followed by basic message framing, layered over
              TCP. The goal of this technology is to provide a mechanism
              for browser-based applications that need two-way
              communication with servers that does not rely on opening
              multiple HTTP connections (e.g. using XMLHttpRequest or
              <iframe>s and long polling).
                           ref) http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10


11   8   28
(´ ω   )

11   8   28
11   8   28
!!


11   8   28
!!
              var socket = new WebSocket('ws://example.com’);




              socket.send(‘hello’);




              socket.onmessage(function(evt){
                alert(evt.data);
              }




11   8   28
( ∀   )
11   8   28
Agenda

              WebSocket

              Comet



              Getting Started!!
                                  http://www.flickr.com/photos/algenon_iii/5397440505/




11   8   28
11   8   28
Chat



11   8   28
Chat on GMail




                    http://mail.google.com/mail/help/chat.html

11   8   28
Comet


11   8   28
Comet!!




              http://ascii.jp/elem/000/000/355/355253/
11   8   28
Comet!!




              http://ascii.jp/elem/000/000/355/355253/
11   8   28
Comet!!




              http://ascii.jp/elem/000/000/355/355253/
11   8   28
Comet = HTTP




11   8   28
WebSocket



11   8   28
http://www.flickr.com/photos/wold/2392054931/
11   8   28
11   8   28
FAX
              e-mail
              twitter




11   8   28
11   8   28
http://www.flickr.com/photos/adforce1/5154126561/
11   8   28
Comet




11   8   28
!!




11   8   28
Comet


                              H

                      E

                      L

                          L
                                  O   !

11   8   28
WebSocket




                  WebSocket




11   8   28
WebSocket
                                       OK!!

              !    O   L   L   E   H




11   8   28
11   8   28
CPU           /
                                CPU    traffic

                WebSocket   1.3%      90kbps

                 Comet      2.7%      330kbps



                    1


11   8   28
11   8   28
WebSocket




11   8   28
Agenda

              WebSocket

              Comet



              Getting Started!!
                                  http://www.flickr.com/photos/11086497@N00/277491010/




11   8   28
Comet

              notification
                            Push




11   8   28
WebSocket




11   8   28
Comet   WebSocket

               ◯�        ◯�

               ◯�        ◯�

               ◯�        ◯�

               △         ◯�

               ☓         ◯�

               ☓         ◯�

               ☓         ◯�




11   8   28
Agenda
                                                   a2c
                                    camera      (teacher)
              WebSocket

              Comet



              Getting Started!!
                                  by @os0x


                                      my son   penguin
11   8   28
11   8   28
Chat
11   8   28
11   8   28
(´ ω   )


11   8   28
――( ∀ )――!!

11   8   28
WebSocket
                                 !!

              PC Web




                             WebSocket

11   8   28
http://chromium.googlecode.com/svn/trunk/samples/audio/o3d-webgl-samples/pool.html



11   8   28
The WebSocket protocol
                         draft-ietf-hybi-thewebsocketprotocol-10

              Abstract

              The WebSocket protocol enables two-way communication
              between a client running untrusted code running in a
              controlled environment to a remote host that has opted-in
              to communications from that code. The security model used
              for this is the Origin-based security model commonly used
              by Web browsers. The protocol consists of an opening
              handshake followed by basic message framing, layered over
              TCP. The goal of this technology is to provide a mechanism
              for browser-based applications that need two-way
              communication with servers that does not rely on opening
              multiple HTTP connections (e.g. using XMLHttpRequest or
              <iframe>s and long polling).
                           ref) http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10


11   8   28
Yet another use case




11   8   28
WebSocket
               DEMO

                                                                 Chrome 14




                http://komasshu.com/ws/mecab/pipelinetest.html
11   8   28
CSS




11   8   28
know
              more about
               http://www.flickr.com/photos/26500034@N04/4732968982/


11   8   28
Browser API                                       Protocol




              http://www.w3.org/TR/websockets/   http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10




11   8   28
...




                                                         http://www.atmarkit.co.jp/fcoding/articles/
              http://gihyo.jp/dev/feature/01/websocket
                                                             websocket/01/websocket01a.html



11   8   28
Chrome
                   ver 00 ( ≦13 ), ver 10 ( ≧14 )


              Firefox
                   ver 00 ( ≦ 6 w/ about:config), ver 10 (7/8)

              Safari
                   ver 00

              Opera
                   ver 00 ( w/ opera:config )

              IE
                   ver 09 ( ≧ 9 w/ Add-on available at “HTML5Labs” (http://html5labs.interoperabilitybridges.com/)


                     09/10
11   8   28
?

              socket.io (http://socket.io/)
                 WebSocket                    Comet Fallback



                 apache wave

                                   (8/28)

                 http://www.r-agent.co.jp/info/rss/event/websocket/


11   8   28
Comet Fallback

                                    pollyfill

              socket.io     Chrome14 β

                WebSocket




11   8   28
WebSocket


              socket.io

                          Comet Best Practice

                                 Comet




11   8   28
HTML5 Comet
               => Server-Sent Events




                                                IE Android
                                                        ready
                    http://www.w3.org/TR/eventsource/
11   8   28
HTML5 API          API
                          2010




11   8   28
http://www.flickr.com/photos/jenosaur/4051305996/




11   8   28
•
  ◦ http://bit.ly/toka20
 • WebSocket
         ◦ http://bit.ly/toka20-B3

 • Twitter
    ◦ #html5j
 • Facebook
         ◦ http://www.facebook.com/html5j


11   8   28

More Related Content

Viewers also liked

WebSocketのキホン
WebSocketのキホンWebSocketのキホン
WebSocketのキホンYou_Kinjoh
 
AWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAmazon Web Services Japan
 
Mon, Muninによる楽々監視生活
Mon, Muninによる楽々監視生活Mon, Muninによる楽々監視生活
Mon, Muninによる楽々監視生活Akihiro Kuwano
 
AWS Black Belt Online Seminar 2016 Amazon EC2 Container Service
AWS Black Belt Online Seminar 2016 Amazon EC2 Container ServiceAWS Black Belt Online Seminar 2016 Amazon EC2 Container Service
AWS Black Belt Online Seminar 2016 Amazon EC2 Container ServiceAmazon Web Services Japan
 
MQTTとAMQPと.NET
MQTTとAMQPと.NETMQTTとAMQPと.NET
MQTTとAMQPと.NETterurou
 
AWS Black Belt Techシリーズ Amazon CloudFront
AWS Black Belt Techシリーズ Amazon CloudFrontAWS Black Belt Techシリーズ Amazon CloudFront
AWS Black Belt Techシリーズ Amazon CloudFrontAmazon Web Services Japan
 

Viewers also liked (6)

WebSocketのキホン
WebSocketのキホンWebSocketのキホン
WebSocketのキホン
 
AWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon Kinesis
 
Mon, Muninによる楽々監視生活
Mon, Muninによる楽々監視生活Mon, Muninによる楽々監視生活
Mon, Muninによる楽々監視生活
 
AWS Black Belt Online Seminar 2016 Amazon EC2 Container Service
AWS Black Belt Online Seminar 2016 Amazon EC2 Container ServiceAWS Black Belt Online Seminar 2016 Amazon EC2 Container Service
AWS Black Belt Online Seminar 2016 Amazon EC2 Container Service
 
MQTTとAMQPと.NET
MQTTとAMQPと.NETMQTTとAMQPと.NET
MQTTとAMQPと.NET
 
AWS Black Belt Techシリーズ Amazon CloudFront
AWS Black Belt Techシリーズ Amazon CloudFrontAWS Black Belt Techシリーズ Amazon CloudFront
AWS Black Belt Techシリーズ Amazon CloudFront
 

Similar to WebSocketでリアルタイム通信

WebSocket Server - Jul 2010
WebSocket Server - Jul 2010WebSocket Server - Jul 2010
WebSocket Server - Jul 2010takanao ENODH
 
Realizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetRealizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetCodemotion
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On FireJef Claes
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010sullis
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010sullis
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebPeter Lubbers
 
Hello websocket(cn)
Hello websocket(cn)Hello websocket(cn)
Hello websocket(cn)g65537
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoAlessandro Nadalin
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAriya Hidayat
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websocketsSANKARSAN BOSE
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSocketsGonzalo Ayuso
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Websockets en Ruby en 5 Minutos
Websockets en Ruby en 5 MinutosWebsockets en Ruby en 5 Minutos
Websockets en Ruby en 5 Minutosdamianmarti
 
Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesMakoto Inoue
 

Similar to WebSocketでリアルタイム通信 (20)

110828recruit agent ws
110828recruit agent ws110828recruit agent ws
110828recruit agent ws
 
WebSocket Server - Jul 2010
WebSocket Server - Jul 2010WebSocket Server - Jul 2010
WebSocket Server - Jul 2010
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Realizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetRealizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone Bordet
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On Fire
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
Websocket
WebsocketWebsocket
Websocket
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
Ws
WsWs
Ws
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
 
Hello websocket(cn)
Hello websocket(cn)Hello websocket(cn)
Hello websocket(cn)
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websockets
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Websockets en Ruby en 5 Minutos
Websockets en Ruby en 5 MinutosWebsockets en Ruby en 5 Minutos
Websockets en Ruby en 5 Minutos
 
Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup Slides
 

More from Kensaku Komatsu

Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architectureKensaku Komatsu
 
Full Matrix Auto Test Framework for WebRTC
Full Matrix Auto Test Framework for WebRTCFull Matrix Auto Test Framework for WebRTC
Full Matrix Auto Test Framework for WebRTCKensaku Komatsu
 
04122016 web rtc_globalsummit
04122016 web rtc_globalsummit04122016 web rtc_globalsummit
04122016 web rtc_globalsummitKensaku Komatsu
 
02172016 web rtc_conf_komasshu
02172016 web rtc_conf_komasshu02172016 web rtc_conf_komasshu
02172016 web rtc_conf_komasshuKensaku Komatsu
 
SkyWay国内唯一のCPaaS
SkyWay国内唯一のCPaaSSkyWay国内唯一のCPaaS
SkyWay国内唯一のCPaaSKensaku Komatsu
 
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ uv4l-webrtc 軽くハックしてみたよ!
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ    uv4l-webrtc 軽くハックしてみたよ!ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ    uv4l-webrtc 軽くハックしてみたよ!
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ uv4l-webrtc 軽くハックしてみたよ!Kensaku Komatsu
 
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探る
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探るビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探る
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探るKensaku Komatsu
 
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.Kensaku Komatsu
 
14th apr2015 リックテレコ勉強会
14th apr2015 リックテレコ勉強会14th apr2015 リックテレコ勉強会
14th apr2015 リックテレコ勉強会Kensaku Komatsu
 
WebRTCが拓く 新たなWebビジネスの世界
WebRTCが拓く新たなWebビジネスの世界WebRTCが拓く新たなWebビジネスの世界
WebRTCが拓く 新たなWebビジネスの世界Kensaku Komatsu
 
Web of Thingsの現状とWebRTC活用の可能性
Web of Thingsの現状とWebRTC活用の可能性Web of Thingsの現状とWebRTC活用の可能性
Web of Thingsの現状とWebRTC活用の可能性Kensaku Komatsu
 
知ってると得するかもしれないConstraintsたち
知ってると得するかもしれないConstraintsたち知ってると得するかもしれないConstraintsたち
知ってると得するかもしれないConstraintsたちKensaku Komatsu
 
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI WebRTCにより可視化されるリアルタイムクラウド。求められるAPI
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI Kensaku Komatsu
 
エフサミ2014 web rtcの傾向と対策
エフサミ2014 web rtcの傾向と対策エフサミ2014 web rtcの傾向と対策
エフサミ2014 web rtcの傾向と対策Kensaku Komatsu
 
HTML5 Night 2014 Web x Network Technology ( WebRTC )
HTML5 Night 2014 Web x Network Technology ( WebRTC )HTML5 Night 2014 Web x Network Technology ( WebRTC )
HTML5 Night 2014 Web x Network Technology ( WebRTC )Kensaku Komatsu
 

More from Kensaku Komatsu (20)

Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architecture
 
Boxdev lt-09082016
Boxdev lt-09082016Boxdev lt-09082016
Boxdev lt-09082016
 
a pattern for PWA, PRPL
a pattern for PWA, PRPLa pattern for PWA, PRPL
a pattern for PWA, PRPL
 
Full Matrix Auto Test Framework for WebRTC
Full Matrix Auto Test Framework for WebRTCFull Matrix Auto Test Framework for WebRTC
Full Matrix Auto Test Framework for WebRTC
 
WebRTC 101
WebRTC 101WebRTC 101
WebRTC 101
 
04122016 web rtc_globalsummit
04122016 web rtc_globalsummit04122016 web rtc_globalsummit
04122016 web rtc_globalsummit
 
02172016 web rtc_conf_komasshu
02172016 web rtc_conf_komasshu02172016 web rtc_conf_komasshu
02172016 web rtc_conf_komasshu
 
SkyWay国内唯一のCPaaS
SkyWay国内唯一のCPaaSSkyWay国内唯一のCPaaS
SkyWay国内唯一のCPaaS
 
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ uv4l-webrtc 軽くハックしてみたよ!
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ    uv4l-webrtc 軽くハックしてみたよ!ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ    uv4l-webrtc 軽くハックしてみたよ!
ラズパイでWebRTC ヾ(*´∀`*)ノキャッキャ uv4l-webrtc 軽くハックしてみたよ!
 
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探る
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探るビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探る
ビデオ通話・P2Pがコモディティ化する世界 WebRTCによるこれからを探る
 
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.
最新Web 通信系API総まくり!WebRTC, Streams, Push api etc.
 
FirefoxでgetStats()
FirefoxでgetStats()FirefoxでgetStats()
FirefoxでgetStats()
 
14th apr2015 リックテレコ勉強会
14th apr2015 リックテレコ勉強会14th apr2015 リックテレコ勉強会
14th apr2015 リックテレコ勉強会
 
WebRTCが拓く 新たなWebビジネスの世界
WebRTCが拓く新たなWebビジネスの世界WebRTCが拓く新たなWebビジネスの世界
WebRTCが拓く 新たなWebビジネスの世界
 
Web of Thingsの現状とWebRTC活用の可能性
Web of Thingsの現状とWebRTC活用の可能性Web of Thingsの現状とWebRTC活用の可能性
Web of Thingsの現状とWebRTC活用の可能性
 
25th nov2014 52thhtml5j
25th nov2014 52thhtml5j25th nov2014 52thhtml5j
25th nov2014 52thhtml5j
 
知ってると得するかもしれないConstraintsたち
知ってると得するかもしれないConstraintsたち知ってると得するかもしれないConstraintsたち
知ってると得するかもしれないConstraintsたち
 
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI WebRTCにより可視化されるリアルタイムクラウド。求められるAPI
WebRTCにより可視化されるリアルタイムクラウド。求められるAPI
 
エフサミ2014 web rtcの傾向と対策
エフサミ2014 web rtcの傾向と対策エフサミ2014 web rtcの傾向と対策
エフサミ2014 web rtcの傾向と対策
 
HTML5 Night 2014 Web x Network Technology ( WebRTC )
HTML5 Night 2014 Web x Network Technology ( WebRTC )HTML5 Night 2014 Web x Network Technology ( WebRTC )
HTML5 Night 2014 Web x Network Technology ( WebRTC )
 

Recently uploaded

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Recently uploaded (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

WebSocketでリアルタイム通信

  • 1. WebSocket Chrome+HTML5 Conference 2011/8/21 http://slidesha.re/p18o4P 11 8 28
  • 2. ◦ http://bit.ly/toka20 ◦ Chrome Web Store ◦ http://bit.ly/toka20-B1 ◦ Chrome DevTools ◦ http://bit.ly/toka20-B2 • WebSocket ◦ http://bit.ly/toka20-B3 • Twitter ◦ #html5j • Facebook ◦ http://www.facebook.com/html5j 11 8 28
  • 3. Twitter http://twitter.com/komasshu Blog http://blog.livedoor.jp/kotesaki/ Chrome+HTML5 Conference HTML5 Google API Expert(HTML5) Microsoft Most Valuable Professional(IE) 11 8 28
  • 4. 11 8 28
  • 5. Today’s Main Idea WebSocket 11 8 28
  • 6. WebSocket ( ∀ ) 11 8 28
  • 7. WebSocket ( ∀ ) 11 8 28
  • 9. 11 8 28
  • 10. 11 8 28
  • 11. Agenda WebSocket Comet Getting Started!! http://www.flickr.com/photos/27048731@N03/4004513994/ 11 8 28
  • 12. Agenda WebSocket Comet Getting Started!! http://www.flickr.com/photos/johnlinford/3754434641/ 11 8 28
  • 13. WebSocket The WebSocket protocol draft-ietf-hybi-thewebsocketprotocol-10 Abstract The WebSocket protocol enables two-way communication between a client running untrusted code running in a controlled environment to a remote host that has opted-in to communications from that code. The security model used for this is the Origin-based security model commonly used by Web browsers. The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal of this technology is to provide a mechanism for browser-based applications that need two-way communication with servers that does not rely on opening multiple HTTP connections (e.g. using XMLHttpRequest or <iframe>s and long polling). ref) http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 11 8 28
  • 14. (´ ω ) 11 8 28
  • 15. 11 8 28
  • 16. !! 11 8 28
  • 17. !! var socket = new WebSocket('ws://example.com’); socket.send(‘hello’); socket.onmessage(function(evt){ alert(evt.data); } 11 8 28
  • 18. ( ∀ ) 11 8 28
  • 19. Agenda WebSocket Comet Getting Started!! http://www.flickr.com/photos/algenon_iii/5397440505/ 11 8 28
  • 20. 11 8 28
  • 21. Chat 11 8 28
  • 22. Chat on GMail http://mail.google.com/mail/help/chat.html 11 8 28
  • 23. Comet 11 8 28
  • 24. Comet!! http://ascii.jp/elem/000/000/355/355253/ 11 8 28
  • 25. Comet!! http://ascii.jp/elem/000/000/355/355253/ 11 8 28
  • 26. Comet!! http://ascii.jp/elem/000/000/355/355253/ 11 8 28
  • 28. WebSocket 11 8 28
  • 30. 11 8 28
  • 31. FAX e-mail twitter 11 8 28
  • 32. 11 8 28
  • 34. Comet 11 8 28
  • 35. !! 11 8 28
  • 36. Comet H E L L O ! 11 8 28
  • 37. WebSocket WebSocket 11 8 28
  • 38. WebSocket OK!! ! O L L E H 11 8 28
  • 39. 11 8 28
  • 40. CPU / CPU traffic WebSocket 1.3% 90kbps Comet 2.7% 330kbps 1 11 8 28
  • 41. 11 8 28
  • 42. WebSocket 11 8 28
  • 43. Agenda WebSocket Comet Getting Started!! http://www.flickr.com/photos/11086497@N00/277491010/ 11 8 28
  • 44. Comet notification Push 11 8 28
  • 45. WebSocket 11 8 28
  • 46. Comet WebSocket ◯� ◯� ◯� ◯� ◯� ◯� △ ◯� ☓ ◯� ☓ ◯� ☓ ◯� 11 8 28
  • 47. Agenda a2c camera (teacher) WebSocket Comet Getting Started!! by @os0x my son penguin 11 8 28
  • 48. 11 8 28
  • 49. Chat 11 8 28
  • 50. 11 8 28
  • 51. (´ ω ) 11 8 28
  • 53. WebSocket !! PC Web WebSocket 11 8 28
  • 55. The WebSocket protocol draft-ietf-hybi-thewebsocketprotocol-10 Abstract The WebSocket protocol enables two-way communication between a client running untrusted code running in a controlled environment to a remote host that has opted-in to communications from that code. The security model used for this is the Origin-based security model commonly used by Web browsers. The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal of this technology is to provide a mechanism for browser-based applications that need two-way communication with servers that does not rely on opening multiple HTTP connections (e.g. using XMLHttpRequest or <iframe>s and long polling). ref) http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 11 8 28
  • 56. Yet another use case 11 8 28
  • 57. WebSocket DEMO Chrome 14 http://komasshu.com/ws/mecab/pipelinetest.html 11 8 28
  • 58. CSS 11 8 28
  • 59. know more about http://www.flickr.com/photos/26500034@N04/4732968982/ 11 8 28
  • 60. Browser API Protocol http://www.w3.org/TR/websockets/ http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 11 8 28
  • 61. ... http://www.atmarkit.co.jp/fcoding/articles/ http://gihyo.jp/dev/feature/01/websocket websocket/01/websocket01a.html 11 8 28
  • 62. Chrome ver 00 ( ≦13 ), ver 10 ( ≧14 ) Firefox ver 00 ( ≦ 6 w/ about:config), ver 10 (7/8) Safari ver 00 Opera ver 00 ( w/ opera:config ) IE ver 09 ( ≧ 9 w/ Add-on available at “HTML5Labs” (http://html5labs.interoperabilitybridges.com/) 09/10 11 8 28
  • 63. ? socket.io (http://socket.io/) WebSocket Comet Fallback apache wave (8/28) http://www.r-agent.co.jp/info/rss/event/websocket/ 11 8 28
  • 64. Comet Fallback pollyfill socket.io Chrome14 β WebSocket 11 8 28
  • 65. WebSocket socket.io Comet Best Practice Comet 11 8 28
  • 66. HTML5 Comet => Server-Sent Events IE Android ready http://www.w3.org/TR/eventsource/ 11 8 28
  • 67. HTML5 API API 2010 11 8 28
  • 69. • ◦ http://bit.ly/toka20 • WebSocket ◦ http://bit.ly/toka20-B3 • Twitter ◦ #html5j • Facebook ◦ http://www.facebook.com/html5j 11 8 28

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n