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

Resumable device state #70

Open
whaleygeek opened this issue May 31, 2016 · 0 comments
Open

Resumable device state #70

whaleygeek opened this issue May 31, 2016 · 0 comments

Comments

@whaleygeek
Copy link
Owner

Noted in #63 that learnt state from a device might be useful to persist in a file, and some of it restored when the program restarts. Such as the last timestamp of the last received message, last known readings, last known switch state, etc.

POSSIBLE: 9. understand read only and read/write intents better

when using configuration data and last known values, it is useful
to keep them in the same single file, so it is easy to copy
to other machines. Some data is naturally 'write once' and
very configuration based. Some data is naturally 'write often'.
It might be nice if these two types of data could appear in the same
file, but the locking/performance and resilience issues be handled
differently for the two classes of data - e.g. perhaps having
two connections to the same database file, one in read only mode
for config records, and one in read/write mode for last use data.
There might also be different namespace prefixes in the file
so that the key sets are separate, or there may be a way to
link them so that when you read a record you get both the static
config data and the fast changing last use data as a single
record. But this then implies when you do an update, you
probably want to update part of a record rather than the
whole record.

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

No branches or pull requests

1 participant