Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 1: Kickoff #1

Closed
gavinmcdermott opened this issue Aug 21, 2016 · 2 comments
Closed

Update 1: Kickoff #1

gavinmcdermott opened this issue Aug 21, 2016 · 2 comments

Comments

@gavinmcdermott
Copy link
Owner

Requesting input from @diasdavid

This weekend I've been working (and next week plan to work) on the test harness. Libp2p has a lot of surface area and supporting libs to understand; today I started moving through it piece by piece. Two things would be really helpful here:

  1. Feedback on the initial plan
  2. Input to some specific questions regarding my immediate next steps

Plan

  1. Get the basics working on a local machine
    • Ability to spin up a few thousand nodes quickly
    • Plus basic tests
  2. Add opts for faking more 'real world' network scenarios
    • E.g.: nodes joining, leaving, etc. (other ideas??)
  3. Command line access
  4. Docker-ization
  5. Kubernetes orchestration

Specific Questions (In order of importance)

Note: Please add as many comments to this repo's code in response as you'd like. All feedback is welcome

  • Peer Discover Strategies: I'd like peer discovery strategies to be configurable (e.g.: mdns, random-walk, etc.). In the naive example, every node connects to every node. I could be way off here, so some pointing in the right direction will help. To make it concrete, let's take the mdns sample for example:
    • What is snr relationship to a libp2p node instance?
    • How does this interface with the peerBook?
    • Where might that be attached or exposed to work with?
  • Peer Routing: Similarly, I notice in the kad-router example, that the router works with a peer instance. But I'm curious as to how the kad-router (or any peer router) interacts with libp2p nodes.
  • Test Node and Network Interfaces: Any thoughts on the initial, potential interface we might want to have with respect to:
    • Individual nodes in the testnet (e.g.: node.goIntermittent())
    • The testnet network itself (e.g.: testnet.triggerOutage({ pct: 30 }))

I really like the notion of triggering outages, latency, node drops and joins. But those can also come in once the basics are working. Just want to get initial thoughts out there.

And finally, based on what i'm desiring to do, if you think there's a better question to ask, or something missing, please let me know. Thanks for any feedback!

@daviddias
Copy link

Nice work getting this kicked off @gavinmcdermott 👏🏽👏🏽👏🏽👏🏽👏🏽

Let's chat about this on the libp2p hangout today :). Answers to your questions below:

Peer Discover Strategies
What is snr relationship to a libp2p node instance?

Probs are sent in an interval (configurable). Not much, udp packets are cheap, and the replied (peer information) are only sent after a broadcast is sent.

How does this interface with the peerBook?

It doesn't directly. peer-discovery mechanisms have a simple interface -- `.on('peer', doSomething) --, the interface is not formalized yet, but it is like https://github.com/libp2p/js-libp2p-mdns-discovery uses.

Where might that be attached or exposed to work with?

Inside the libp2p build (libp2p enables the dev to create several flavors of it, depending on their requirements), check libp2p-ipfs-browser, the browser build of js-ipfs, there we use the discovery mechanism offered by the WebRTC Transport (webrtc-star) to find other peers -> https://github.com/ipfs/js-libp2p-ipfs-browser/blob/master/src/index.js#L57-L59

In this example, we pass the responsibility to js-ipfs to decide what to do with the peer. (what js-ipfs does is ensuring it can dial and if so, add it to the PeerBook)

Peer Routing: Similarly, I notice in the kad-router example, that the router works with a peer instance. But I'm curious as to how the kad-router (or any peer router) interacts with libp2p nodes.

Peer Routing is a mechanism to 'find peers', the interface is designed to offer a dumb "find peers with this/for this id and returns PeerInfos that can be used to dial (it is expected that if a PeerInfo is returned, we can really dial to that peer)

Test Node and Network Interfaces:

👍👍👍👍👍 to this, it will make creating the tests easier. However, having tests where we actually 'blow up' or throttle the pipes of process will be even better (last mile is getting real hardware to run tests :D)

@jbenet
Copy link

jbenet commented Aug 23, 2016

I think the plan LGTM. May want to think through how the dockerization would work though up front-- may inform (1) and (2).

@gavinmcdermott gavinmcdermott changed the title Multiple discovery strategies Update: Kickoff Aug 31, 2016
@gavinmcdermott gavinmcdermott changed the title Update: Kickoff Update 1: Kickoff Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants