How would you implement realtime / websockets in RedwoodJS?

You’re making me blush here with all the flattery :blush:

With Redwood 0.22.0 we got Supabase 1.0 support, and I’ve been wanting to update my supaslack example. This could just have been the kick in the behind I needed to start working on that. No promises, but ping me again middle of next week if you haven’t heard anything from me.


I love RedwoodJS and try to use it for each new project.

I’ve tried to port (see GitHub - 0x5eba/Video-Meeting: Google Meet / Zoom clone in a few lines of code) over to RedwoodJS but then was getting stuck with how to build the equivalent of these 100 lines (single-file backend Express server) to set up on RedwoodJS for group video chat.

It seems like a video chat app is not suited to a serverless architecture and is a case (like others have mentioned above) where I ought to go a different direction.

Is my understanding correct, or has anything changed since these earlier posts? Thank you so much. :slight_smile:

Hey Ryan, you’re correct that we have not worked out any serverless-native solutions for WebSockets. To bang my own drum for a second, Cloudflare Workers recently added support for WebSockets which would be a nice add-on to the benefits we already would get from running RedwoodJS on Cloudflare’s edge network with Workers. This is still in the early research stage unless anyone with more Workers experience wants to run with it.

Until that is worked out you’ll either want to go the self-hosted route, which we’re also working on making a lot easier by containerizing Redwood, or check out the Supabase solutions already mentioned. Render may also have some WebSockets ability but you’d have to ask someone with more Render experience than me.

Not 100% related to realtime/subscriptions, but for practical purposes there is an easy way to do polling as a workaround: Cookbook example: Polling - #9 by dthyresson