Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
IO Insights
Search
Guillermo Rauch
October 23, 2012
Programming
3
760
IO Insights
Guillermo Rauch
October 23, 2012
Tweet
Share
More Decks by Guillermo Rauch
See All by Guillermo Rauch
The realtime web: HTTP/1.1 to WebSocket, SPDY & beyond
rauchg
6
1.6k
Socket.IO 1.0
rauchg
9
2.3k
The rise of server-side JavaScript
rauchg
4
280
Other Decks in Programming
See All in Programming
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.2k
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
430
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
Flatt Security XSS Challenge 解答・解説
flatt_security
0
740
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
ドメインイベント増えすぎ問題
h0r15h0
2
570
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
Оптимизируем производительность блока Казначейство
lamodatech
0
950
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
170
14k
Adopting Sorbet at Scale
ufuk
74
9.2k
Side Projects
sachag
452
42k
Building Your Own Lightsaber
phodgson
104
6.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Music & Morning Musume
bryan
46
6.3k
BBQ
matthewcrist
85
9.4k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Unsuck your backbone
ammeep
669
57k
Transcript
IO Insights engine.io and socket.io analytics
About
Guillermo Rauch
@rauchg
devthought.com
learnboost.com
require(‘engine.io’)
var engine = require(‘engine.io’)(server); engine.on(‘connection’, function(socket){ socket.write(‘hello’); socket.on(‘data’, function(){}); });
require(‘socket.io’)
var io = require(‘socket.io’)(server); io.on(‘connection’, function(socket){ socket.emit(‘my’, { event: ‘data’
}); socket.on(‘random’, function(){}); }); io.of(‘/namespace’).on();
Data packets and events are the new currency
But all the tooling is oriented around REST
None
Server insight
1st strategy
Built-in instrumentation
require(‘debug’)(‘wat’)
None
2nd strategy
Meta events
socket.on(‘packet’, function(){}); socket.on(‘packetCreate’, function(){});
3rd strategy
Visualization!
require(‘engine.io-monitor’);
Captures and displays engine.io traffic
Like redis MONITOR
Realtime insight into transport usage
12% 13% 34% 41% polling-xhr polling-jsonp websocket flashsocket
Realtime insight into browser / device usage
Realtime insight into latency
None
Client insight
1st strategy
localStorage.debug
None
Looks awful
2nd strategy
Chrome extension
None
None
How?
None
What’s next?
More visualizations
Protocol analysis eg: display socket.io events differently
Custom protocols
Analyze and document performance implications
Thanks!