Step 8 - Challenge: Persistence
Step 8 - Challenge: Persistence
Build Your Own Redis Server (Python Edition)
Step 1 - Introduction to RESP, Building a Protocol Handler Using Test-Driven Development
Step 1 - Introduction to RESP, Building a Protocol Handler Using Test-Driven Development
Step 2 - Creating a Network Client and Server
Step 2 - Creating a Network Client and Server
Step 4 - Handling Concurrency
Step 4 - Handling Concurrency
Step 5 - Implementing Expiry
Step 5 - Implementing Expiry
In this step your goal is to make your Redis server persist its internal state to disk and to reload the state on startup.
For this step we will implement the AOF (Append Only File). In this mode the Redis server logs every operation received by the server to disk. These operations can then be replayed on startup to re-create the current status of the stored dataset.
The commands are logged in the same format as the Redis protocol itself.