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 communication #71

Merged
merged 5 commits into from
Jan 10, 2022
Merged

Introduce broadcast communication #71

merged 5 commits into from
Jan 10, 2022

Conversation

jonatanklosko
Copy link
Member

@jonatanklosko jonatanklosko commented Jan 7, 2022

Adds Kino.Bridge.broadcast(topic, message) that goes through the group leader and is later broadcasted to interested processes on Livebook side. This way we can send events from JS server to Livebook as a single message and use the pubsub there, as opposed to sending the event to individual processes in Livebook.

Also adds Kino.Bridge.send(pid, message), so that all communication goes through the bridge API.

@jonatanklosko
Copy link
Member Author

jonatanklosko commented Jan 7, 2022

Added a Livebook-like group leader for tests, so that we can test parts relying on Kino.Bridge. Here specifically we want to assert that the events are broadcasted (while previously we would just subscribe the test process to the widget directly). Also added a number of functions shared across the Kino.JS.Live widgets, we can make it public once things settle (we will also need a clean way for people to use the new group leader for those tests).

@jonatanklosko jonatanklosko merged commit 43b3a6f into main Jan 10, 2022
@jonatanklosko jonatanklosko deleted the jk-broadcast branch January 10, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants