chronix.server icon indicating copy to clipboard operation
chronix.server copied to clipboard

Aggregation by time

Open twiechert opened this issue 7 years ago • 3 comments

I use chronix to store counts of available car sharing vehicles. I use tags/attributes to distinguish different vehicle classes, such that I don't need to manage a dedicated time series per vehicle type/class. Thus, at every t, I persist multiple records.

How do I aggregate the time series by time and apply a sum operator, so that I'm able to retrieve a series of available vehicles regardless of vehicle type/class?

Thanks in advance.

twiechert avatar Oct 30 '17 11:10 twiechert

Chronix does not provide aggregations over time. The reason is: If a client requests the whole data he has to touch it anyway and hence he can transform the data in the way he likes it. It is faster than loading the whole data in Chronix (decompress + deserialize), transform it and serialize and compress it again and ship it and deserialize and decompress it.

However i think this i a useful extension and i am willing to implement this (or you can).

FlorianLautenschlager avatar Oct 30 '17 18:10 FlorianLautenschlager

I get your point. However, when using the Grafana plugin for example, the user is not able to intercept the returned values and thus the graphs only show one of the values per time instant. This probably not the best example, as the query facilities trough this plugin are currently very limited.

For me, however, it's ok to know that the data is "there" and returned and not already discarded by the data store. But I still consider this feature very useful.

twiechert avatar Oct 31 '17 13:10 twiechert

Yes. We should provide such functions! 👍

FlorianLautenschlager avatar Nov 01 '17 08:11 FlorianLautenschlager