| Crates.io | rust-redis-imitate |
| lib.rs | rust-redis-imitate |
| version | 0.1.0 |
| created_at | 2024-12-15 11:31:22.164295+00 |
| updated_at | 2024-12-15 11:31:22.164295+00 |
| description | A Redis-like in-memory cache implementation in Rust |
| homepage | |
| repository | https://github.com/Erio-Harrison/rust-redis-imitate |
| max_upload_size | |
| id | 1484076 |
| size | 202,981 |
A Redis clone implemented in Rust, featuring a modular architecture with core and advanced functionalities such as networking, command processing, data storage, caching, clustering, transactions, and pub/sub. The project also includes robust configuration, logging, monitoring systems, and tools for testing and benchmarking.
Now support commands:"SET","GET","DEL","INCR","DECR","LPUSH","RPUSH","LPOP","RPOP","LLEN","MULTI","EXEC","DISCARD". Will add new commands in the future.
You can check the document here: Document
This project is a Redis clone built in Rust, designed for learning and exploring distributed in-memory data stores. The architecture is modular, making it easy to extend and modify. It supports key Redis features like command processing, in-memory storage, and caching, along with advanced features such as clustering and transactions.
network)Handles client connections, TCP server initialization, and request parsing.
commands)Manages parsing and execution of Redis commands.
storage)Manages in-memory data structures and persistent storage.
cache)Implements caching strategies and handles expired keys.
config)Handles configuration file parsing and runtime configuration management.
logging)(TODO)Manages logging for errors and operations.
monitoring)(TODO)Collects performance metrics and status reports.
cluster)(TODO)Supports node communication, data sharding, and failover mechanisms.
transactions)Implements Redis's MULTI/EXEC commands with optimistic locking (CAS).
pubsub)Manages channels and message distribution for Redis's pub/sub feature.
benchmarks)Includes a performance testing suite to evaluate system efficiency.
Each module has corresponding unit and integration tests for end-to-end validation.
Open a terminal and type:
cargo run
Open another terminal and:
cd rust-redis-client
cargo run
Let's try some commands:

Contributions are welcome! Open an issue or pull request.
This project is licensed under the MIT License.