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

Using multiplex::Client with an unreliable transport? #25

Open
vartiait2 opened this issue Mar 23, 2021 · 3 comments
Open

Using multiplex::Client with an unreliable transport? #25

vartiait2 opened this issue Mar 23, 2021 · 3 comments

Comments

@vartiait2
Copy link

vartiait2 commented Mar 23, 2021

Hi!

I noticed that currently ClientInner in src/multiplex/client.rs assumes always to receive a reply from the underlying transport.
However, when using e.g. tokio_util::udp::UdpFramed as a transport, there won't be any guarantee that a reply will arrive
and Pending requests will be left within ClientInner's responses VecDeque.

Should the multiplexing capable transport used implement a per request timeout feature or what would be a better solution?

@jonhoo
Copy link
Collaborator

jonhoo commented Aug 15, 2021

This is a tough question. I think what I'd do here is to make the transport produce "ghost" time-out responses after a certain amount of time, rather than bake that functionality into the Client itself. Otherwise I suspect there are a lot of special behaviors the Client could adopt that would end up having to be integrated as well.

@vartiait2
Copy link
Author

Thanks for the reply. I'm using tokio_tower::multiplex::MultiplexTransport to pair a tag store with a transport, so I could incorporate tokio_util::time::delay_queue::DelayQueue in it to yield timeouts along with replies.

@JRAndreassen
Copy link

@vartiait2 : I'd like to hear what you did to resolve this issue.
I'm looking at the same to implement a multiplexing SNMP Client...
(Yes, SNMP is dead... Long live SNMP... )
Thanks
JR

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

No branches or pull requests

3 participants