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
750
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
ヤプリ新卒SREの オンボーディング
masaki12
0
130
CSC509 Lecture 13
javiergs
PRO
0
110
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
210
Ethereum_.pdf
nekomatu
0
470
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Arm移行タイムアタック
qnighy
0
340
CSC509 Lecture 09
javiergs
PRO
0
140
flutterkaigi_2024.pdf
kyoheig3
0
150
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Featured
See All Featured
Navigating Team Friction
lara
183
14k
Writing Fast Ruby
sferik
627
61k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
It's Worth the Effort
3n
183
27k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
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!