Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for subscribers to websockets #372

Open
rglover opened this issue Dec 31, 2023 · 0 comments
Open

Add support for subscribers to websockets #372

rglover opened this issue Dec 31, 2023 · 0 comments
Assignees
Labels
feature Something new to add @joystick.js/node Related to the @joystick.js/node package.

Comments

@rglover
Copy link
Contributor

rglover commented Dec 31, 2023

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 rglover added feature Something new to add @joystick.js/node Related to the @joystick.js/node package. labels Dec 31, 2023
@rglover rglover self-assigned this Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new to add @joystick.js/node Related to the @joystick.js/node package.
Projects
1.x.x
Awaiting triage
2.0.0
Awaiting triage
Development

No branches or pull requests

1 participant