sidoh / epaper_templates

Template-oriented driver for e-paper displays
MIT License
256 stars 27 forks source link

Rewrite variable database, add remote integration test suite #38

Closed sidoh closed 4 years ago

sidoh commented 4 years ago

Two major changes are included:

Variable database rewrite

Previously, variable database was a flat JSON file. This was limiting in a couple of ways:

This implements a simple binary key-value database format which is more scalable from a storage perspective.

Presently, all upserts and queries involve flash operations. This may prove too costly. If this ends up being the case, it should be simple to put an in-memory cache+buffer in front of it.

Transient variables (presently this only includes the timestamp) are never persisted.

Integration tests

Mostly unrelatedly, a suite of integration tests written in rspec is located in ./test/remote. These can be run with:

bundle install && bundle exec rspec

The tests are entirely aimed at the REST API. Future coverage may include MQTT and websockets.