Data system that manages aggregates over time intervals

I am looking to know if there is a data system that handles the following use case.

To keep it simple, the data is a set of homogeneous enties E.

E contains named numeric properties that the app code increments as the case may be over the life cycle of the application.

I will want to query the state of E for a set of time intervals. To keep it simple, let's say this is today, this month, this year and lifetime. I don't want to use a time series DB because I do not want the calculations done at query time, no matter how efficient.

I just want Application code to increment the named values of E. But I don't want to manage the timeframe slices.

Here is how I see this working. E would be modeled by, say, a json document.

E(today) is a document keyed by the DATE OF TODAY IN TIMEZONE OF E = T(today)

App code increments properties in E(today) only.

E(today) is set to expire at the end of T(today). Data system manages document expiration. On Expiry, the system increments E(month) according to the values of E(today). E(month) is set to expire at the end of T(month). On Expiry, the system increments E(year) according the values of E(month). E(year) is set to expire at the end of T(year). On Expiry, the system increments E(lifetime) according to the values of E(year).

The app can query E for (today, month, year, lifetime), where E(today|month|year|lifetime) are all documents.

today = E(today) month = E(today + month) Year = E(today + month + year) Lifetime = E(today + month + year + lifetime)

At any given time no more than 4 aggregate documents represent E.

The query cost is no more than the cost of tallying up the properties for the set of E documents in the interval.

I know that we can build this model using a document store that provides managed document expiration and eventing. But implementing this model using these systems is rife with durability and safety concerns.

I am primarily looking to avoid managing rolling the documents over. I want to increment the counters once during the app lifetime, and have the system manage the temporal aspects of the aggregations on it own.

Topic data-analysis aggregation

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.