Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JSON.GET.WATCH command #1131

Open
JyotinderSingh opened this issue Oct 17, 2024 · 4 comments · May be fixed by #1168
Open

Add support for JSON.GET.WATCH command #1131

JyotinderSingh opened this issue Oct 17, 2024 · 4 comments · May be fixed by #1168

Comments

@JyotinderSingh
Copy link
Collaborator

JyotinderSingh commented Oct 17, 2024

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 Adds support for ZRANGE.WATCH #1047 to understand the changes required to support this command.
  2. Implements Command Watch Manager and Adds GET.WATCH Command Support #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
Copy link
Contributor

@JyotinderSingh I would like to work on this

@JyotinderSingh
Copy link
Collaborator Author

@JyotinderSingh I would like to work on this

Assigned.

@arbha1erao
Copy link
Contributor

@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
Copy link
Collaborator Author

@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

@arbha1erao arbha1erao linked a pull request Oct 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants