Update:Remora Download Counting

From MozillaWiki
Jump to: navigation, search

http://lxr.mozilla.org/webtools/source/addons/shared/bin/maintenance.php

Old script - weekly downloads were kept as records in downloads using downloads.downloadcount.

  • unless there is a good reason to deviate from this, we should keep that method.

New schema has addons.weeklydownloads in addition to addons.totaldownloads - do we now want to stop using the downloads table to keep counts, and keep them both in the addons table?

  • the old schema had two columns - main.totaldownloads and main.downloadcount
  • totaldownloads had total downloads, and downloadcount had the weekly count

Weeklydownloads are only for the last 7 days since the maintenance script was run?

  • the maintenance script only deletes the last 8 days, erring on the side of caution
  • downloadcount -> weeklydownloads
  • totaldownloads -> totaldownloads
  • Both of these mappings are in the migration notes
  • As for using Cake for this, I don't think it really matters what we use. The existing maintenance script could actually be used as-is with modifications to the SQL. Because it is not in Cake it would make it harder to test, though, so if moving it to Cake seems like the right thing, that I'm all for it. It's arguable that creating tests for the existing script is an arbitrary effort. You'd want to test that:
    • Counts don't get counted twice
    • 7+ day-old counts aren't lingering
    • 7-day counts in addons.weeklydownloads match what's in the DB?
Separating download counts by application
Suggest the download counts be kept separately for each application. The "most popular" pages are meaningless if the counts are not per-application: since some add-ons install in multiple applications, the most popular list for a non-Firefox application such as Thunderbird is dominated by the Firefox users download count, regardless of whether Thunderbird users find those add-ons useful in Thunderbird. Before Remora, each add-on's page identified the user's application-to-be-extended in the URL (.../thunderbird/220, .../firefox/220, etc.). Suggest this could be used to let the download counter identify the user's application (via the referring page), so separate counts can be kept for each application. See bug 369194 for more detail. (Gekacheka 08:03, 10 February 2007 (PST))