dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.27k stars 289 forks source link

Implement Dragonfly using a DHT #1955

Closed ish-xyz closed 1 year ago

ish-xyz commented 1 year ago

Feature request:

I propose to shift Dragonfly from being a tracker based p2p network to a trackerless p2p network. We could use a DHT to implement a trackerless p2p, where in effect every peer will become a tracker.

In the last few months I have been reading multiple white papers on the topic and worked on multiple POCs. Dragonfly could use something similar to Kademlia or a variation of it to improve efficiency and reliability of the p2p.

Please have a look at the official white paper: https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf You might find this also useful: http://www.bittorrent.org/beps/bep_0005.html

These are other resources you can use to dig further into the topic:

https://www.youtube.com/watch?v=w9UObz8o8lY https://www.youtube.com/watch?v=_kCHOpINA5g&t=86s https://medium.com/princeton-systems-course/implementing-kademlia-in-go-65ec9e3c1735#:~:text=Kademlia%20defines%20a%20notion%20of,keys%20as%20160%2Dbit%20IDs. https://github.com/nictuku/dht

I believe Dragonfly would benefit enormously from implementing a DHT in particular in terms of scaling and efficiency.

I am keen to work or collaborate on this feature, unless someone else is already working on it?

Let me know please :)

Thanks.

gaius-qi commented 1 year ago

BT's DHT and PEX features have been considered when dragonfly project initialization. Seeking addresses is slower. Tracker mode can be quickly find parent addresses, it meets the scenario of image acceleration and fast download.