bower / registry

The Bower registry
https://registry.bower.io/packages
MIT License
292 stars 66 forks source link

Download stats #39

Closed simonexmachina closed 8 years ago

simonexmachina commented 10 years ago

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.

dotnetCarpenter commented 10 years ago

+1

reiz commented 10 years ago

+1

dotnetCarpenter commented 10 years ago

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?

sgarbesi commented 10 years ago

+1

mokkabonna commented 10 years ago

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?

charandas commented 10 years ago

+1

sheerun commented 10 years ago

How does npm handles scalability and download stats? Download stats don't scale. You can't CDN.

thom4parisot commented 10 years ago

They have a CDN actually, and they aggregate the CDN hits as part of the stats.

rayshan commented 10 years ago

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"
  }

screen shot 2014-04-20 at 11 12 15 am

rayshan commented 10 years 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

bpulito commented 8 years ago

+1

sheerun commented 8 years ago

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)