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 up'sequential' piece selection should be a better citizen #375
Labels
Comments
This comment has been minimized.
This comment has been minimized.
|
I wonder how this correlates with "Seamlessly switches between sequential and rarest-first piece selection strategy" part in the README.md? |
This comment has been minimized.
This comment has been minimized.
|
I actually re-read the actual code recently and noticed that the seamless switching code is missing, so I created this issue. I can't remember if I never implemented it, or it never got committed for some reason. In any case, this whole part of the codebase needs a refactor, which I plan to do soon. I want to share this "strategy" code with |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now we have two strategies: 'sequential' or 'rarest'. 'sequential' is the default.
To be a good citizen, we should switch to the 'rarest' piece selection strategy if there's no critical need for certain pieces, i.e. if there's enough buffer while streaming, we can switch to the normal bittorrent selection strategy until the buffer is low again.
In addition to being the right thing to do, this is actually essential for web peers to work correctly. If both web and hybrid peers are only fetching sequentially, then web peers will keep getting disconnected from torrents where there are no hybrid peers that are seeding. Hybrid peers that are still downloading won't want to peer with a web peer that only leeches from it and offers no unique pieces.