Earthstar has no way of discovering other peers automatically. You have to initiating syncing yourself, e.g. by connecting directly to a known server.
The consequence being that if you are physically present with someone you wish to sync with, you'd likely need a server to be running to do so.
What solution are you recommending?
The two major additions of this PR are:
Peer.discover, a new method which returns an async iterable of discovery events, some of which have callbacks on them to initiate syncing with a discovered peer.
DiscoveryLAN, a discovery service to be used with Peer.discover which discovers peers on the local network and advertises itself in turn. Works on Deno and Node! Powered by https://github.com/earthstar-project/dns_sd.
Peers found with DiscoveryLAN sync using a new PartnerTCP driver. This driver is a little special in that it encrypts all its messages (as we cannot rely on HTTPS to do this for us).
TCP connectivity for both Deno and Node relies on a new TcpProvider class, where implementations have been provided for both runtimes.
What's the problem you solved?
Earthstar has no way of discovering other peers automatically. You have to initiating syncing yourself, e.g. by connecting directly to a known server.
The consequence being that if you are physically present with someone you wish to sync with, you'd likely need a server to be running to do so.
What solution are you recommending?
The two major additions of this PR are:
Peer.discover
, a new method which returns an async iterable of discovery events, some of which have callbacks on them to initiate syncing with a discovered peer.DiscoveryLAN
, a discovery service to be used withPeer.discover
which discovers peers on the local network and advertises itself in turn. Works on Deno and Node! Powered by https://github.com/earthstar-project/dns_sd.Peers found with DiscoveryLAN sync using a new
PartnerTCP
driver. This driver is a little special in that it encrypts all its messages (as we cannot rely on HTTPS to do this for us).TCP connectivity for both Deno and Node relies on a new
TcpProvider
class, where implementations have been provided for both runtimes.