user3587754
user3587754

Reputation: 851

What is the difference between Socket.IO and Firebase?

I watched a codeschool tutorial on Node.js and they imitated a chat server using Socket.IO in their tutorial.

I am also under the impression that Firebase does the same thing.

What is the difference between the two, if there are any?

Upvotes: 45

Views: 35769

Answers (2)

There are many, many differences. For example:

SDKs

Firebase has 9 SDKs, including JavaScript, Android, Unity. Socket just 1 official client library (JavaScript) for browsers.

Realtime Features Firebase has pub/sub messaging, connection state recovery, presence, native push notifications, webhooks. Socket.io doesn't have any of those.

Documentation

Both have pretty good documentation with Getting Started Guides, Information Architecture and Developer Journey, API reference.

Those are just some examples, but here is an in-depth comparison between Firebase and Socket.io

Upvotes: 0

alandarev
alandarev

Reputation: 8635

There actually is the difference.

Socket.io is a javascript library to manage sockets. In a web-chat example, you create sockets:

  1. client(s) to server
  2. Server to client(s)

That is, you control all the end-points, and use socket.io as a tool to communicate between your end-points.

In contrast, using firebase you only focus around 1 (client to server)


Pros and Cons of using service versus own infrastructure is a different subject, and heavily opinionated.

Upvotes: 52

Related Questions