kendanniswara / LibtorrentWiBed

GNU General Public License v2.0
0 stars 0 forks source link

Add random peer to handle island connection #14

Closed kendanniswara closed 9 years ago

kendanniswara commented 9 years ago

with current implementation, there can be island that connect only to each other. Need to add random peer connection to handle this

zavalyshyn commented 9 years ago

algorithm is described in wiki. In brief: we select n closest peers and 1 the furthest one. Why: Imagine there are n grouped peers located far from all other peers. If Peer Selector will only select n closest peers, those n remote peers will establish connection with each other, but not with a seeder or any other peer that is currently downloading from seeder.

We introduce a long range link by connecting to the furthest peer thus lowering the chances of creating a cluster.

emmdim commented 9 years ago

This shows once again a think I repeated some times lately, that maybe the way we choose peers should also be related to the amount of available needed chunks of information they have. What do you think?

kendanniswara commented 9 years ago

In milestone 1, we use the worst quality peer to contact. This is done in MILESTONE 1 Commit: https://github.com/Telolets/LibtorrentWiBed/commit/37a60c5710971dc1b71c04a58464484ff2e318f1

If we continue to make it better in milestone 2, then need to be re-opened