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
770
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.4k
The rise of server-side JavaScript
rauchg
4
290
Other Decks in Programming
See All in Programming
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
270
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
240
ニーリーにおけるプロダクトエンジニア
nealle
0
720
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
580
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
220
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
380
技術同人誌をMCP Serverにしてみた
74th
1
550
童醫院敏捷轉型的實踐經驗
cclai999
0
210
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
5つのアンチパターンから学ぶLT設計
narihara
1
140
WindowInsetsだってテストしたい
ryunen344
1
230
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
GraphQLとの向き合い方2022年版
quramy
49
14k
Code Reviewing Like a Champion
maltzj
524
40k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
How to Ace a Technical Interview
jacobian
277
23k
Site-Speed That Sticks
csswizardry
10
670
Raft: Consensus for Rubyists
vanstee
140
7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Adopting Sorbet at Scale
ufuk
77
9.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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!