peer-base
peer-base copied to clipboard
Switch from websocket-star to the rendezvous protocol
Currently, the peer discovery is done by filtering the transport discovery by connecting to each one of the discovered nodes and inquiring whether they're interested in this specific app, and then forming a hash ring with these participants to form a scalable gossip topology so that collaboration membership can be shared.
It would be nice to have a solution that does not require to connect to the peer to inquire about app-specific interest.
I think that switching from the ws-star to the rendez-vous protocol would allow that.
@mkg20001 could you take a look at this?
Related to https://github.com/ipfs-shipyard/peer-pad/issues/178
@pgte Yes. In order to make this integration less of a hack https://github.com/ipfs/js-ipfs/pull/1396 needs to be completed first. Would need some feedback on how to integrate that without using hacks such as creating the swarm first and then manually adding the rendezvous discovery to the swarm (Because rendezvous depends on the libp2p swarm, which seems to be a chicken-egg-problem many of my modules have).
@mkg20001 added you to the team. Could you accept assign yourself here?
@pgte Done
@mkg20001 thank you!
This would be awesome to have for the dweb summit workshop. At the moment, it takes over 10secs for discover other peers, even on the same LAN, which is unfortunate. @pgte are you experiencing that as well?
@satazor If you mean the 10s lag of rendezvous: That is mainly due to the discovery interval being set to 10s. It could be lowered or manually triggered right after the IPFS node starts to speed things up.
@mkg20001 I mean, it takes 10secs using the regular discovery. Using the rendezvous with a reduced interval would improve the discovery times.
Discovery is randomly throttled to not stress the network, but you can speed things up by setting options.transport.maxThrottleDelayMS to a lower number than then default of 5000.