Uploaded image for project: 'Zapped: AcousticBrainz'
  1. Zapped: AcousticBrainz
  2. AB-385

Improve storage and retrieval of statistics

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      After working on https://github.com/metabrainz/acousticbrainz-server/pull/311 I had some thoughts about statistics.
      By keeping stats every hour we're using a lot of space for what I see as not much value.
      We spend a lot of time calculating stats, storing them, transferring them (which takes a lot of bandwidth), and then we throw them away and only show daily values on the stats graph anyway.
      I think we could work on a few cleanups to store this data better:

      • Use json fields to store all numbers for a stats time period together. This will make it easier to write (no possibility of missing a value) and easier to read (just read and return)
      • Consider only storing daily data. If the graph by default shows only daily data then we don't need hourly data
      • If we do store only daily data and we want to keep hourly updates on the front page we could store hourly data for the last day in redis.

            alastairp Alastair Porter
            alastairp Alastair Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package