As an employee of a software company, I currently investigate big data technologies and especially time series databases for a rather big industrial customer in an IoT scenario.
The customer wants to “go for big data” with all of his sensor data generated inside his factories. He aims to consolidate knowledge, be able to react faster on certain events and do better predictions with the aggregated data. It’s pretty much the same as all big data IoT guys want to have.
In the very first step, we will import the sensor data into a time series database and we currently evaluate InfluxDB as our tool of choice. Once decided for, this step will of course (or hopefully?) be easily implemented.
In a second step, we need to feed the sensor data with some kind of meta information. For instance: We have a factory. Each factory has multiple buildings. Each building has multiple machines. Each machine has multiple sensors. In order to gather knowledge out of the data, it must be possible to aggregate and work with the data in a structured manner like so: “If the power consumption measured over all machines in building A exceeds the average of all buildings power consumption by a factor of 2, then do something… Trigger a script or such”. Or a much simpler usecase: “Compute the difference between the total building power consumption minus the energy generated by the on-factory-power-plant. If that difference exceeds a certain threshold, make sure that our factory power plant gets some kind of notification to power up a bit more if possible.”
We can expect the structure to be hierarchical, a tree to be precise or to be even more exact: Multiple trees. We could have one tree for “logical data”, one tree for “financial aggregated data”, and so on…
We do not yet worry about the time series aggregation calculation which is a topic for itself. (What happens if some sensor doesn’t send data? What if they sample in different intervals, what if they have different offsets in sampling, how to interpolate between?, …), but this will definitely be a topic in (near to mid) future.
We now want to evaluate, if and how at best, we can deal with that structure-meta-data in the Influx-environment. On one hand, we have our meta-data service holding the graph (and more meta data about the devices) in some kind of registry (most likely not Influx as this is not time dependendent data but classical CRUD-User/Sensor-Management) and on the other hand, we have the timeseries database. At the end, we want to kind of marry those two.
I write to you as I think, this kind of problem is quite common. We do almost never have only raw sensor data but usually have some kind of meta information at hand which describes the sensor in more detail and which we might want to use in our computations. I also think it is likely that this meta information is not stored alongside with the time series data. (Whereas I can imagine to store this data inside my measurements in form of tags if I want to use the information in computations). I am wondering if any of you had to deal with the same issue and which kind of solutions you came up with?! I would also like to know if there is a need for a better integrated solution: Would it be worth the effort to write a plugin into Kapacitor which could kind of extend the “identifier evaluation” and query the resolution of an unknown identifier by a REST API or such?
For a solution where I don’t change the code of Influx/Kapacitor:
-Do you think it is better to write my metadata in an own measurement? E.g. I have the metadata “upstream resistance” which was up to 2017-01-01 100 Ohms and since then 1000 Ohms and thus make it useable from inside Kapacitor rule about a measurement. Or:
-Do you think it is better to write my metadata into tags from a measurement? Can I make a new write to always use the last used tagset (fillna…)?
Or do you think, I would benefit a lot from Influx/Kapacitor code changes/plugins:
-What should be done in there then?
-How much would it cost?
-Who else would benefit or use such plugins?
I am very grateful for each response on any of those questions and would be happy if a discussion about this topic would arise.