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
290
Other Decks in Programming
See All in Programming
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
570
GoとPHPのインターフェイスの違い
shimabox
2
190
Immutable ActiveRecord
megane42
0
140
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
DROBEの生成AI活用事例 with AWS
ippey
0
130
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
38
14k
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.4k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
5
390
Featured
See All Featured
Facilitating Awesome Meetings
lara
52
6.2k
Embracing the Ebb and Flow
colly
84
4.6k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Unsuck your backbone
ammeep
669
57k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
330
A better future with KSS
kneath
238
17k
KATA
mclloyd
29
14k
Scaling GitHub
holman
459
140k
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!