Skip to content

2. Back up To Dos (Same as README.md Section 2 Data Collection, Storage, and Backup Process) #22

@KSMaster115

Description

@KSMaster115

Note: Master DB to store data only for last two months (max query is prev month)

  • 2.1 ​Read JSON packets from all meters every half an hour and store it in In Memory Data

  • 2.2 ​Every 2 hrs, Daily In Memory Data (data structure 1.2) is flushed into the Daily Recovery JSON (data structure 1.3) as a backup.

  • 2.3 ​Every day, for every meter aggregate the day's consumption using the Daily In Memory Data (data structure 1.2)

  • 2.4 ​Every day, for every meter update the Master Database (data structure 1.4) with the current day's date and the aggregated sum from step 1.

  • 2.5 ​The Daily In Memory Data (data structure 1.2) is then flushed into the Master Database's previous_day field (data structure 1.4), resetting it for the next day's data collection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions