Please find a POC for using only one set of test for possibly resp, HTTP and websockets.
I have created a separate package for parser named dicedbadapter. Core idea is to use a meta file about each command and use that to decode and encode the command. Here, encode refers to encoding HTTP body to string and vice versa. This way, we can added new adapters when new commands are added. For new commands, we need to add new meta, new encoder/decoder wrappers and tests for the wrapper.
Please let me know your thoughts, if you think this can be used for all commands out there, we can pull this off using our community. For now I have support for six commands:
SET: lots of optional params
GET
DEL
MGET
MSET: have key-value pairs
BITOP: have required params + variable params
BITFIELD: have subcommands
I would like to ensure any syntax error to be thrown by the server and not the parse. (I am working on handling extra params in HTTP body, and send them into string and let DiceDB handle syntax errors"
Hi team,
Please find a POC for using only one set of test for possibly resp, HTTP and websockets.
I have created a separate package for parser named
dicedbadapter
. Core idea is to use a meta file about each command and use that to decode and encode the command. Here, encode refers to encoding HTTP body to string and vice versa. This way, we can added new adapters when new commands are added. For new commands, we need to add new meta, new encoder/decoder wrappers and tests for the wrapper.Please let me know your thoughts, if you think this can be used for all commands out there, we can pull this off using our community. For now I have support for six commands:
I would like to ensure any syntax error to be thrown by the server and not the parse. (I am working on handling extra params in HTTP body, and send them into string and let DiceDB handle syntax errors"