Need advice about which tool to choose?Ask the StackShare community!
Apollo vs Socket.IO: What are the differences?
Apollo: GraphQL server for Express, Connect, Hapi, Koa and more. Build a universal GraphQL API on top of your existing REST APIs, so you can ship new application features fast without waiting on backend changes; Socket.IO: 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.
Apollo belongs to "Platform as a Service" category of the tech stack, while Socket.IO can be primarily classified under "Realtime Backend / API".
"From the creators of Meteor" is the top reason why over 8 developers like Apollo, while over 186 developers mention "Real-time" as the leading cause for choosing Socket.IO.
Apollo and Socket.IO are both open source tools. It seems that Socket.IO with 46.7K GitHub stars and 8.53K forks on GitHub has more adoption than Apollo with 7.4K GitHub stars and 911 GitHub forks.
PedidosYa, Trello, and triGo GmbH are some of the popular companies that use Socket.IO, whereas Apollo is used by Impraise, Swat.io, and Policygenius. Socket.IO has a broader approval, being mentioned in 555 company stacks & 385 developers stacks; compared to Apollo, which is listed in 123 company stacks and 121 developer stacks.
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.
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.
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
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
We wanted to save as much time as possible when writing our back-end, therefore Apollo was out of the question, we went for an auto-generated API instead. Hasura looked good in the beginning, but we wanted to retain the ability to add a few manual resolvers and modifications to auto-generated ones, which ruled out Hasura. Postgraphile with its Plug-In architecture was the right choice for us, we never regretted it!
Pros of Apollo
- From the creators of Meteor12
- Great documentation7
- Open source3
- Real time if use subscription2
Pros of Socket.IO
- Real-time217
- Node.js141
- Event-based communication141
- WebSockets102
- Open source101
- Binary streaming26
- No internet dependency21
- Large community10
- Fallback to polling if WebSockets not supported9
- Push notification6
- Ease of access and setup5
- Test1
Sign up to add or upvote prosMake informed product decisions
Cons of Apollo
- File upload is not supported1
- Increase in complexity of implementing (subscription)1
Cons of Socket.IO
- Bad documentation11
- Githubs that complement it are mostly deprecated4
- Doesn't work on React Native3
- Small community2
- Websocket Errors2