You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We reimplemented the core of the DiceDB engine and re-wrote - the wire protocol, execution engine, and config management. This rewrite helped us gain 32% throughput over our existing benchmark. One of the core principles we focussed on was to make code easy to extend and debug. As an effort, we need to migrate the command from the old engine to IronHawk.
Here are the exact things to be taken care of to migrate the command ECHO
setup DiceDB server locally from the source - instructions
setup DiceDB CLI locally from the source - instructions
Steps to execute
Start the DiceDB server with IronHawk engine
$ go run main.go --engine ironhawk --log-level debug
Start the DiceDB CLI with the IronHawk engine
$ go run main.go --engine ironhawk
Porting the command
Find the current implementation of the command, the name of the function will be evalECHO. ex: evalSET, evalGET, etc. Most of them are present in the store_eval.go file.
Create a new file internal/cmd/cmd_echo.go and follow the structure as cmd_get.go, cmd_set.go, and cmd_ping.go files.
Reimplement the old evalECHO function into a new file, Make a note of the return values of the new function.
If you think the implementation is complex, feel free to simplify
Document the code you have written and make sure it adheres to existing standard
Add TODO in the comment, if you feel there are things that need to be implemented later
Cover all possible cases for the command implementation
Do not delete the old implementation of the eval function
No need to write test cases for this new implementation. We will take care of this in one shot later. If the test fails, it is okay.
If you find any other bug while you are implementing it, you can either
We reimplemented the core of the DiceDB engine and re-wrote - the wire protocol, execution engine, and config management. This rewrite helped us gain 32% throughput over our existing benchmark. One of the core principles we focussed on was to make code easy to extend and debug. As an effort, we need to migrate the command from the old engine to IronHawk.
Here are the exact things to be taken care of to migrate the command
ECHO
Steps to execute
Start the DiceDB server with IronHawk engine
Start the DiceDB CLI with the IronHawk engine
Porting the command
evalECHO
. ex:evalSET
,evalGET
, etc. Most of them are present in thestore_eval.go
file.internal/cmd/cmd_echo.go
and follow the structure ascmd_get.go
,cmd_set.go
, andcmd_ping.go
files.evalECHO
function into a new file, Make a note of the return values of the new function.TODO
in the comment, if you feel there are things that need to be implemented latereval
functionNo need to write test cases for this new implementation. We will take care of this in one shot later. If the test fails, it is okay.
If you find any other bug while you are implementing it, you can either
Follow the contribution guidelines
These are general guidelines to follow before you submit a patch. Please mark them as done
once you complete them
make lint
on your local copy of the codebaseThe text was updated successfully, but these errors were encountered: