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

libp2p network issues #97

Closed
chhsiao1981 opened this issue Dec 22, 2018 · 14 comments
Closed

libp2p network issues #97

chhsiao1981 opened this issue Dec 22, 2018 · 14 comments
Labels
A-network Area: p2p networking and connectivity

Comments

@chhsiao1981
Copy link
Collaborator

Version information:

Version: 0.1.0-unstable
Git Commit: b8de7e6
Architecture: amd64
Go Version: go1.10.4
Operating System: darwin

Type:

Enhancement

Description:

Currently we are using libp2p as the underlying p2p mechanism.

However, libp2p is still in the development stage, and it does not guarantee the success of the connections in the various network environment (ex: VPN).

We would like to know the connectivity under different network environment through this issue.

@chhsiao1981
Copy link
Collaborator Author

(same subnet => work)
(with public-ip => work)

@chhsiao1981 chhsiao1981 added the A-network Area: p2p networking and connectivity label Dec 22, 2018
@chhsiao1981
Copy link
Collaborator Author

The new update in libp2p:

libp2p/go-libp2p#490

@chhsiao1981
Copy link
Collaborator Author

nodes on linode can connect to nodes on digital ocean (both are with public ip)

@chhsiao1981
Copy link
Collaborator Author

Another possible p2p lib: https://github.com/anacrolix/torrent
(Torrent in go)

@chhsiao1981
Copy link
Collaborator Author

Another possible p2p lib: https://github.com/pions/webrtc
(webrtc in pure go)

@chhsiao1981
Copy link
Collaborator Author

libp2p/go-libp2p#188

@chhsiao1981
Copy link
Collaborator Author

based on

libp2p/go-libp2p#375
https://gist.github.com/upperwal/38cd0c98e4a6b34c061db0ff26def9b9#file-libp2p_chat_bootstrapping-md

It's possible that we can have nat working by following the example.

@chhsiao1981
Copy link
Collaborator Author

We will firstly try the following setup for the libp2p-relay:

https://github.com/libp2p/go-libp2p-examples/blob/master/relay/main.go

@chhsiao1981
Copy link
Collaborator Author

issue with pions/webrtc pions-to-pions example:

requiring specifying true ip/port to connect to the peer.
need to check further how to do pions-to-pions across nat~

https://github.com/pion/webrtc/tree/master/examples/pion-to-pion

@chhsiao1981
Copy link
Collaborator Author

@backkem
Copy link

backkem commented Apr 8, 2019

issue with pions/webrtc pions-to-pions example:

requiring specifying true ip/port to connect to the peer.
need to check further how to do pions-to-pions across nat~

https://github.com/pion/webrtc/tree/master/examples/pion-to-pion

Quick note: WebRTC doesn't require a specific port. It requires you to exchange some data ( An offer and the corresponding answer) in order to set up a connection. It is not specified how to exchange this information. You can copy/paste it, send it over a central server, ... . In the case of the pion to pion example we send this information it over a direct http connection but this is not required. It just makes the example easy to run.

@chhsiao1981
Copy link
Collaborator Author

@backkem

Thank you so much for the explanation~
pion/webrtc is really awesome!

I am noob to webrtc,
but I would like to try to integrate pion/webrtc into this repo as an alternative option to libp2p~

@chhsiao1981
Copy link
Collaborator Author

After testing #257:

Given 1 relay-server,
It looks like it is with high probability that it takes some amount of time (possibly more than 3-mins) to init connection~
(node-1: nat behind mobile-Chung-Hua-Telecom, node-2: Digital-Ocean, relay-server: aws-singapore)

Would like to:

  1. dig further about libp2p discovery mechanism.
  2. follow Integrate pion/webrtc as another alternative p2p. #258

@poga
Copy link
Contributor

poga commented Apr 23, 2019

We had done switching to WebRTC in #271.

@poga poga closed this as completed Apr 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-network Area: p2p networking and connectivity
Projects
None yet
Development

No branches or pull requests

3 participants