kvrocks
kvrocks copied to clipboard
Tracking issue for new command parsing framework
Search before asking
- [X] I had searched in the issues and found no similar issues.
Motivation
In kvrocks, command parsing is currently done by some primitive array operations, which works fine for simple commands, but when command parsing rules become complex, the code becomes extremely difficult to understand and maintain. In addition, the parsing of data values such as numerics and enumerations is not well encapsulated.
This work was originally described in #598 to provide an easy-to-use parsing framework for parsing redis commands, especially complex redis commands. In addition, another goal of this work is to eliminate redundant string copies, which are currently widespread in kvrocks, and we will try to introduce something like std::string_view or design APIs that make better use of move semantics of std::string.
Solution
working PRs:
- #768
- #787
Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Many thanks for @PragmaTwice bringing those awesome features to the community.