mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 228 forks source link

uTP support #54

Open BastienClement opened 10 years ago

BastienClement commented 10 years ago

What is the status of https://github.com/mafintosh/utp?

Is it ready as a basis to implement uTP support in torrent-stream?

mafintosh commented 10 years ago

its probably still way to slow / not battle tested enough. its very hard getting a thing like this to perform well since pure javascript is too high up in the stack for this kinda thing. i don't remember the exact stats by tcp outperformed my utp thing by a factor 100x (or similar)

Ivshti commented 10 years ago

What about a C/C++ lib then? Also, if the performance bottleneck is insignificant JS can still be used. I think the benefit from being able to connect to more peers is more important.

Also, check this out https://github.com/alexstrat/node-libutp

transitive-bullshit commented 10 years ago

Adding a reference to the analogous webtorrent issue https://github.com/feross/webtorrent/issues/68 for tracking's sake.

If torrent-stream decides to go with a native library wrapper for µTP, this would definitely be a clear distinction between torrent-stream and webtorrent. That being said, I still think it's worthwhile to keep the two issues in sync going forwards.

PedroMCostaAndrade commented 10 years ago

any news?

Ayms commented 9 years ago

FYI, please see https://github.com/mafintosh/utp/issues/3 I have integrated utp in https://github.com/Ayms/torrent-live, this is just used to test if a peer accepts utp connections and this works, not a killer feature but that's a start...

ghost commented 9 years ago

Theres already been a PR put in by me @PedroMCostaAndrade :)

https://github.com/mafintosh/peer-wire-swarm/pull/11

@mafintosh Where the speed of uTP really lies is in the actual implementation of the throttling algorithms, not so much the protocol implementation. You really need to know how to exploit UDP buffers to get uTP working nicely. I think you just have a bare implementation of uTP on top of UDP without any of the actual benefits uTP is suppose to bring (in regards to the other algorithms)