juicyllama / framework

JuicyLlama Framework
https://juicyllama.com
13 stars 6 forks source link

Replace Pusher with NestJS Websockets #212

Open andyslack opened 5 months ago

andyslack commented 5 months ago

Discussed in https://github.com/juicyllama/framework/discussions/152

Originally posted by **andyslack** January 17, 2024 Hi Guys, What are your thoughts on switching out Pusher (paid) for a native solution like sockets.io via the NestJs Websockets package? Everything is fairly abstracted so no work should be needed on the client side if implemented correctly. It should help speed up project creation and reduce costs.
andyslack commented 5 months ago

There will be frontend/client implications to this change, we should share how to upgrade these as part of the release process.

yossi-shasho commented 5 months ago

@andyslack this is finally ready for review. Breaking changes:

  1. methods startPusher is removed without need for replacement
  2. method loadPusher and unloadPusher are replaced with subscribeWebsocket and unsubscribeWebsocket
yossi-shasho commented 5 months ago
  1. Add user_id column to BeacnPush entity

TBD: Finish the client-to-server flow. The entire infrastructure is there, so its a matter of a few hours of work. I didn't do it now because this already turned out to be a pretty big feature and I'd rather finish integrating it to the client apps and possibly to attend to more urgent features bc afaik nobody's actually waiting atm for it. the client-to-server flow wont introduce further breaking changes.