Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Upgrade to using /ws and /p2p-circuit #36

Open
ghost opened this issue Nov 27, 2017 · 4 comments
Open

Upgrade to using /ws and /p2p-circuit #36

ghost opened this issue Nov 27, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 27, 2017

Currently the rendezvous server is a bandwidth bottleneck by design -- all peer connections go through it, and we unfortunately can't add more instances without making the server capable of federating with other servers, at which point we'd be rebuilding parts of libp2p, outside of libp2p.

We can get the same functionality without the server-relay component, where p2p-websocket-star would do only discovery (and for backwards compatibility, the transport would transparently use a relay.)

Imagine a very simple scenario with three browser nodes QmA, QmB, QmC, and one relay node QmRelay. To each new browser node, the rendezvous server emits addresses of already present nodes:

  • /dns4/relay.libp2p.io/tcp/443/wss/ipfs/QmRelay/p2p-circuit/ipfs/QmA
  • /dns4/relay.libp2p.io/tcp/443/wss/ipfs/QmRelay/p2p-circuit/ipfs/QmB
  • /dns4/relay.libp2p.io/tcp/443/wss/ipfs/QmRelay/p2p-circuit/ipfs/QmC

We should already be capable of exactly this ^ right? @dryajov

For backwards compatibility, the /p2p-websocket-star transport would transparently make use of the /wss and /p2p-circuit transports. It'd basically transform a currently used address like /dns4/ws-star.discovery.libp2p.io/tcp/443/wss/ipfs/QmA to another as shown above.

@daviddias
Copy link
Member

@Steverman you did a great job with libp2p/js-libp2p-webrtc-star#130, wanna tackle this one here too?

@Steverman
Copy link

Steverman commented Nov 29, 2017

I can't promise on this one. Very busy this month (this includes December).

I was not satisfied with my other PR, so I may have to revisit it at some point.

@dryajov
Copy link
Member

dryajov commented Jan 15, 2018

@lgierth I missed this issue somehow.

To your question, yes, we should be able to emit /p2p-circuit addrs, at which point, it's possible to dial those nodes over the relay.

@mkg20001
Copy link
Member

PR #43

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

No branches or pull requests

4 participants