Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 889 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 889 Bytes

Redis From Scratch

Implementing redis from scratch to complete the challenge on codecrafters.io.

More features on the way.

Currenly implementing: master-replica propagation

Running

./your_program.sh

Usage

# Start the server
$ ./your_program.sh

# Using another terminal, query the server.
# You can use netcat, but you will have to encode the inputs using the redis protocol.
# Recommend using the official redis-cli client.
$ redis-cli set foo bar
# -> OK
$ redis-cli get foo
# -> "bar"
#
# Expiry time using PX
$ redis-cli set hello world PX 5000
$ redis-cli get hello
# -> "world"
# After 5 seconds (5000 milliseconds) this key is expired
$ redis-cli get hello
# -> (nil)