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

Sort by "popularity" column #2415

Closed
yalov opened this issue Apr 20, 2018 · 2 comments
Closed

Sort by "popularity" column #2415

yalov opened this issue Apr 20, 2018 · 2 comments

Comments

@yalov
Copy link
Contributor

yalov commented Apr 20, 2018

While #481 was about making mods author see their stats, this issue is about

Being able to sort by popularity and type would be a nice median way for new users to locate mods they aren't familiar with.

@yalov
Copy link
Contributor Author

yalov commented Apr 20, 2018

Is there mods what use not github or spacedock?

"popularity" can be set as sum for github and spacedock of max of 2 last versions downloads count

version   github     spacedock
0.5       1000       100
0.6       200        20

popularity = Max(1000,200) + Max(100,20) = 1100

@HebaruSan
Copy link
Member

Yes, about 27% of indexed mods use a host other than GitHub or SpaceDock:

host pie chart

For the ones that are on both GitHub and SpaceDock, CKAN only knows about one or the other, so a formula for combining the two counts is not needed.

Brainstorming about the infrastructure side, it would not be feasible to have the client gather this info itself via server APIs, since that would require 1000+ internet connections every time and be horrendously slow, so we would need some kind of bot to gather the stats centrally. We could have netkan.exe add a download_count property to the .ckan files, but then those files would be changing very frequently just to increment the counts.

Better would be to have a separate script that loops over the .netkan files and just generates stats in a single new file. The client downloads a compressed archive of the CKAN-meta repo when it updates the registry, so if we put that file in the CKAN-meta repo, it would be available to clients with no extra internet connections. We could then parse that file into a new Dictionary<string, int> popularity object and use it to populate a column in GUI.

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

No branches or pull requests

2 participants