Needs advice
on
Next.jsNext.jsPusherPusher
and
Socket.IOSocket.IO

My web app will use redisJSON and/or MongoDB. I need my app to have real-time functions. I don't want to run my Next.js app with a dev server on the node. I want to use vercel's hosting with static side generation only. Do I use pusher or Socket.IO? Or maybe some tool I don't know about.

READ LESS
3 upvotes·157.8K views
Replies (4)
Product Champion ·
Recommends
on
Ably
at

Key thing to understand here is that you are hosting data & logic somewhere. Socket.IO requires you to host and manage a dev server somewhere (as the previous suggestion mentioned Heroku is a good choice)

However, It's not really in keeping with the serverless world that Vercel provides and its a headache to scale and manage. We (I work at Ably) have a bunch of open source examples of how all this works. Ably provides serverless N to N connectivity, along with first class integrations into serverless functions on AWS, Azure, cloudflare and GCP. This allows you to build a realtime, serverless system that you can scale without any pre provisioning.

Nothing is totally free but you can get away with the free tiers on all of these services for a lot longer than you may think.

READ MORE
Building a realtime chat app with Next.js and Vercel | Ably Blog: Data in Motion (ably.com)
5 upvotes·1.9K views
Recommends
on
Pusher
Socket.IO

It really depends on how you want to do it. If you use Socket.IO, you do have to have your own server running somewhere else, a good free one is Heroku. Pusher is nice if you know what you are trying to do, know your limits, and how to do it. While Socket.IO allows more flexibility if you need to do something crazy, Pusher is great if you're just doing standard real-time data transfer because there is minimal setup. The only other thing about Pusher is that it is not entirely free, so if you know the pricing, know how much you are going to use, and are willing, you could easily use Pusher.

READ MORE
3 upvotes·218 views
View all (4)
Avatar of Kabir Chawla