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

Randomized rarest-first selector behaves like a sequential selector when peers are seeds #53

Closed
atomashpolskiy opened this issue Feb 3, 2018 · 0 comments
Labels
Milestone

Comments

@atomashpolskiy
Copy link
Owner

On behalf of @ckovorodkin

Randomized flavor of bt.torrent.selector.RarestFirstSelector acts much like a sequential rarest-first selector, when most of the peers are seeds, and many or all pieces are equally available. The rarest-first selector would then choose pieces in a sequential fashion:

N = 10
while pieces is not an empty list
    select and remove random piece with index K between 0 and N
    shift all elements with index greater than K to left

E.g. in the simplest case there is one seed, and each piece has availability of 1. It's easy to see that the order of selection will always be skewed to lower indices (because the set of possible next pieces is handicapped by N first elements).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant