Before universal WebSocket
In 2010 WebSocket is still in draft, browser support fragmented (IE8/9 no). A library is needed that abstracts real-time on Node with fallback to long polling, streaming, JSONP. Socket.IO was born in 2010 from Guillermo Rauch (later founder of Vercel).
The 1.0 release
Socket.IO 1.0 is published on 28 May 2014. Complete rewrite separating the transport layer (engine.io) from the application protocol. MIT licence.
// server
const io = require('socket.io')(httpServer);
io.on('connection', (socket) => {
socket.emit('welcome', 'hi');
socket.on('chat', (msg) => io.to('room1').emit('chat', msg));
});
// client
const socket = io('wss://api.example.com');
socket.on('welcome', (m) => console.log(m));
Features
- Transport fallback — WebSocket → long polling automatic
- Auto-reconnect with exponential backoff
- Rooms — broadcast to socket groups
- Namespaces — multiplexing on single connection
- Acknowledgements — callback for receipt guarantee
- Binary support — ArrayBuffer, Blob
- Redis adapter — multi-process/multi-server scaling
- Middleware — auth, logging
Use cases
- Chat and messaging
- Browser push notifications
- Real-time collaboration (shared cursors, typing indicator)
- Live dashboards — monitoring, analytics
- Web multiplayer gaming
- Shared drawing apps
Versions
- 2.x (2017) — binary improvements
- 3.x (November 2020) — breaking changes, TypeScript-first
- 4.x (February 2021) — current state, catch-all listeners
- v5 (2024) — connection state recovery
Competitors
- ws — pure Node WebSocket library, faster, no fallback
- Primus — abstraction over multiple transports
- SockJS — similar, Node + browser
- Centrifugo — Go real-time broker
- Phoenix Channels (Elixir)
- SignalR (.NET)
In the Italian context
Socket.IO is widely used in:
- Corporate customer support chat (Italiaonline, Mediaset, TIM)
- Italian collaborative platforms
- Real-time e-commerce (order notifications)
- Trading desks (price feeds for SME brokers)
- IoT dashboards (fleet monitoring, sensors)
The ecosystem remains dominant for Node.js projects requiring real-time without compatibility complications.
References: Socket.IO 1.0 (28 May 2014). Guillermo Rauch (Vercel founder). MIT licence. Engine.io transport layer. Rooms, namespaces, ack. Version 4.x current standard.
