-
Notifications
You must be signed in to change notification settings - Fork 83
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
Data streams #603
Data streams #603
Conversation
it seems like you haven't added any nanpa changeset files to this PR. if this pull request includes changes to code, make sure to add a changeset, by writing a file to
refer to the manpage for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm from a protocol level.
Use protoc-gen-prost 0.3.1
Implement common types.
Add incoming stream manager and expose public methods
Separate text and byte stream reader; easier implementation for FFI client and server at the cost of more boilerplate
Needed to access `OutgoingStreamManager`; consider moving to `LocalParticipant`
Yes, it is the same for textstreams/datastreams/rpc
Does this mean that every client will have to return all registered handlers after connect? It would be easier if we don't have to.
If you send directly after connecting (assume the client language already has a registered handler), you could skip this part. We will not be responsible for any buffering Another solution would be to not register any callback to the room, because it seems like an anti-pattern with our channel based events? In this case everything will be buffered and you "support the register before connect" on all languages for free |
@theomonnom do I understand your suggestion correctly that we could
|
I think we don't even need to drop them? If we push the data inside the room_events channel. They're buffered but will be consumed as soon as the connection is established. (Like basically a new RoomEvent variant?). No timeout will be needed IMO. In the code there is no explicit "buffer until we're connected", we just push to our event queue and assume they're going to get consumed by the user event loop. (In this case livekit-ffi) The issue with the above pattern, is that every language will have to send a registerHandler each time after the connecting. (we have to keep track of all registered handlers before connection) But if we "always" forward what we receive to the other languages, then no registration is needed. If we do this "always" forward mode, then the Python/Node doesn't even need to send a RegisterRequest, but they can just read the data they receive from the ffi server and dispatch their own handlers |
Add method to conditionally take value based on predicate
7c93b9c
to
320abfe
Compare
320abfe
to
136faa2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! very clean impl!
This PR adds native data streams support in Rust and a high-level interface for FFI clients.