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

PubNub

182
426
+ 1
238
Socket.IO

10.2K
8.6K
+ 1
775
Add tool

PubNub vs Socket.IO: What are the differences?

Developers describe PubNub as "Build real-time apps quickly and scale them globally". PubNub makes it easy for you to add real-time capabilities to your apps, without worrying about the infrastructure. Build apps that allow your users to engage in real-time across mobile, browser, desktop and server. On the other hand, Socket.IO is detailed as "Realtime application framework (Node.JS server)". Socket.IO enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.

PubNub and Socket.IO can be primarily classified as "Realtime Backend / API" tools.

Some of the features offered by PubNub are:

  • PubNub SDKs support over 50 of the most popular environments, including: iOS, Android, JavaScript, .NET, Java, Ruby, Python, PHP and many more.
  • Data Push - Establish and maintain persistent socket connections to any device (mobile, browser, desktop and server) and push data to global audiences in less than ¼ of a second
  • Presence - Automatically detect when users enter or leave your app and whether machines are online

On the other hand, Socket.IO provides the following key features:

  • 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.

"Massively scalable & easy to use" is the top reason why over 31 developers like PubNub, while over 186 developers mention "Real-time" as the leading cause for choosing Socket.IO.

Socket.IO is an open source tool with 46.7K GitHub stars and 8.53K GitHub forks. Here's a link to Socket.IO's open source repository on GitHub.

According to the StackShare community, Socket.IO has a broader approval, being mentioned in 555 company stacks & 385 developers stacks; compared to PubNub, which is listed in 43 company stacks and 12 developer stacks.

Advice on PubNub and Socket.IO
Needs advice
on
PusherPusherPubNubPubNub
and
AblyAbly

I am building an IoT application that will utilize connected air quality sensors to provide real-time indoor air quality in offices. I want to be able to share this data with a few different databases, etc.

Wondering if anyone has any advice on which real-time streaming API would be best for this sort of application, or even how I should think about it?

See more
Replies (2)
Ben Gamble
Recommends
AblyAbly

For IoT, we support MQTT along with websockets and SSE. The pattern you're suggesting that involves harvesting data from devices and soaking into a database is easy to achieve with one of the Ably integrations (Serverless functions/webhook) . Here are some tutorials to do things like this: https://ably.com/tutorials/reactor-event-zapier#step2-mqtt-ably

See more
Philip Rossen
Recommends
PusherPusher
at

We use Pusher at www.justlearn.com. It works fine. When you reach more users, Pusher gets expensive. We use Pusher for live chat between users. Their software is easy to use. We have had issues with auth on Pusher.

See more
Needs advice
on
Socket.IOSocket.IOFirebaseFirebase
and
ApolloApollo

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 · 319.9K views
Recommends
FirebaseFirebase

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
AblyAbly

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
8base8base

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
Pros of PubNub
Pros of Socket.IO
  • 36
    Massively scalable & easy to use
  • 25
    Easy setup
  • 20
    Reliable
  • 19
    Great support
  • 14
    Flexible to integrate to custom applications
  • 13
    High-Performance
  • 13
    Sockets at Scale
  • 13
    99.999% availability guarantees
  • 12
    High-Reliability
  • 12
    Multiplexing
  • 7
    Scalability
  • 5
    70+ SDKs
  • 5
    High-Availability
  • 4
    Security
  • 4
    Azure Add-on
  • 3
    Heroku Add-on
  • 3
    Easy to setup
  • 3
    Flexible
  • 3
    Presence
  • 2
    Analytics
  • 2
    Free Plan
  • 2
    Server-Side Cache
  • 2
    PhoneGap Plugin
  • 2
    AngularJS Adapter
  • 2
    Data Sync
  • 2
    Data Streams
  • 2
    Support
  • 1
    Easy setup and very reliable
  • 1
    High cost, going up more in Summer '15
  • 1
    Cool
  • 1
    Angular 2+ integration
  • 1
    Documentation, easy to use, great people/service
  • 1
    CTO stephen also is A++++++
  • 1
    Real time and easy to use.
  • 1
    Easy integration with iOS apps
  • 214
    Real-time
  • 141
    Node.js
  • 141
    Event-based communication
  • 102
    WebSockets
  • 101
    Open source
  • 26
    Binary streaming
  • 21
    No internet dependency
  • 9
    Fallback to polling if WebSockets not supported
  • 9
    Large community
  • 6
    Push notification
  • 5
    Ease of access and setup

Sign up to add or upvote prosMake informed product decisions

Cons of PubNub
Cons of Socket.IO
  • 1
    Costly
  • 11
    Bad documentation
  • 4
    Githubs that complement it are mostly deprecated
  • 3
    Doesn't work on React Native
  • 2
    Websocket Errors
  • 2
    Small community

Sign up to add or upvote consMake informed product decisions

What is PubNub?

PubNub makes it easy for you to add real-time capabilities to your apps, without worrying about the infrastructure. Build apps that allow your users to engage in real-time across mobile, browser, desktop and server.

What is Socket.IO?

It enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.

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

Jobs that mention PubNub and Socket.IO as a desired skillset
What companies use PubNub?
What companies use Socket.IO?
See which teams inside your own company are using PubNub or Socket.IO.
Sign up for Private StackShareLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with PubNub?
What tools integrate with Socket.IO?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Vue.jsSpring BootUnity+7
2
1029
JavaScriptPythonPubNub+4
7
1043
What are some alternatives to PubNub and Socket.IO?
Pusher
Pusher is the category leader in delightful APIs for app developers building communication and collaboration features.
SendBird
SendBird is a Messaging SDK, Chat API, and fully managed chat infrastructure for your mobile apps and websites. Embeddable chat for iOS, Android, JavaScript, Unity, .NET.
Stream
Stream allows you to build scalable feeds, activity streams, and chat. Stream’s simple, yet powerful API’s and SDKs are used by some of the largest and most popular applications for feeds and chat. SDKs available for most popular languages.
Kafka
Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
Ably
Ably offers WebSockets, stream resume, history, presence, and managed third-party integrations to make it simple to build, extend, and deliver digital realtime experiences at scale.
See all alternatives