-
Notifications
You must be signed in to change notification settings - Fork 29
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
What is the use case for BidirectionalStreamer #670
Comments
@nkcr added this for the columbus explorer. I got to admit that I didn't follow very closely the use-case, so it might be possible to optimize it. However, as far as I know, it's in use, so it shouldn't be removed! |
I am using this functionality for the PaginateBlock streaming handler. Bi-directional streamer should be supported since we are using websocket (if not why using a full-duplex communication protocol ?). |
Still, I don't quite see an actual use case for that yet. But we can also support it, and for that, we should give more control of the stream to the service, such as calling it with a recv-channel of messages, not calling it on each message. That way, the service can actually handle multiple message without keeping the state inside the service's struct (and we all know how it goes when using a changing shared state...). Using a recv-channel for incoming message does make the implementation easier: closing the channel means the client closed the connection, no need for an explicit "service stop channel". That actually solve most of the points I raised.
If I'm comparing it with So we agree that at least the documentation/tests should be updated :) |
I'm refactoring the streaming capabilities of onet. Now, I'm having issues understanding what is the need for a bidirectional stream. Which real use case cannot be solved by opening a new stream for each client input?
ClientKeep
I was thinking of removing the bidirectionnal support, and having the streaming calls returning a new connection/channel for each.
The text was updated successfully, but these errors were encountered: