Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement µTP extension (BEP29) #68

Open
transitive-bullshit opened this issue May 29, 2014 · 7 comments
Open

Implement µTP extension (BEP29) #68

transitive-bullshit opened this issue May 29, 2014 · 7 comments

Comments

@transitive-bullshit
Copy link
Member

@transitive-bullshit transitive-bullshit commented May 29, 2014

Micro Transport Protocol or µTP is a UDP-based variant of the standard bittorrent protocol intended to mitigate poor latency and other congestion control issues found in conventional bittorrent over TCP, while providing reliable, ordered delivery.

Resources:

  • Official BEP29
  • Micro Transport Protocol on Wikipedia
  • µTorrent page on uTP
  • libutp standard, open source C++ implementation used by many bittorrent clients including µTorrent
  • Solid paper describing differences between standard bittorrent protocol and µTP
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 4, 2014

I bet supporting uTP would help mitigate some of the router overload issues we've seen.

@gauravsaini

This comment has been minimized.

Copy link

@gauravsaini gauravsaini commented Jun 11, 2014

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 11, 2014

Yes, but it sounds like there are some performance issues with that module. See: mafintosh/torrent-stream#54 Still, it might be worth implementing to have more peers to pick from on torrents without many seeders.

@transitive-bullshit transitive-bullshit changed the title Implement µTP extension (BEP29) Implement µTP extension (BEP29) [$30] Jul 25, 2014
@feross feross changed the title Implement µTP extension (BEP29) [$30] Implement µTP extension (BEP29) Aug 10, 2014
@feross feross removed the bounty label Aug 12, 2014
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Nov 4, 2014

There's a PR out for uTP support on peerflix here: mafintosh/peer-wire-swarm#11

Looks pretty straightforward to pull this into WebTorrent (or bittorrent-swarm, more specifically). This would make an excellent first bug for someone looking to get involved in WebTorrent. :)

@feross feross added the help wanted label Nov 29, 2014
@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Dec 2, 2014

@feross I plan on porting in uTP and MSE once they are both merged into torrent-stream. I'm working on MSE at the moment and I have a PR in for uTP already :)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Dec 7, 2014

@Xeoncore That is excellent. Looking forward to your PR!

@mvayngrib

This comment has been minimized.

Copy link
Member

@mvayngrib mvayngrib commented Jun 17, 2015

i was experimenting with a combination of utp and bittorrent dht's implied_port option to see if I could get peers behind a NAT to work well. It wasn't quite enough. To take advantage of implied_port, you need the dht and the peer wire on the same port, which requires socket multiplexing, something vanilla dgram sockets don't support. They allow you to bind the same port, but only one socket will receive messages.

To reuse the dht's port for the peer wire, I hacked together sock-plex, and it seemed to work well - bittorrent-dht & bittorrent-swarm (with utp) were sharing a port, and the wire was able to take advantage of the hole punching done by the dht. I was using it in a p2p otr chat module zlorp and a torrent-based replication module bitkeeper-js with pretty good results.

Right now sock-plex is not very subtle (it rewires dgram), but if this is an interesting direction, I can teach it some manners. Is this something interesting for webtorrent?

@feross feross added accepted and removed accepted labels May 3, 2018
@webtorrent webtorrent deleted a comment from heri16 May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.