Step 3 - Challenge: SET and GET
In this step your goal is to set and get the value of a key. You’re going to implement the core functionality of Redis.
To set a key in Redis we use the command SET. For this step we’re just going to implement the simplest version, i.e.:
% redis-cli set Name John
OK
We’ll ignore all the expiry options that Redis supports for now. Once a key has been set you’ll want to implement and test the related command GET.
% redis-cli get Name
"John"
When you are implementing the commands don’t forget to read the specification for each command to check that you are returning the correct results to the client and that the results are correctly serialised according to the RESP protocol.
You might also like to use the Redis client library to build some automated tests for your server.
Don’t forget to test edge/error cases as well as the happy path.