DiceDB / dice

DiceDB is an in-memory real-time database with SQL-based reactivity. It is hyper-optimized for building and scaling truly real-time applications on modern hardware while being a drop-in replacement for Redis.
https://dicedb.io/
Other
4.18k stars 517 forks source link

Add support for command `JSON.RESP` #500

Open arpitbbhayani opened 1 week ago

arpitbbhayani commented 1 week ago

Add support for the JSON.RESP command in DiceDB similar to the JSON.RESP command in Redis. Please refer to the following commit in Redis to understand the implementation specifics - source.

Write unit and integration tests for the command referring to the tests written in the Redis codebase 7.2.5. For integration tests, you can refer to the tests folder. Note: they have used TCL for the test suite, and we need to port that to our way of writing integration tests using the relevant helper methods. Please refer to our tests directory.

For the command, benchmark the code and measure the time taken and memory allocs using benchmem and try to keep them to the bare minimum.

lbihani9 commented 1 week ago

@arpitbbhayani I'd like to work on this task. Can you please assign this to me?

lucifercr07 commented 1 week ago

@lbihani9 assigned, thanks for picking this up.

lbihani9 commented 6 days ago

@lucifercr07 Updates so far:

  1. Our dice cli probably has some issues (one of them added in screencast below). Spent too much time figuring out why it wasn't working as expected, then switched to redis cli and it started working correctly. 🫠

https://github.com/user-attachments/assets/558ce18d-1a90-4434-b28e-d4b5179e5857

Screenshot 2024-09-11 at 6 48 03 PM
  1. I didn't find testcases for JSON.RESP in main redis repository (link shared above) maybe because JSON data structure is a part of redis-stack and not regular redis. I'm supposed to add unit and integration tests for this command, right?

PS: I'm not well versed with unit and integration tests so it might take me sometime. I hope this won't be a blocker. 😅