Redis-Clone is a simplified implementation of a Redis server designed to explore and understand the internal workings of Redis. This project serves as both an educational tool and a practical exercise to learn and apply the Go programming language.
Redis-Clone supports the following commands using the RESP (REdis Serialization Protocol):
- SET: Stores a key-value pair.
- GET: Retrieves the value of a key.
- HSET: Stores a key-value pair within a specified hash.
- HGET: Retrieves the value of a key within a hash.
- HGETALL: Retrieves all key-value pairs within a hash.
- Go programming language installed on your system.
- A Redis client or a custom implementation for testing.
-
Clone the repository:
git clone <repository-url> cd redis-clone
-
Run the server:
go run app/*.go -
The server will start listening at
localhost:6379.
- Install a Redis client or use a custom implementation.
- Run the Redis client and connect to
localhost:6379. - Execute any of the supported commands (e.g.,
SET,GET,HSET, etc.).
-
SET Command:
SET key value
-
GET Command:
GET key
-
HSET Command:
HSET hash key value -
HGET Command:
HGET hash key -
HGETALL Command:
HGETALL hash
The Redis-Clone project was developed as a learning tool for:
- Understanding the design and implementation of a key-value store.
- Practicing concurrency and network programming in Go.
- Exploring the RESP protocol.
This project is inspired by Redis, a powerful and efficient in-memory data structure store. A special thanks to the tutorial Build Redis From Scratch, which provided valuable guidance and insights into building this project. Working on expanding the project further on top of this.