Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Add a DHT Concept to docs.ipfs.io #240

Merged
merged 16 commits into from
Oct 29, 2019

Conversation

bertrandfalguiere
Copy link
Contributor

@bertrandfalguiere bertrandfalguiere commented Aug 5, 2019

I did a draft explaining the DHT.
If you are OK with me carrying on, I will add:

To complete that, I need to know:

  • Does bucket size depend on the number of records in a bucket or the number of peers? Is it at bucket level or DHT level?
  • When a request is forwarded, is it answered directly to requesting peer? Or does the answer takes the same path as the request (forwarded)? Each peer return the next peer. Requesting peer does another request
  • Should we say multiaddresses or multiaddrs? multiaddrs
  • What are what m (prefix size in the buckets) and k (max number of peer in each peer lists) for IPFS? Does it depend on implementation? Is it up to implementation or will it be spec'd out?
  • Should I do a specific page for Content Routing, add this to the DHT file, or contribute to https://docs.libp2p.io/concepts/content-routing/ and point to it? Should point to libp2p

Notes about myself:

  • I'm not a Go or JS dev, but I can read code, so I'll try to find the answers myself.
  • This is my first PR ever for an opensource project. Please be gentle :).
  • English is not my mother tongue. I hope not to have left grammar mistakes.

fixes ipfs/docs #111

@bertrandfalguiere bertrandfalguiere changed the title Add a DHT concept Add a DHT Concept to docs.ipfs.io Aug 5, 2019
@jessicaschilling
Copy link
Contributor

@bertrandfalguiere Thank you very much for taking the initiative on this effort! We would love it if you proceeded. Don't worry about English grammar etc -- other folks can go through your finished concept doc for those things.

As for getting your questions answered -- I will point you to @dirkmc, @vasco-santos and @jacobheun for their ability to help! Thanks again.

@jacobheun
Copy link

@bertrandfalguiere there is a WIP PR for the Kademlia based DHT spec at https://github.com/libp2p/specs/pull/108/files. That should have some of the more specific information you're looking for. It's a bit out of date, but still fairly accurate. Each of the implementations vary from the values a bit, and support configuration, so the number of buckets/etc can be set per node.

When a request is forwarded, is it answered directly to requesting peer? Or does the answer takes the same path as the request (forwarded)?

The current DHT implementations don't do any forwarding. Subsequent requests are made directly by the requesting peer after receiving "closer peers" from the previous queries.

Should we say multiaddresses or multiaddrs?

multiaddrs

Should I do a specific page for Content Routing, add this to the DHT file, or contribute to https://docs.libp2p.io/concepts/content-routing/ and point to it?

Contributing to the libp2p docs and pointing to it would be ideal, imo.

Thank you again for working on this! ❤️ It's very much appreciated!

DHT doesn't forward requests: it return a peer ID of a closer peer.
DHT doesn't store mapping of peerID to multiaddrs. It doesn't do peer routing.
but it stores IPNS records.
@dirkmc
Copy link

dirkmc commented Aug 6, 2019

Hi @bertrandfalguiere, thank you for taking the time to contribute to the docs.

You can find some more information about the Javascript implementation of the DHT here:
https://github.com/libp2p/js-libp2p-kad-dht/blob/master/docs/IMPL_SUMMARY.MD

@jessicaschilling
Copy link
Contributor

Hi, @bertrandfalguiere! Just wanted to check in on this, and whether anyone needs to help un-block you. Thanks!

@bertrandfalguiere
Copy link
Contributor Author

I'm doing that in my leisure time, which I lack at the moment. I might be able to dedicate some Thursday or this weekend. What would be a mergeable MVP that you guys can iterate over?

@jessicaschilling
Copy link
Contributor

@bertrandfalguiere -- Maybe focus on augmenting your usage section, so there's directly actionable info on how to use the DHT implementation used by IPFS. Other than that, this is looking very useful. Thank you!

@jessicaschilling jessicaschilling added topic/design-content Content design, writing, information architecture dif/medium Prior experience is likely helpful labels Oct 25, 2019
Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bertrandfalguiere -- I've gone through and made some copy edits for English and clarity. Understanding that this isn't complete, but I'm hoping you can incorporate these suggested changes, so that we can push the document as it exists as it is right now to the docs. The reason is that we're migrating existing docs content to a new platform next week, and we'd like to make sure this gets into the migration! It's a good start for newcomers as it is, even if it's not quite finished yet. Thank you!

@jessicaschilling
Copy link
Contributor

Hi @bertrandfalguiere -- quick update. I've gone ahead and merged this as-is and will make the suggested copy edits in an additional round of revisions to the merged version (#364), just for expediency. Thank you so much for your contribution on this! 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dif/medium Prior experience is likely helpful topic/design-content Content design, writing, information architecture topic/docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants