Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

The protocol's interface for unreliable transport #186

Closed
theobat opened this issue Oct 7, 2016 · 9 comments
Closed

The protocol's interface for unreliable transport #186

theobat opened this issue Oct 7, 2016 · 9 comments

Comments

@theobat
Copy link

theobat commented Oct 7, 2016

Hi @diasdavid ,
Not sure about this sentence in the libp2p specs :

Note: At this time, no unreliable implementations exist. The protocol's interface for defining and using unreliable transport has not been defined.

I don't think I understand properly what this means so could anyone throw a simple explanation ? (What I think it means is : there is no spec defined for how to handle in the ipfs p2p protocols the absence of a transport protocol in a multi address path... ). More specifically what does unreliable means in this context ?

@Kubuxu
Copy link

Kubuxu commented Oct 7, 2016

//cc @lgierth

@whyrusleeping
Copy link

libp2p isnt really sure how to handle unreliable protocols in general. It makes a large number of assumptions about all of its transports being reliable (in the TCP, receive all the packets in order meaning of the word).

Adding unreliable transports to ipfs would mean rethinking how various aspects of the protocol work, crypto for example would need to change, we currently use a stream cipher that requires reliable ordered packets.

The identify handshake also would need different logic, getting that info exchanged is required for the proper functioning of the node, so we would want a way to 'upgrade' temporarily to a reliable connection (retransmits, etc) and then back down for other comms.

@daviddias
Copy link

@theobat exactly what @whyrusleeping said. tl;dr; IPFS wouldn't work over a straight UDP socket, which is an unreliable transport. However, a way to make it work is to upgrade the UDP socket with some kind of Congestion Window to add reliability to the flow, like UDT or uTP do, however, we don't have that 'Congestion Window' stand alone module implemented.

Let us know if the question still resides :D

@Kubuxu
Copy link

Kubuxu commented Oct 9, 2016

We even have code for the uTP transport in go-ipfs but due to some bugs it is disabled by default.

@daviddias
Copy link

@Kubuxu it would be helpful to point to those threads when referencing that there are bugs, so that people that find this issue can also know if the bugs are 'solved' by the time they find this.

@Kubuxu
Copy link

Kubuxu commented Oct 9, 2016

I don't remember what was the bug and I don't think there is an issue for that.

@whyrusleeping
Copy link

I'm actually not certain at this point the bugs were from utp. We need to
go back, verify and stress test that code to be sure

On Sun, Oct 9, 2016, 18:46 Jakub Sztandera [email protected] wrote:

I don't remember what was the bug and I don't think there is an issue for
that.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#186 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABL4HOHme06PuF63V1hVA16HMvRxatVIks5qyW7fgaJpZM4KRBTp
.

@theobat
Copy link
Author

theobat commented Oct 14, 2016

Thank you all for your answers: another discussion/issue about this here.

@flyingzumwalt
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants