radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
424 stars 39 forks source link

Disco Channel #245

Open FintanH opened 4 years ago

FintanH commented 4 years ago

Currently, the discovery set up takes a Vec<(PeerId, SocketAddr)> and this has to be statically known upon configuring the PeerConfig.

If the Peer is already running and we wanted to add seeds we would have to restart the network stack again. Alternatively, we can use a Channel instead of a Vec for push/popping seeds on/from. All without restarting the network stack.

massimiliano-mantione commented 4 years ago

:+1:

kim commented 4 years ago

Note that Protocol::run takes a impl futures::Stream<Item = (PeerId, SocketAddr)> -- the caller can wire up a channel as they like without any need for library support.

kim commented 3 years ago

Is this still something we want to provide library support for? If so, how exactly?

/cc @FintanH @xla

xla commented 3 years ago

I think it would aid for library users, was hoping contribution back the streaming disco outlined here: https://github.com/radicle-dev/radicle-upstream/blob/c767063ecadae897cf4de37bc8c5f07a2a740f66/proxy/coco/src/config.rs#L117-L157