Closed simonexmachina closed 8 years ago
+1
+1
I do see a hits
column in the db that gets incremented every time there is a GET
request to a named package. https://github.com/bower/registry/blob/master/application.rb#L33
Due to the distributed nature of the registry (downloads are made by the client - the registry only facilitates lookups), I don't see how number of downloads could be supported. NPM stores a tarball of each package in its registry - bower registry does not.
The following is in the db (according to https://github.com/bower/registry/blob/master/application.rb):
String
name
String
url
DateTime
created_at
Integer
hits
Ideas?
+1
Even if it's not a direct correlation between the hits and downloads, I would prefer any indication over none. +1 Maybe turn hits into relative popularity?
+1
How does npm handles scalability and download stats? Download stats don't scale. You can't CDN.
They have a CDN actually, and they aggregate the CDN hits as part of the stats.
This is coming, will have public stats as well as a REST API. Hang in there guys. https://github.com/bower/bower/issues/1164#issuecomment-38207751
WIP data structure:
{
"bName": "jquery",
"bRank": {
"current": 1,
"prior": 1
},
"bUsers": {
"current": 8934,
"prior": 8853
},
"bInstalls": {
"current": 18399,
"prior": 18649
},
"ghOwner": "jquery",
"ghOwnerAvatar": "https://avatars.githubusercontent.com/u/70142?",
"ghUrl": "https://github.com/jquery/jquery",
"ghDesc": "jQuery JavaScript Library",
"ghStars": 30392,
"ghIssues": 11,
"ghUpdated": "2014-04-18T21:19:12Z",
"ghUpdatedHuman": "2 days ago"
}
It appears that I'm late to the party of the registry v2 rewrite (I'm discovering all kind of things in the bower github org): https://docs.google.com/a/google.com/document/d/17Nzv7onwsFYQU2ompvzNI9cCBczVHntWMiAn4zDip1w/edit#heading=h.420zy9tff5g7
For now I'll implement the code separately, later we can merge them. Would be easy since I'm also implementing in node.
cc @paulirish @sindresorhus
+1
Unfortunately the only reliable way to count downloads is to ask github for it.
Registry results are cached locally so any counters we had would not be reliable (we don't have any)
It would be useful for the community to be able to see the number of downloads for each module in the same way as you can on https://npmjs.org/. This is a simple metric that helps people to see how widely-used a module is, and helps people to choose which modules to try if there's a number of options.