threefoldtech / mycelium

End-2-end encrypted IPv6 overlay network
Apache License 2.0
20 stars 10 forks source link

Investigate UDP transport #144

Open LeeSmet opened 4 months ago

LeeSmet commented 4 months ago

While the current implementation using both tcp and quic work, there might be benefits to implementing proper "plain" UDP sockets. While these won't be useable with the current connection trait, an approach would be to add a a slightly differnet read/write loop for this. The current frames can be encoded pretty easily, and we might be able to properly support recvmmsg and sendmmsg (double m intended yes)

LeeSmet commented 4 months ago

If we do implement this, the lossy nature of the transport does mean we will also need to implement acknowledgements in the protocol

LeeSmet commented 1 month ago

This will likely not be done as a result of #253. However, a hybrid solution might be possible (especially for quic), where protocol messages use reliable communication, and data forwarding uses plain udp. Quinn supports sending unreliable datagrams for instance. This would require reworking the connection trait

iwanbk commented 1 month ago

there might be benefits to implementing proper "plain" UDP sockets

what is the benefit?