-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
[request] UDP transport #168
Comments
Thanks, I'll keep this on the table. Its not a strong priority for me at the present, but definitely something it would be nice to have. |
looking at this a bit - main uncertainty has to do with the fact that the existing platform udp code does not correspond to the ep/pipe api in the way that, say, the tcp platform code does. do you think it would make sense to adjust the udp platform code to implement if that were in place, it looks like it would not be too bad to create the udp transport as follows: static nni_tran_pipe nni_udp_pipe_ops = {
.p_fini = nni_udp_pipe_fini,
.p_start = nni_udp_pipe_start,
.p_send = nni_udp_pipe_send,
.p_recv = nni_udp_pipe_recv,
.p_close = nni_udp_pipe_close,
.p_peer = nni_udp_pipe_peer,
.p_options = nni_udp_pipe_options,
};
static nni_tran_ep nni_udp_ep_ops = {
.ep_init = nni_udp_ep_init,
.ep_fini = nni_udp_ep_fini,
.ep_connect = NULL,
.ep_bind = nni_udp_ep_bind,
.ep_accept = NULL,
.ep_close = nni_udp_ep_close,
.ep_options = nni_udp_ep_options,
};
static nni_tran nni_udp_tran = {
.tran_version = NNI_TRANSPORT_VERSION,
.tran_scheme = "udp",
.tran_ep = &nni_udp_ep_ops,
.tran_pipe = &nni_udp_pipe_ops,
.tran_init = nni_udp_tran_init,
.tran_fini = nni_udp_tran_fini,
}; does that make sense? do you have another approach in mind? |
I've been thinking about the semantic for UDP (may have a commercial customer that needs it), stay tuned. |
any updates on this? i'm looking at using nanomsg for a project, but one of my requirements is to have a UDP-based option when i don't care about reliability, but want to communicate with computers across networked equipment in a lowest-latency fashion |
Looking forward of UDP integration. In many cases I would rather have UDP drop packages than getting late data from TCP. |
Ditto on this -- I've been unable to easily find good UDP protocols, and it really would be nice to have something that isn't custom every time for embedded real-time applications. |
Same. I'd really like to use nng but I cannot because we really need UDP. |
I'm honestly shocked UDP isn't supported out-of-the-box. It's the standard for realtime protocols that care more about latency than reliability. Edit: so it looks like low-level UDP platform support is already in place. @gdamore do you have opinions on the public API? I'm tempted to just go ahead and implement it. Digging into it, it seems it's just adding "udp4" and "udp6" schemes (also "dtls" for datagram tls?) and implementing dialer/listener., so there's no change to any public API. |
would love to see udp added |
I have a draft implementation (very rough) and a spec. Initially this is just unicast, but I intend to add mesh support. |
This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
For NNG 2.0 (development branch, see dev2.0) I have a PR that adds this -- see #168 - although be advised its a work in progress. There is also a draft specification at nanomsg/rfcs#1 |
This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
breaking out as distinct from #107
Would be great to make unreliable datagrams available as a transport option.
The text was updated successfully, but these errors were encountered: