Comments (12)
https://github.com/jech/dht is a legit implementation used by Transmission, but it's 3000 lines of C and doesn't look easy to port.
from webtorrent.
Also useful:
from webtorrent.
here is a ready to use node module https://github.com/indutny/dht.js
from webtorrent.
Another one https://github.com/deoxxa/bittorrent-dht-byo
Also interesting: https://github.com/tristanls/k-bucket and https://github.com/tristanls/discover
from webtorrent.
Can't we just use one of them? Maybe extend kademlia?
from webtorrent.
Yeah, will consider dht.js. Seems legit.
from webtorrent.
👍
from webtorrent.
I just updated bittorrent-dht to 1.0.0. It now follows the spec, contains a proper routing table, answers find_node requests from other nodes, and more efficiently crawls the DHT.
Previously, to find peers we would do a very aggressive crawl where we stuck every new node into a big queue and queried them all, not paying any attention to how close they were to the target info hash. So we had lots of pointless traffic to far away nodes that weren't helping us at all. Now, we only recurse on the K closest nodes, so we find the correct nodes with a lot less UDP traffic.
I'm really happy with the new API. Check it out: https://github.com/feross/bittorrent-dht
from webtorrent.
Nice! Is the idea for bittorrent-dht to one day work over WebRTC as well, i.e. have an exchangeable networking module, or will that be a different project?
from webtorrent.
@jure I would definitely prefer to utilize the work that's already gone into bittorrent-dht
when writing the WebRTC version. bittorrent-dht
is quite fast, reliable, and well-tested. And also used by the peerflix/torrent-stream projects. So it's going to keep getting better over time.
Perhaps the parts of the module that use dgram
can be abstracted out so the majority of the code could be re-used?
from webtorrent.
I see, bittorrent-dht is made specifically to work in Node and with the existing bittorrent network. Just a bit of background: what I'm looking for is not a protocol specific (i.e. bittorrent) DHT implementation, but a general DHT implementation (Chord/Kademlia) in the browser, backed by WebRTC (not UDP). There are a few attempts out there but for some reason all of them are somewhere in the alpha-stage zone.
I know this is very off topic, but if you were to start writing a WebRTC DHT framework, where would you begin?
from webtorrent.
I know this is very off topic, but if you were to start writing a WebRTC DHT framework, where would you begin?
Write it transport agnostic, in Node.js, but only with APIs available
on the browser (in Node.js would be acceptable to use modules that
implement this APIs).
As a personal side-note, I'm thinking about to fork Chord.js and
remove the dependency of PeerJS, this would be a good starting point.
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un
monton de sitios diferentes, simplemente escribe un sistema operativo
Unix."
– Linus Tordvals, creador del sistema operativo Linux
from webtorrent.
Related Issues (20)
- High availability of servers HOT 1
- uncaught type error: file appendTo is not a function. HOT 2
- Want to ADD CODE_OF_CONDUCT.md file HOT 3
- import doesn't work from typescript project HOT 1
- Web Socket Connection Fails: Video is loading indefinitely without streaming HOT 2
- Error: write ENOTSUP HOT 1
- Create Navbar for small devices HOT 2
- `add` and `remove` are not async safe HOT 6
- no reasonable clean way to get a timeout on add HOT 1
- Use prettier for easier collaboration HOT 3
- Webtorrent does'nt work for torrents other than the example one. HOT 1
- Prioritize subtitle dowload. HOT 1
- The Docs Need to be UPDATE. HOT 1
- Most urls are broken! HOT 1
- All Torrents stop at exactly 2.8 GB HOT 1
- Webtorrent downloads deselected pieces after re-adding a torrent HOT 5
- Uncaught Error: Can only pipe to one destination HOT 2
- Extend to allow standard websockets HOT 2
- WebTorrent.remove method removes correct torrent and, incorrectly, the last torrent HOT 1
- 🐛 Issue with Next.js: Can't resolve 'dgram' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtorrent.