DiceDB / dice

DiceDB is a redis-compliant, reactive, scalable, highly-available, unified cache optimized for modern hardware.
https://dicedb.io/
Other
6.88k stars 1.1k forks source link

Add support for `JSON.GET.WATCH` command #1131

Open JyotinderSingh opened 1 month ago

JyotinderSingh commented 1 month ago

Add support for reactive queries on the existing JSON.GET command by introducing JSON.GET.WATCH.

This command should send push-responses to subscribed clients whenever the data inside the respective hash set changes.

As a part of this feature, you are also required to add support for the same to the dicedb-go SDK inside the watch_command.go file.

Reference

  1. You may refer to #1047 to understand the changes required to support this command.
  2. 924 provides more background on the feature's underlying implementation (but may not be directly relevant to this issue)

Testing

  1. Ensure integration tests are added, you can refer to existing .WATCH integration tests.
  2. Integration tests should include both resp tests and SDK tests.
arbha1erao commented 1 month ago

@JyotinderSingh I would like to work on this

JyotinderSingh commented 1 month ago

@JyotinderSingh I would like to work on this

Assigned.

arbha1erao commented 1 month ago

@JyotinderSingh

I'm trying to use ZRANGE.WATCH as per the reference in Adds support for ZRANGE.WATCH #1047, but I'm getting the error:

ERR unknown command 'ZRANGE.WATCH', with args beginning with: zrangewatchkey 0 -1 REV WITHSCORES

I'm on the latest branch and have tested it in both the CLI and the Go SDK, but the command isn’t recognized. Am I missing anything here to get this working?

JyotinderSingh commented 1 month ago

@JyotinderSingh

I'm trying to use ZRANGE.WATCH as per the reference in Adds support for ZRANGE.WATCH #1047, but I'm getting the error:

ERR unknown command 'ZRANGE.WATCH', with args beginning with: zrangewatchkey 0 -1 REV WITHSCORES

I'm on the latest branch and have tested it in both the CLI and the Go SDK, but the command isn’t recognized.

Am I missing anything here to get this working?

Please run the server in multithreaded mode. Use go run main.go --enable-multithreading=true

tarun-29 commented 3 weeks ago

are you still working on this issue? @arbha1erao

shashank-priyadarshi commented 2 weeks ago

Can I please take this up @JyotinderSingh @tarun-29 ?

JyotinderSingh commented 1 week ago

Can I please take this up @JyotinderSingh @tarun-29 ?

Assigned

hrishikeshdkakkad commented 1 week ago

/assign

shashank-priyadarshi commented 6 days ago

@hrishikeshdkakkad I have started on this. In case I need help, I will break it down and assign a subtask to you.