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
780
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
Using Types to Save Your Code's Future
rollbear
0
100
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
330
Google Opalで使える37のライブラリ
mickey_kubo
3
170
Devoxx BE - Local Development in the AI Era
kdubois
0
150
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
140
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
110
iOSでSVG画像を扱う
kishikawakatsumi
0
180
SODA - FACT BOOK(JP)
sodainc
1
9k
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
990
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
697
190k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Facilitating Awesome Meetings
lara
57
6.6k
The World Runs on Bad Software
bkeepers
PRO
72
11k
It's Worth the Effort
3n
187
28k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
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!