DiceDB / dice

DiceDB is a redis-compliant, in-memory, real-time, and reactive database optimized for modern hardware and for building and scaling truly real-time applications.
https://dicedb.io/
Other
6.31k stars 988 forks source link

Add support for COMMAND command #144 #158

Closed kakdeykaushik closed 2 months ago

kakdeykaushik commented 3 months ago

Added COMMAND command.

Summary of change: Added support for COMMAND command, its subcommands are being implemented in following mentioned issues.

Implementation details taken from Redis:

This PR can be merged once issues #145 #146 #147 #148 #149 are resolved and we merge/accomodate those changes in this.

yashs360 commented 3 months ago

@kakdeykaushik We are stepping over each other's work here. The command list is already in progress here. I do like the elegance of your solution and I will revoke my PR. I would however suggest checking ongoing work before repeating work. https://github.com/DiceDB/dice/pull/157

kakdeykaushik commented 3 months ago

@yashs360 apologies if you feel that way. thanks for appreciating the work.

How I was looking it was - subcommands can be implemented and merged separately and once they are done, then in this PR we can just call the corresponding function instead of the placeholder functions that I have created.

I'm not sure how it is overstepping on others work as core implementation of those subcommands, tests and docs would be done by the assignee of that task (In case of COMMAND LIST you).

yashs360 commented 3 months ago

Not your fault @kakdeykaushik . I could have done better by assigning the task to myself. We both had overlap in the way the COMMAND is triggered. Like I said I like your solution better, and I'd be happy to build on top of yours once its merged (or you can go for the other commands as well while you are there).

Thanks for contributing :)

arpitbbhayani commented 3 months ago

@kakdeykaushik Just wanted to know if you have plans to work on this? I see RESP_OK as response being emitted for all the commands.

kakdeykaushik commented 3 months ago

@arpitbbhayani I'll be working on the commands, currently I'm going through how Redis does it. What I have found(tentatively) they put all the command info in JSON files and then use them for COMMAND command. I need to study this more thoroughly.

starting point to read and enter codebase - https://github.com/redis/redis?tab=readme-ov-file#commandsc

JyotinderSingh commented 2 months ago

I believe this PR is now stale and not being worked on. Please feel free to reopen in case there is work to be done.