Skip to content

Archive data store file per month basis #1

Open
@djey47

Description

For now, data store file includes all data from the beginning. To prevent it to become too huge and thus computing intensive, the current file should contain only the data related to the current month. The past month should be stored in a file with name containing a 'MM-YYYY' marker

TODO:

  • think about a proper storage layout for the files (all in a subdirectory?) not to confuse MM2 user with too many files in config folder
  • update the meta to store the current month (MM-YYYY marker)
  • detect a month change during processing (comparison with the current month from store meta) and if that's the case trigger the persistance mechanism then update the current month in meta (using new month)
  • when persisting, filter the in-memory data to store only data related to the past month (+ initial/total data

QUESTIONS/REMARKS:

  • check it does not interfere with data export (in case one'd want to export all data from the beginning), as only data from current month would be available; in this case, data export mechanism should also retrieve in archives ... => data export should be able to export according to a timeframe or everything at once? There's a whole topic for itself.
  • is it necessary to keep all data in data store from memory? Module does not care about history for now. But might be useful to draw graphs. But it will be necessary to define a retention period (6months, 1year?) and possibly make it configurable.
  • is it relevant to also store the initial and total data (as per the end of the month) ?

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions