Summary of Software Architecture meeting 11/6/2019

A forum for discussing/summarising the meetings we hold at WMT. Also a good place for general discussion.
Post Reply
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Summary of Software Architecture meeting 11/6/2019

Post by hamishmb »

Today Terry and I discussed the future of the river system control software, and its architecture. We decided the following:

Architectural Design
  • The remote pis need to be able to control their own subsystems - we won't have just one "master" pi.
  • ^ In order to do this, they must be able to access each other's readings somehow:
    • Making more sockets for connections between pis will get very complicated very quickly - bad idea.
    • Instead, we will use Terry's spare NAS box to try to set up a database server, and have the pis send readings to that instead.
  • Classes that represent devices, and classes that help manage those classes (eg control threads) need to be separated.
    • These should go in a separate python file in Tools/.
Sockets Configuration
  • Sumppi should read the sockets configuration for each site from the sub-dictionary for that site, rather than duplicating it.
    • This helps prevent errors when updating the configuration.
    • The socket name and ID will need to be stored under the settings for each site.
Log and readings file rotation
  • Log files will be rotated as well as readings files.
  • Files will be rotated every day at midnight.
  • There will be separate directories for archived files (from previous days), and the currently-in-use files.
    • If the currently-in-use log or readings file(s) are deleted, they will automatically be re-created, and there will be a warning in the log file stating what has happened.
  • The "THIS_IS_THE_X_DIRECTORY" files will be renamed to be hidden, to avoid confusion and difficulty copying the files.
  • Archived files will be compressed.
    • TODO: What compression format? Gzip?
Note that before any of the above changes are done, I need to:
  • Do some refactoring/general cleanup.
  • Check everything is still working as it should (as much as possible).
    • This includes writing software unit tests.
    • (Integration tests will come later :) )
  • Change the version number to 0.11.0~pre1 (I feel we should start using pre-release & release-candidate version numbers now for more clarity).
There are also many miscellaneous smaller changes to make, but these are far less important and have less impact.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Summary of Software Architecture meeting 11/6/2019

Post by TerryJC »

hamishmb wrote: 11/06/2019, 12:38Instead, we will use Terry's spare NAS box to try to set up a database server, and have the pis send readings to that instead.
I've just checked the User Manual for my D-Link DNS-320 NAS Box and it supports phpMyAdmin. Quite what that does for us I'm not sure, but the manual says:
Manage your own ShareCenter MySQL database using the phpMyAdmin add-on.
I'll run it up this afternoon / tomorrow to see what it does and start a new Topic to cover its capabilities and administration..
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Summary of Software Architecture meeting 11/6/2019

Post by hamishmb »

That sounds promising. I've used phpmyadmin before, and this definitely means it can support a database.
Hamish
Post Reply