Compare

Comparing socket.io vs. sockjs vs. ws

How are they different?

Here we compare between socket.io, sockjs and ws. In this comparison we will focus on the latest versions of those packages. The current versions are socket.io 2.1.1, sockjs 0.3.19 and ws 5.1.1.

socket.io, node.js realtime framework server. It was authored on Dec, 2010.
sockjs, SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication. It was authored by Marek Majkowski on Aug, 2011.
ws, Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js. It was authored by Einar Otto Stangvik on Dec, 2011.

When comparing those packages you notice that socket.io is the more popular package today (41,558 Stars on Github).
socket.io has been out there for longer (since 7 years ago), it also has more versions, more frequent updates, more stars on Github, more followers on Github and more forks.
sockjs has a bigger community of maintainers.
ws has fewer dependencies, more daily downloads, more weekly downloads, more monthly downloads, fewer open issues and fewer open pull requests.

In our review socket.io got 4,632,434 points, sockjs got 4,519,664 points and ws got 11,658,569 points. The points are a summary of how big the community is and how well the package is maintained.

Lets dive deeper and have a look at some more details on those packages.

Going into more detail

 

socket.io
2.1.1
NPM

sockjs
0.3.19
NPM

ws
5.1.1
NPM

description node.js realtime framework server SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
keywords realtime, framework, websocket, tcp, events, socket, io websockets, websocket HyBi, Push, RFC-6455, WebSocket, WebSockets, real-time
author N/A Marek Majkowski Einar Otto Stangvik
Related / similar packages
websocket, socketio, websocket-node socketio, websocket-node, websocket websocket, socketio, websocket-node
Comparison
licenses MIT MIT MIT
created 7 years ago (Dec, 2010) 7 years ago (Aug, 2011) 6 years ago (Dec, 2011)
modified 4 days ago 2 months ago 2 months ago
total versions 110 31 94
version average every 25 days every 3 months every 25 days
maintainers 2 5 4
dependencies 6 2 1
Daily Downloads 96,204 68,619 220,760
Weekly Downloads 1,911,316 1,872,479 4,793,516
Monthly Downloads 7,153,826 7,091,169 18,278,866
open issues 265 30 18
open pull requests 12 4 1
stargazers 41,558 1,547 8,612
subscribers 1,672 71 320
forks 7,781 257 1,196
wiki
Points
Overall points

4,632,434

Points

4,519,664

Points

11,658,569

Points
CLI Shortcuts
install npm i -S socket.io npm i -S sockjs npm i -S ws
remove npm r -S socket.io npm r -S sockjs npm r -S ws

Share this with other developers

store