Fork me on GitHub

is it a good idea to model a time series using a single entity with cardinality many for the attributes? I was thinking like a :time and :value attributes with cardinality many


How will you correlate time with value? How will you have duplicate values?


You really need at least a datom per same-time observations, but maybe you can combine time+values into a tuple if you are worried about efficiency


Not sure what the scale of your problem is. We attempted to use Datomic Cloud for time-series data and it did not work well at all. Queries, even after being meticulously optimized, would take far too long (10-15s). Our particular problem was storing data for dashboards which we would show to our customers. It was simply too much data for Datomic. Though, I did expect it to fair a little bit better than it did.


What did you end up going with @U083D6HK9? Just curious.


We use InfluxDB.


Influx actually simplified our lives a lot. We used to have some Kafka stream processors that would create aggregated points based on the raw data and store that. With Influx, we just throw all our raw data at it and got rid of the stream aggregators. Influx lets you query for any aggregate size at runtime, which is seriously amazing. Queries typically take 0.1s.

metal 4

Agreed, intense time-series stuff is not a good fit for datomic