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

Introduce broadcast API for event sharing #628

Open
sejongk opened this issue Aug 25, 2023 · 7 comments
Open

Introduce broadcast API for event sharing #628

sejongk opened this issue Aug 25, 2023 · 7 comments
Assignees
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers sdk ⚒️

Comments

@sejongk
Copy link
Contributor

sejongk commented Aug 25, 2023

What would you like to be added:
Yorkie presently relies on the Publish-Subscribe model for sharing document and presence events (refer to: pub-sub.md).
However, this lacks the capability to extend its scope to encompass additional event types, notably notifications for end users concerning new document updates or comments.

To address this limitation, the introduction of a "broadcast" feature is recommended.
This feature would enable users to define and share a wider range of general events beyond the existing document and presence events.

It's also related to #442, which extracts Room from Document and moves Presence from Client to Room.

Why is this needed:
Provide a more comprehensive event-sharing mechanism that satisfies various use cases.

@sejongk sejongk added the enhancement 🌟 New feature or request label Aug 25, 2023
@sejongk sejongk self-assigned this Aug 25, 2023
@krapie
Copy link
Member

krapie commented Aug 26, 2023

Is this feature replacing the current watch API (pub/sub model)?
I want to know further details and implementation for this proposal :)

@sejongk
Copy link
Contributor Author

sejongk commented Aug 28, 2023

Is this feature replacing the current watch API (pub/sub model)? I want to know further details and implementation for this proposal :)

Thanks for your interest.
It won't replace the watch API, but extend the current pub/sub model to accept general events by adding new API.
You can find more details in the broadcast docs of Supabase, Liveblocks or Socket.IO.

ref.
https://supabase.com/docs/guides/realtime/broadcast

@hackerwins
Copy link
Member

hackerwins commented Oct 2, 2023

SDKs:

@blurfx
Copy link
Member

blurfx commented Oct 8, 2023

I'll work on the js sdk

@devleejb
Copy link
Member

devleejb commented Jun 8, 2024

It would be beneficial to allow broadcasts to emit events via REST API. For certain events (such as Refresh Notification), it is more natural for the server to emit the events rather than the client.

Reference: https://liveblocks.io/docs/api-reference/rest-api-endpoints#post-broadcast-event

@hackerwins hackerwins added the good first issue 🐤 Good for newcomers label Jul 4, 2024
@gwbaik9717
Copy link

Could I give it a try for JS-SDK?

@sejongk
Copy link
Contributor Author

sejongk commented Aug 3, 2024

Could I give it a try for JS-SDK?

@gwbaik9717 Sure. If you have any questions, feel free to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers sdk ⚒️
Projects
Status: In progress
Status: Todo
Development

No branches or pull requests

6 participants