Open joshvince opened 7 years ago
A schema for this:
Table: history
Contains an object:
lineStatus: {
201701100900: {
time: 201701100900,
data: {
northern: [10,10,10,10],
central: [5,5,5,5,5]
},
201701101000: {
time: 201701101000,
data: {
northern: [10,10,5,5],
central: [10,10,5,5,5]
}
}
This should capture historical data rather than just throwing it away every five minutes.
Once, per hour, something should get a snapshot of each line and should update a separate table in the DB with a timestamped object (these eventually need to be searchable)