Open AshwinKul28 opened 1 month ago
Hi @AshwinKul28 Would like to take this up.
Thanks @karandixit10 go for it! 🚀
Hi @AshwinKul28 For JSON.SET and other commands it's already implemented in eval.go Shall I move it to store_eval.go or make changes there only?
HI @karandixit10 you need to move it to the store_eval.go and make changes as explained in the above issue. (Make responses independent of any protocols)
Working on it
Hey @karandixit10 hope you are doing well, can you please update the current progress on this task? If you have any blockers feel free to discuss here or on the discord.
Hey @karandixit10 whts the update
Hi @AshwinKul28 @mohit-nagaraj I am done migrating JSON.SET and JSON.GET with unit test and integration tests, I'll create a PR today for all the commands. I was having some blocker but it's fixed now
HI @karandixit10, I hope you are doing well, are you still stuck on any blocker? or if you have already raised a PR please link it with this issue. Lets even go ahead with the draft PR, we can start our reviews on that. Thanks
HI @karandixit10 hope you are doing well. Apologies but we have to make the migration as per the deadline. You can pickup any other open issue once you're back active. Thanks. These commands are getting migrated as a part of https://github.com/DiceDB/dice/pull/1276.
This issue tracks the migration of the mentioned commands - ('JSON.SET', 'JSON.GET', 'JSON.DEL', 'JSON.TYPE') to make them compatible across the three protocols supported by the Dice database: RESP, HTTP, and WebSocket. DiceDB now supports more than one protocols (Resp/http/websocket). We don't want eval operation of each command to be strictly bound with any of the protocols. Currently eval function return statements of each command is bounded to the RESP protocol.
The migration is required because:
The goal is to make the command logic protocol-independent, allowing all three protocols to call the same core functionality seamlessly.
Requirements
[Command Name]
to be generic.Migration Steps
Analyze Current Implementation
Refactor Return Logic
evalXXX(args []string, store *dstore.Store) *EvalResponse
under the file/internal/eval/store_eval.go
/errors/migrated_errors.go
file/internal/clientio/resp.go
file as RespType variablesCommand/Worker specific Changes
IsMigrated
flag to true in the commands information under/internal/eval/commands.go
file.NewEval
parameter in the same command structure./internal/eval/eval.go
file./internal/worker/CommandsMeta
map and make it's type asSingleShard
Update Unit Tests
Integration Tests
Checklist
Additional Notes
If there are any questions or concerns about this migration, please mention them here.
Related Issues/PRs