Need advice about which tool to choose?Ask the StackShare community!

Socket.IO

8.3K
6.8K
+ 1
773
ws

70
123
+ 1
0
Add tool

Socket.IO vs ws: What are the differences?

Developers describe Socket.IO as "Realtime application framework (Node.JS server)". It enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed. On the other hand, ws is detailed as "A Node.js WebSocket library". It is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation.

Socket.IO and ws belong to "Realtime Backend / API" category of the tech stack.

Some of the features offered by Socket.IO are:

  • Real-time analytics - Push data to clients that gets represented as real-time counters, charts or logs.
  • Binary streaming - Starting in 1.0, it's possible to send any blob back and forth: image, audio, video.
  • Instant messaging and chat - Socket.IO's "Hello world" is a chat app in just a few lines of code.

On the other hand, ws provides the following key features:

  • Simple to use
  • Blazing fast
  • WebSocket client and server for Node.js

Socket.IO and ws are both open source tools. It seems that Socket.IO with 47.7K GitHub stars and 8.68K forks on GitHub has more adoption than ws with 12.4K GitHub stars and 1.6K GitHub forks.

Advice on Socket.IO and ws
Needs advice
on
Socket.IO
Firebase
and
Apollo

We are starting to work on a web-based platform aiming to connect artists (clients) and professional freelancers (service providers). In-app, timeline-based, real-time communication between users (& storing it), file transfers, and push notifications are essential core features. We are considering using Node.js, ExpressJS, React, MongoDB stack with Socket.IO & Apollo, or maybe using Real-Time Database and functionalities of Firebase.

See more
Replies (3)
Timothy Malstead
Junior Full Stack Developer at Freelance | 7 upvotes 路 202.7K views
Recommends
Firebase

I would recommend looking hard into Firebase for this project, especially if you do not have dedicated full-stack or backend members on your team.

The real time database, as you mentioned, is a great option, but I would also look into Firestore. Similar to RTDB, it adds more functions and some cool methods as well. Also, another great thing about Firebase is you have easy access to storage and dead simple auth as well.

Node.js Express MongoDB Socket.IO and Apollo are great technologies as well, and may be the better option if you do not wish to cede as much control to third parties in your application.

Overall, I say if you wish to focus more time developing your React application instead of other parts of your stack, Firebase is a great way to do that.

See more
Recommends
Ably

Hello Noam 馃憢,

I suggest taking a look at Ably, it has all the realtime features you need and the platform is designed to guarantee critical functionality at scale.

Here is an in depth comparison between Ably and Firebase

See more
Recommends
8base

Hey Noam,

I would recommend you to take a look into 8base. It has features you've requested, also relation database and GraphQL API which will help you to develop rapidly.

Thanks, Ilya

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More