-
Notifications
You must be signed in to change notification settings - Fork 4
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
how should a UDP transport look like after the big transport refactor #3
Comments
I'm interested in this abstraction as well. Just returning the same connection on Accept doesn't seem like a good idea. It would turn Accept from blocking into non-blocking since there is nothing to wait for.
|
So, the current thinking is to have a separate transport "column" for packet based connections as they're significantly different. |
some discussions around that topic also happened there: libp2p/specs#71 (comment) |
I was thinking something else. They aren't all that different: libp2p/specs#71 (comment) |
We'll have to be careful about prioritizing connections and saying "all connections support literally all features" is a strong statement we'll have to think about. However, that should work. (Note: we'll probably also want session-less packet connections and those will likely need a separate stack). |
Yeah agreed that we need to be able to tell the nuances there. For many use cases there'll be one combination of transport/muxers/crypto/etc. that'll fit nicely, and most other combinations will be less than ideal.
This is the fire-and-forget messaging that's mainly motivated by DHT latency and throughput right? |
Yes. |
As far as I can tell there isn't much in the way of UDP transports. I looked at the fork someone made but it doesn't look like it compiles or works. Has there been any success in a UDP transport? I know there is |
An actual UDP transport would be be packet/message oriented and would require a new transport stack and some new libp2p interfaces for sending/receiving messages. |
Damn that is no short order, but makes sense. thanks. |
I guess we can close this issue then. I'll close it. Fee free to re-open if anything else needs to happen here. |
In my quest to understand and get my hands dirty with libp2p I was looking to implement a UDP transport.
So I discovered this repo. Now I have a couple of question regarding how an UDP transport should look like now that the big transport refactor has landed.
Using the tcp transport as example I can get my head around pretty much every part of the transport interface.
The only problem I have is regarding the
Listen
method of the interface.Listen
should return aListener
and aListener
should have anAccept
method. In the context of UDP, anAccept
method doesn't really make sense. So I'm puzzled, should we have another kind of transport for non connected transport type or should I hack around it and implement a UDP listener that would always return the same underlying connection for exampleI've started working on some implementation if you already want to have a look at it : https://github.com/zaibon/go-udp-transport
The text was updated successfully, but these errors were encountered: