apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.44k stars 442 forks source link

Tracking issue for the Redis JSON support #1805

Open PragmaTwice opened 10 months ago

PragmaTwice commented 10 months ago

Motivation

After #1803, we have basic support of RedisJSON, but massive amount of commands remain unsupported:

We need to support all of these commands to make our JSON support more complete and powerful.

Other pull requests related to JSON:

Call for Contribution

Feel free to pick up any issue and finish it!

You can request to be assigned with any issue from this list and try to implement it.

How to implement

  1. Check the RedisJSON document and the document for the specific command (e.g. JSON.SET)
  2. Check the document of Kvrocks data structures design and #1803 to understand how Kvrocks implements Redis data types upon RocksDB. (and also the document of jsoncons which is used in kvrocks to parse/serialize JSON.)
  3. Add corresponding methods to types/json.h, types.redis_json.h/cc, and command interface (Parse and Execute function) to commands/cmd_json.cc. (Note: types/json.h is just wrapper functions of jsoncons library which is not related to storage, while types/redis_json.h is about how to encode/decode JSON from storage (IO operations))
  4. Add corresponding C++ unit test cases and Golang unit test cases for your newly implemented command.
  5. Open your pull requests and we will review them promptly!
Kelvinyu1117 commented 9 months ago

I found that some of the commands were marked as deprecated in the Redis document, do you guys still want to support it? For example: JSON.RESP

git-hulk commented 9 months ago

@Kelvinyu1117 I think we can complete the active commands first and the deprecated commands are also good to support if users did have solid reasons. cc @PragmaTwice

zagzhang commented 1 month ago

Can the JSON feature of KVRocks be officially used in a production environment?

PragmaTwice commented 1 month ago

Can the JSON feature of KVRocks be officially used in a production environment?

Sure.