SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Sample code for this demo var p = new Plug(‘ws://onmessage.ws/msgpack_chat’, ‘plug.msgpack.js’); p.onmessage = function(e) { alert(e.data); } p.connect(); p.send(‘Hello’); p.disconnect();
msgpack_chat.html plug.js plug.msgpack.js msgpack.codec.js File Relationships <script type=‘text/javascript’ src=‘plug.js’> includes automatically. (but not resolve dependencies this time) Impremented by uupaa-san https://github.com/uupaa/msgpack.js
msgpack_chat.html DATA flow for send p.send(‘Hello’); msgpack.pack(‘Hello’).toString(); 1  ‘Hello’ ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 5 4 ‘165, 72, 101, 108, 108, 111’ WebSocket.send(Array.toString()) Because of hybi-00 spec can send only text. ‘165, 72, 101, 108, 108, 111’ chatserver
DATA flow for recv p.onmessage = function(e) {    alert(e.data); // === ‘Hello’ }; msgpack_chat.html 5  ‘Hello’ 4  ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 1 ‘165, 72, 101, 108, 108, 111’ chatserver Make array from CSV String. msgpack.unpack([165, 72, 101, 108, 108, 111]);
msgpack_rpc_client.html msgpack.rpc.client.js plug.js plug.msgpack.js msgpack.codec.js Next Target
ssh_client.html ssh.client.js etc. Implement several network protos by Javascript plug.js plug.ssh.js etc. Future Target
proto.client.js mod_websocket for lighty can realize this world! Lighty w/ mod_websocket MessagePack::RPC::Server SSHd SMTPd ・・・ You can plug several existing TCP Servers only with writing Javascript Code! And also can plug special servers if you write ServerSide.
Lack to realize… Browser support for WebSocket.{send,onmessage}(ArrayBuffer) Implementation of Stream desirializer by Javascript for MessagePack And also my knowledge time

Weitere ähnliche Inhalte

Was ist angesagt?

FOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngineFOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngine
dottedmag
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
Puppet
 
Open Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro RiveroOpen Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro Rivero
Aragón Open Data
 
Unity and WebSockets
Unity and WebSocketsUnity and WebSockets
Unity and WebSockets
Josh Glover
 

Was ist angesagt? (20)

Selenium sandwich-2
Selenium sandwich-2Selenium sandwich-2
Selenium sandwich-2
 
Any event intro
Any event introAny event intro
Any event intro
 
Mangling
Mangling Mangling
Mangling
 
FOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngineFOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngine
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JS
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)
 
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
 
Demo for Why Use PowerShell
Demo for Why Use PowerShellDemo for Why Use PowerShell
Demo for Why Use PowerShell
 
Hunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummitHunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummit
 
Firewall filters
Firewall filtersFirewall filters
Firewall filters
 
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQRealtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
 
FluentLeniumで困った話
FluentLeniumで困った話FluentLeniumで困った話
FluentLeniumで困った話
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
 
Open Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro RiveroOpen Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro Rivero
 
App-o-Lockalypse now!
App-o-Lockalypse now!App-o-Lockalypse now!
App-o-Lockalypse now!
 
Tres Gemas De Ruby
Tres Gemas De RubyTres Gemas De Ruby
Tres Gemas De Ruby
 
Source Plugins
Source PluginsSource Plugins
Source Plugins
 
Unity and WebSockets
Unity and WebSocketsUnity and WebSockets
Unity and WebSockets
 

Andere mochten auch

Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv
Asmahan Salih
 
Who Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine FluWho Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine Flu
NATURE 4EVER
 
Rosemary Marsh cv final
Rosemary Marsh cv final Rosemary Marsh cv final
Rosemary Marsh cv final
Rosemary Marsh
 
FINAL CV RESUME edited
FINAL CV RESUME editedFINAL CV RESUME edited
FINAL CV RESUME edited
mahendra shah
 

Andere mochten auch (14)

Automotive trainer persoonlijke training - Sander De Clerck.
Automotive trainer  persoonlijke training - Sander De Clerck.Automotive trainer  persoonlijke training - Sander De Clerck.
Automotive trainer persoonlijke training - Sander De Clerck.
 
Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv
 
Software-Native metrics: Depsy lessons learned
Software-Native metrics: Depsy lessons learnedSoftware-Native metrics: Depsy lessons learned
Software-Native metrics: Depsy lessons learned
 
Who Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine FluWho Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine Flu
 
কার্যপত্র Lecturer 54
কার্যপত্র Lecturer 54কার্যপত্র Lecturer 54
কার্যপত্র Lecturer 54
 
It all started with a mouse - A case study on disney
It all started with a mouse - A case study on disneyIt all started with a mouse - A case study on disney
It all started with a mouse - A case study on disney
 
DoRoad by 市川電産 (Hackcars day 2015)
DoRoad by 市川電産 (Hackcars day 2015)DoRoad by 市川電産 (Hackcars day 2015)
DoRoad by 市川電産 (Hackcars day 2015)
 
Rosemary Marsh cv final
Rosemary Marsh cv final Rosemary Marsh cv final
Rosemary Marsh cv final
 
Neuro ex
Neuro exNeuro ex
Neuro ex
 
English Day la Garrotxa 2017. Groups
English Day la Garrotxa 2017. GroupsEnglish Day la Garrotxa 2017. Groups
English Day la Garrotxa 2017. Groups
 
The South African Journal of Science - iThenticate
The South African Journal of Science - iThenticateThe South African Journal of Science - iThenticate
The South African Journal of Science - iThenticate
 
Communication Soft Skills
Communication Soft SkillsCommunication Soft Skills
Communication Soft Skills
 
Social contexts of second language acquisition
Social contexts of second language acquisitionSocial contexts of second language acquisition
Social contexts of second language acquisition
 
FINAL CV RESUME edited
FINAL CV RESUME editedFINAL CV RESUME edited
FINAL CV RESUME edited
 

Ähnlich wie Supplemental explanation WebSocket Demo.

09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
Rick Copeland
 
Thread介紹
Thread介紹Thread介紹
Thread介紹
Jack Chen
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
 

Ähnlich wie Supplemental explanation WebSocket Demo. (20)

Gpars concepts explained
Gpars concepts explainedGpars concepts explained
Gpars concepts explained
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Ajax
AjaxAjax
Ajax
 
Boost your testing: End-to-End with Docker and Geb
 Boost your testing: End-to-End with Docker and Geb Boost your testing: End-to-End with Docker and Geb
Boost your testing: End-to-End with Docker and Geb
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
Thread介紹
Thread介紹Thread介紹
Thread介紹
 
Blockly
BlocklyBlockly
Blockly
 
KSDG-iSlide App 開發心得分享
KSDG-iSlide App 開發心得分享KSDG-iSlide App 開發心得分享
KSDG-iSlide App 開發心得分享
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPP
 
Twig Templating
Twig TemplatingTwig Templating
Twig Templating
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
 

Kürzlich hochgeladen

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Kürzlich hochgeladen (20)

Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 

Supplemental explanation WebSocket Demo.

  • 1. Sample code for this demo var p = new Plug(‘ws://onmessage.ws/msgpack_chat’, ‘plug.msgpack.js’); p.onmessage = function(e) { alert(e.data); } p.connect(); p.send(‘Hello’); p.disconnect();
  • 2. msgpack_chat.html plug.js plug.msgpack.js msgpack.codec.js File Relationships <script type=‘text/javascript’ src=‘plug.js’> includes automatically. (but not resolve dependencies this time) Impremented by uupaa-san https://github.com/uupaa/msgpack.js
  • 3. msgpack_chat.html DATA flow for send p.send(‘Hello’); msgpack.pack(‘Hello’).toString(); 1 ‘Hello’ ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 5 4 ‘165, 72, 101, 108, 108, 111’ WebSocket.send(Array.toString()) Because of hybi-00 spec can send only text. ‘165, 72, 101, 108, 108, 111’ chatserver
  • 4. DATA flow for recv p.onmessage = function(e) { alert(e.data); // === ‘Hello’ }; msgpack_chat.html 5 ‘Hello’ 4 ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 1 ‘165, 72, 101, 108, 108, 111’ chatserver Make array from CSV String. msgpack.unpack([165, 72, 101, 108, 108, 111]);
  • 5. msgpack_rpc_client.html msgpack.rpc.client.js plug.js plug.msgpack.js msgpack.codec.js Next Target
  • 6. ssh_client.html ssh.client.js etc. Implement several network protos by Javascript plug.js plug.ssh.js etc. Future Target
  • 7. proto.client.js mod_websocket for lighty can realize this world! Lighty w/ mod_websocket MessagePack::RPC::Server SSHd SMTPd ・・・ You can plug several existing TCP Servers only with writing Javascript Code! And also can plug special servers if you write ServerSide.
  • 8. Lack to realize… Browser support for WebSocket.{send,onmessage}(ArrayBuffer) Implementation of Stream desirializer by Javascript for MessagePack And also my knowledge time