Hacker News new | ask | show | jobs
by tptacek 5198 days ago
There's a blog post from Salvatore somewhere talking about how he marshalled time series data into strings which made me thing the naive/straightforward approach was suboptimal. I always thought ZSETs indexed by time_ts would be a good fit for this.
2 comments

In case this helps, probably related:

- https://github.com/antirez/redis-timeseries

- ZSET pull request https://github.com/antirez/redis-timeseries/pull/1

- and the resulting "dsl uptime" script I made out of it: https://github.com/thbar/dsl-uptime

ZSET's indexed by time_ts sound cool until you need to increment a value for a time since you'd have to change a key of the item in a set. I have no idea how that might work.

Thinking of it, you could probably remove the old value and insert the new (incremented) one, but that seems both slower and non-atomic.