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.0.4, sockjs 0.3.19 and ws 4.0.0.

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 (38,563 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 and less dependencies.
ws has more daily downloads, more weekly downloads, more monthly downloads, less open issues and less open pull requests.

In our review socket.io got 3,605,997 points, sockjs got 2,665,608 points and ws got 7,720,851 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.0.4
NPM

sockjs
0.3.19
NPM

ws
4.0.0
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, websocket-node, socketio websocket, websocket-node, socketio websocket, socketio, websocket-node
Comparison
licenses MIT MIT MIT
created 7 years ago (Dec, 2010) 6 years ago (Aug, 2011) 6 years ago (Dec, 2011)
modified 2 days ago 3 months ago a day ago
total versions 108 31 90
version average every 24 days every 2 months every 25 days
maintainers 2 5 4
dependencies 5 2 3
Daily Downloads 245,997 198,178 503,884
Weekly Downloads 1,569,728 1,228,893 3,095,215
Monthly Downloads 5,299,891 3,897,178 11,821,589
open issues 221 28 18
open pull requests 20 4 0
stargazers 38,563 1,511 7,290
subscribers 1,600 72 285
forks 7,286 245 1,082
wiki
Points
Overall points

3,605,997

Points

2,665,608

Points

7,720,851

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