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

Refactored PopularityCommunity #4434

Merged
merged 3 commits into from
Apr 3, 2019
Merged

Conversation

devos50
Copy link
Contributor

@devos50 devos50 commented Mar 26, 2019

In this PR, I refactored the PopularityCommunity and simplified it. In essence, it now gossips around at most 10 torrents. Five of these torrents are randomly selected torrents that you have checked (with at least one seeder). The other five torrents are the most healthy torrents that are health checked by you.

Addresses #4256

Complements Tribler/gumby#409

@devos50 devos50 force-pushed the torrent_health_gossip branch from 799807a to e271c84 Compare March 26, 2019 12:36
@devos50 devos50 marked this pull request as ready for review March 26, 2019 12:43
@devos50 devos50 requested a review from xoriole March 26, 2019 12:43
@devos50 devos50 force-pushed the torrent_health_gossip branch 4 times, most recently from 451d634 to ebee697 Compare March 29, 2019 10:04
@devos50
Copy link
Contributor Author

devos50 commented Mar 29, 2019

I made a validation experiment to verify the correctness of the popularity community, see https://jenkins-ci.tribler.org/job/validation_experiments/job/validation_experiment_popularity/

return
num_torrents_checked = len(self.torrent_checker.torrents_checked)
random_torrents_checked = random.sample(self.torrent_checker.torrents_checked, min(num_torrents_checked, 5))
popular_torrents_checked = sorted(self.torrent_checker.torrents_checked,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibility of duplicate torrents for a small set?

@devos50 devos50 force-pushed the torrent_health_gossip branch from 24b388b to 06a079b Compare April 3, 2019 10:20
@devos50 devos50 merged commit 1a5abf9 into Tribler:devel Apr 3, 2019
@devos50 devos50 deleted the torrent_health_gossip branch April 3, 2019 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants