Early last year (2021), I started some courses on Redis University to learn more about the features and data structures of Redis. On these courses I learned about a couple of Redis Modules. After reading more about them, I found a project which could be built on top of RedisTimeSeries which adds time-series data structure to Redis.
I started development with the official Go client RedisTimeSeries/redistimeseries-go but found some inconveniences. For example, it is tied to gomodule/redigo, but I more prefer go-redis/redis. So I started thinking if it would be possible to build a similar library but with the following list of requirement:
- Functional options for friendly APIs.
- Type safety.
- Switched word order for better autocompletion and to follow the naming scheme used in stdlib (e.g.
http.MethodGet
,http.StatusNotFound
). - Compatibility with multiple Redis clients.
- Accept
time.Time
andtime.Duration
where a parameter is a timestamp in milliseconds or a duration in milliseconds.
After a couple of days of development and reading RedisTS was born. While using it, I was able to find some bugs and polish the public interface of the lib. I’m quite happy with the current state of it and looking forward to improve on it and reach a stable version.