Problem Statement

RedisTimeSeries is a redis module used to operate and query time series data, giving redis basic time series database capabilities.

As Apache Kvrocks is characterized by being compatible with the Redis protocol and commands, we also hope to provide temporal data processing capabilities that are compatible with RedisTimeSeries.

This task is to implement the time series data structure and its commands on Kvrocks. Since Kvrocks is an on-disk database based on RocksDB, the implementation will be quite different from Redis.

Data Structure

Metadata: https://redis.io/commands/ts.info/

Solution 1: Serialized

Solution 2: Use Internal Hashmap/JSON

Interfaces Supported:

The decision between serialized metadata and using a JSON or Hashmap structure depends on Kvrocks' internal capabilities and performance considerations. JSON is more readable and extensible, which can be beneficial for future enhancements. However, serialized metadata might be faster to access and update, albeit less flexible. If Kvrocks efficiently supports JSON, that could indeed be the better option for readability and maintainability.