redis
Date: 2021-02-08
Author: Andrew
Today started on setting up redis so that we can have a central store of data to keep everything which the web page and any other process that we are running can put info or read info. For example, the plan is that the GPS service will write to a log and to redis. Then when a photo is taken, we'll retrieve the latest GPS info from redis and save it in the photo log entry.
Setup went smoothly. Most of the commands involved doing things I've already done before it was just slow going to make sure I wasn't missing a step or going off script and making a problem for myself.
Once I could set and get entries in redis spent a bit of time getting it to work with python. Once I could load some generic values, I tweaked the script to obtain and update the total and free ram for the Pi every five seconds and put it in redis. So now the stage is set to upgrade the Flask app to support websockets and make a pub/sub arrangement where the page will update the ram on a regular basis.
- Next: websockets - part I
- Previous: Photo commit/discard and logs - part II.