Hey hey, I have question about how, or if, I could or should use the synchronized historical data that the persistent TCP connection offers.
My scenario currently is as follows.
On site I have a Mango ES which reads a totalized pulse count from some meters. I log that data locally and also calculate a difference since the last reading so that essentially I have a raw count and a one minute interval value. Both are logged at one minute intervals and I used to use an HTTP publisher to push both of these values to a cloud based mango. In the cloud based mango I have some Meta points and when a new value is pushed a script runs which applies a pulse weight to my interval reading and I'm left with a nice one minute consumption reading.
Using the HTTP publisher I had to manually create all the HTTP receiver points so the Persistent TCP connection offers a really nice solution around that step. Right now I am using the Persistent TCP connection just like the HTTP publisher where it only pushes the current readings without any history sync. As mentioned I use the updating of the raw and interval points as a trigger for my script so this is why I have implemented it this way.
However, curiosity has got the better of me so now I'm curious if I can accomplish the same thing somehow but using the historical sync rather than just pushing current data? Is there a way that I can, for example, sync my historical data from the ES every X mins and on the cloud receiver side have my script trigger to calculate the values for my meta points? The way I picture this is, for example, every 15 mins my ES would push all the historical data up to the cloud. Upon arrival at the cloud the script would trigger and calculate all the new values for the meta points but with the same timestamp as the historical data, essentially back filling history for the meta points.
I know this sounds a bit insane. I'm also considering if I should do all the calculations at the ES, ie put the pulse weights in the ES, and just push that data up. The only thing I don't like about that is that if, and it is an IF, we ever started implementing this solution outside our area I would love to have the ability to ship out a prepackaged box where someone only needs to set the IP and wire stuff in. If the ES in the field sends me just raw data I can control all the pulse weights and calculations myself from the cloud. I think that what I've come to right now is pretty good for what I need but I just wanted to ask in case there is some dead simple way that I don't know about. I also really like the idea of pushing all the historical data, it just makes sense. The only tricky part is that I want to calculate stuff based on that data.
Much appreciated as always.