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

Feature: Persist last known value, source, timestamp, and metadata for each path upon restarting #1864

Open
tonybentley opened this issue Jan 11, 2025 · 2 comments

Comments

@tonybentley
Copy link
Contributor

Scenario:

As a user I want to know my last known value for each path in Signalk server upon restarting the signalk-server application.

Given there are paths that are only updated on a 1 times per day basis

When I restart signalk-server the paths are not persisted

Acceptance criteria:

When I restart signalk-server I should see the last known value for each path in the data explorer
And I should see the timestamp, metadata, and source from the last known update

@tkurki
Copy link
Member

tkurki commented Jan 11, 2025

I think this makes sense and have wished for it a few times myself.

Probably requires #1812 so that all data is removed eventually, otherwise some may linger forever. And a way to explicitly flush the latest values, from UI and from a start command option.

Dumping all latest deltas every once in a while to a json file is the simplest way to do this, but I wonder if an sqlite database with columns

  • context
  • path
  • value
  • $source
  • timestamp
    would be a better solution. That could be updated for every received delta.

In principle we should also capture the state of async actions, but I don't think that is feasible or worthwhile.

@KEGustafsson
Copy link
Contributor

Old issue #1308, would be good to link here too. Plugins to have possibility to save their data/states/etc.. if server is restarted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants