joystick icon indicating copy to clipboard operation
joystick copied to clipboard

Add support for subscribers to websockets

Open rglover opened this issue 1 year ago • 0 comments

This should be built in. If I want to subscribe to a shared message channel across instances, I should be able to call a function from my websocket definition's onOpen/on_open handler. Behind the scenes, Joystick should handle the wiring to a database you specify in your config where new messages land. In the app, we'd want to have some sort of polling or emitter that listens for database changes and then calls the defined subscriber callback.

The point of this is to avoid the messiness of existing DB pub/sub implementations. They work, but getting stuff in sync/avoiding duplicates can be a headache. We should fix that in Joystick so it's ready-to-go.

rglover avatar Dec 31 '23 21:12 rglover