Results Database Server

A subforum dedicated to topics around the NAS.
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Results Database Server

Post by TerryJC »

hamishmb wrote: 30/09/2019, 16:53We could just have the ID as "NAS" and I don't mind what the hostname is.
NAS It is and the hostname is nasbox.
hamishmb wrote: 30/09/2019, 16:53It won't need a socket ID or port number, but Sump Pi will do eventually - the NAS box will eventually be the thing that dictates the reading interval and tick etc.
I've allocated SOCK2 as the socket ID and 30002 as the Port Number.

I'll publish the Software Design Spec on the Fileserver in due course. I want to include the algorithms for the Lady Hanham and Stage Butts segments when you are ready.
Last edited by TerryJC on 30/09/2019, 17:07, edited 1 time in total.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

Okay sounds good.

We'll need some discussion around those and what we want to do. At some convenient time I guess we can have a meeting and I'll take notes.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

I just had a quick go at running the river control system software on the NAS box, in case there are any glaring issues. It seems to be fine, apart form I need to get the python library for database access installed. It needs to be compiled as there's a C extension, so that'll be fun :roll: :lol:
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Results Database Server

Post by TerryJC »

Good step forward.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

Okay, the Python library is now working on the NAS box! It took a while and was quite hacky, but I managed to build it.

Updated Cross compile VM and some other NAS box files like the GPL code are now being uploaded.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Results Database Server

Post by TerryJC »

Excellent!

Sent from my Moto G (5) Plus using Tapatalk

Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

I just checked to see if my 1 TB drive can be used with a 500 GB drive in RAID 1 with our NAS box, and it turns out it can, so it will work as a spare once I no longer need it. Apparently the remaining capacity on the larger drive would be formatted as a JBOD disk, which we could just ignore.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

Just noting the current credentials and IP, because I forgot them again.

EDIT: There're available at viewtopic.php?f=36&t=152&p=2234#p2234
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Results Database Server

Post by hamishmb »

NOTE: I have enabled a 2GB swapfile for the NAS box on boot - this should help prevent us from running out of memory.

I plan to move on to testing it with my VMs soon, but that'll be in a different thread.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Results Database Server

Post by TerryJC »

After this afternoon's Video Conference we came to the following decisions:
  1. The System Tick value would be generated by the NAS Box and sent to all the Pis in the system.
  2. At the same time the System Tick and the 'master' System Time would be recorded in the 'System Tick' Table.
  3. If for some reason the NAS Box went down, then the NAS Box would determine the new value of Tick to start incrementing from, by looking at the last Tick value in the 'System Tick' Table.
  4. Pis (such as the SUMP, G4, etc), would send their latest readings to the database, together with the time from the local clock (eg the 'Measurement Time').
  5. At the same time each Pi would record the latest readings to the database, together with the time from the local clock on the SD Card as they do now.
  6. The 'System Status Table' would always show the current status of each device.
  7. The 'System Event Log' would record events for each device in chronological order as the logfiles do currently.
  8. The 'Control Tables' would record the state of the valves and pumps at any given time.
I have uploaded V5 of the Table to the fileserver at https://wmtprojectsforum.altervista.org ... 0Box/Specs
Terry
Post Reply