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.5k
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
Using "modern" Ruby to build a better, faster Homebrew
mikemcquaid
3
720
バリデーション付きフォームを宣言的に実装する / Declaratively Implementing a Form with Validation
studio_rookery
0
130
Improved REXML XML parsing performance using StringScanner
naitoh
0
190
ライブラリをパブリッシュせずにすばやく試す
exoego
2
110
Datadogのmonitorを Terraform管理に爆速で 移行する
kuro_kurorrr
2
280
ビジネスの構造をアーキテクチャに落とし込みソフトウェアに可変性を注入する
monotaro
PRO
10
2k
esbuild 最適化芸人
exoego
2
960
The Final Frontier of Web Development: React Server Components vs Jakarta EE
ivargrimstad
0
610
プログラミング&実行できるWEBアプリを手作り
ohmori_yusuke
3
210
Adding Security to Microcontroller Ruby
sylph01
2
2k
JRuby 10: Ruby 3.3 on the Modern JVM
headius
0
140
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
76k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
246
20k
Side Projects
sachag
451
41k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
650
58k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
Debugging Ruby Performance
tmm1
70
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
9
1.4k
GraphQLとの向き合い方2022年版
quramy
33
13k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
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!