Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTView: history backup, MVP #4192

Merged
merged 1 commit into from
Jul 20, 2022
Merged

RTView: history backup, MVP #4192

merged 1 commit into from
Jul 20, 2022

Conversation

denisshevchenko
Copy link
Contributor

Closes #4176

Now RTView is able to backup historical data received from connected nodes. Previously, all historical data (which is rendering on real-time charts) was stored in the memory only, so after cardano-tracer process is killed, all historical data is lost. Now RTView periodically (currently - once per 5 minutes) saves historical data in CSV-files, in a standard local directory. As a result, after restart, RTView is able to restore all historical data from the backup. It means that now the user can restart cardano-tracer (for example, to upgrade it) with no fear to lost historical data.

Please note that this PR introduces backup feature as MVP. Later, it will be improved by adding:

  1. Ability to configure backup period.
  2. Ability to configure maximum size of backup files.
  3. Ability to zip backup files, to keep disk space.

@denisshevchenko denisshevchenko added RTView The service for monitoring over Cardano nodes tracing labels Jul 18, 2022
@denisshevchenko denisshevchenko self-assigned this Jul 18, 2022
@denisshevchenko denisshevchenko force-pushed the issue-4176-rtview-backup branch from 93ec694 to d366557 Compare July 19, 2022 16:47
@denisshevchenko denisshevchenko marked this pull request as ready for review July 20, 2022 06:47
Left _ -> return noPoints
Right rawPoints ->
case CSV.decode CSV.NoHeader rawPoints of
Left _ -> return noPoints -- Maybe file was broken...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the user be notified somehow?

Copy link
Contributor

@deepfire deepfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @denisshevchenko !

Left one question as comment, and here is another one:

After restoration -- how is the "undefined" gap displayed on charts, between the last historical data and the "now"?
Is it obvious to the user?

@denisshevchenko
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 20, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 76efd8d into master Jul 20, 2022
@iohk-bors iohk-bors bot deleted the issue-4176-rtview-backup branch July 20, 2022 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RTView The service for monitoring over Cardano nodes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTView: backup for historical data
2 participants