libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.52k stars 272 forks source link

Multihop Relay mode - fold left or right #21

Open ghost opened 7 years ago

ghost commented 7 years ago

When building multi-hop relayed connections, there can be multiple modes for how exactly to dial. There are two obvious modes, but both of them are currently blind spots in the circuit relay spec.

(All kinds of other modes are also possible -- these two are just the most obvious ones.)

Hop-by-hop dialing

Deferred dialing

dryajov commented 7 years ago

For the naming, matreshka seems a much more widespread technical term than shallot, but I might be biased on this one 😜 .

jvican commented 6 years ago

Interesting. Hop-by-hop dialing reminds me of foldLeft and deferred dialing of foldRight in the functional programming lingo (the formula section exemplifies why). Perhaps these names would be better given their consistency between each other.