kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Tracking issue for the Redis JSON support

Open PragmaTwice opened this issue 2 years ago • 4 comments

Motivation

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

  • [x] #1806
  • [x] #1807
  • [x] #1808
  • [x] #1809
  • [x] #1810
  • [x] #1811
  • [x] #1812
  • [x] #1813
  • [x] #1814
  • [x] #1815
  • [x] #1816
  • [x] #1817
  • [x] #1818
  • [x] #1819
  • [x] #1820
  • [x] #1821
  • [ ] #1822
  • [x] #1823
  • [x] #1824
  • [x] #1825
  • [x] #1826

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

Other pull requests related to JSON:

  • [x] #1803
  • [x] #1828
  • [x] #1840
  • [ ] #1829
  • [x] #1843

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!

PragmaTwice avatar Oct 15 '23 10:10 PragmaTwice

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

Kelvinyu1117 avatar Nov 04 '23 18:11 Kelvinyu1117

@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

git-hulk avatar Nov 07 '23 05:11 git-hulk

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

zagzhang avatar Jul 12 '24 01:07 zagzhang

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

Sure.

PragmaTwice avatar Jul 12 '24 02:07 PragmaTwice