Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWebTorrent DHT integration #1152
Comments
This comment has been minimized.
This comment has been minimized.
|
This is super cool! Is there anything in the way of getting this merged in? What are the next steps to getting this working everywhere? |
This comment has been minimized.
This comment has been minimized.
|
There are a few architectural decisions that need to be made by maintainers before this can be plugged in. You should be familiar with internals of related pieces in order to do something here. Unfortunately my interest doesn't go much further that DHT itself (which is why I've made it) and I'm not familiar with WebTorrent architecture, so some help is definitely needed here. |
This comment has been minimized.
This comment has been minimized.
|
Is the DHT you've made functional on its own? Could one start using it to build a network? |
This comment has been minimized.
This comment has been minimized.
|
Exactly, just like BitTorrent DHT is functional on its own too. I've actually built it for another project and used WebTorrent's BitTorrent DHT implementation as the base for my implementation, which is why it shares most of the features with BitTorrent DHT. I should note however, that there are some things to be done there, like dropping unnecessary WebRTC connection before browser tab crashes (both Firefox and Chrome simply crash with large number of connections), but it is ready for experiments with a few tens of nodes and can be improved later without breaking its API. Follow the repo for future updates. |
This comment has been minimized.
This comment has been minimized.
|
It's very good to see someone working on this. I believe that WebRTC based DHT is going to be a requirement for this p2p music sharing platform we've been working on ( https://github.com/lolashare/lolashare ) Looking forward to seeing if we can get more support for this feature. We may start testing out https://github.com/nazar-pc/webtorrent-dht soon. Related: fermentation/ferment#45 |
This comment has been minimized.
This comment has been minimized.
|
There's already support for the Kademlia DHT in node.js or electron main process based clients. |
This comment has been minimized.
This comment has been minimized.
|
It may be possible to get the DHT implementation from the IPFS-JS when it is done for web browsers. I am not sure how easy the integration of those bits can be. DHT: ipfs/js-ipfs#856 |
This comment has been minimized.
This comment has been minimized.
|
How similar is it to Mainline DHT? If it is significantly different, it might make integration much more difficult, and even with almost identical implementation there is not much interest. BTW, WebTorrent-DHT works pretty good now, though some improvements are still expected in node-webrtc (all reported upstream and the progress over last few months is amazing). There is a Detox project (transport package in particular) I'm working on that uses it under the hood, which might explain some more advanced uses of it (Detox uses different hash function, has cryptographic signatures on signaling data, multiplexes different data over the same data channel, etc). I'm no longer interested in making integration into WebTorrent client myself, but I'd be happy to help if some feel adventurous enough. |
This comment has been minimized.
This comment has been minimized.
|
Does WebTorrent-DHT work inside the browser? |
This comment has been minimized.
This comment has been minimized.
|
Yes, it does. In fact, this is the reason it was created. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@nazar-pc I think WebTorrent-DHT is a separate project(in fact, I think your project) and is not part of the WebTorrent. I was referring to the WebTorrent project itself. I may have chosen the wrong issue to comment. |
This comment has been minimized.
This comment has been minimized.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
From discussion in #288 there is a potential implementation which I'd like to integrate with WebTorrent itself.
The question now is how to do this?
We can more or less just replace
bittorrent-dht/clientwith browser-compatible implementation, but desktop clients should likely participate in 2 DHTs at the same time.My first idea was to create some kind of DHT proxy that will send requests and combine responses from several underlying DHTs, but I'm not sure this is a really good approach, since there are some features that do not translate directly this way (like
dht.address()call).Maintainers, what are your thoughts and vision about this?