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

Decentralize reader's database #3

Open
Sashkoiv opened this issue Jun 14, 2023 · 0 comments
Open

Decentralize reader's database #3

Sashkoiv opened this issue Jun 14, 2023 · 0 comments

Comments

@Sashkoiv
Copy link
Collaborator

Currently, all requests from the reader go to the central node which is Raspberry Pi. Then the Raspberry Pi does the magic and replies with whether to unlock the equipment (switch the relay). In this scenario good connection as well as central node stability is vital.

The suggestion is to store a database of allowed users on the reader directly. This should provide more stability and reliability and at the same time untie the reader from infrastructure.

In order to maintain the local reader's database up to date I'd suggest together with the heartbeat packet sending the status of the main database (hash-sum, last update timestamp, request of update, TBD).

By the database, I mean serialized data stored as a file. Most likely the format to be YAML or maybe JSON (which suits best for micropython). In that way after reading the file a dict is created and search in dict works fast enough when in the same time takes not that much of ESP32 resources.

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

1 participant