{"id":24407412,"url":"https://github.com/erio-harrison/rust-redis-imitate","last_synced_at":"2026-02-25T16:33:01.629Z","repository":{"id":259206631,"uuid":"861648713","full_name":"Erio-Harrison/rust-redis-imitate","owner":"Erio-Harrison","description":"Project that imitates redis. Designed for learning and exploring distributed in-memory data stores. ","archived":false,"fork":false,"pushed_at":"2025-01-14T10:26:53.000Z","size":107355,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-09T07:19:06.573Z","etag":null,"topics":["cache","database","redis","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erio-Harrison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-23T09:28:46.000Z","updated_at":"2025-05-23T14:06:30.000Z","dependencies_parsed_at":"2024-10-23T14:17:35.153Z","dependency_job_id":"75045d2e-78e5-4e96-b924-d6b212b43e6e","html_url":"https://github.com/Erio-Harrison/rust-redis-imitate","commit_stats":null,"previous_names":["erio-harrison/rust-redis-clone","erio-harrison/rust-redis-imitate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Erio-Harrison/rust-redis-imitate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Frust-redis-imitate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Frust-redis-imitate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Frust-redis-imitate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Frust-redis-imitate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erio-Harrison","download_url":"https://codeload.github.com/Erio-Harrison/rust-redis-imitate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Frust-redis-imitate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29830189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T15:41:19.027Z","status":"ssl_error","status_checked_at":"2026-02-25T15:40:47.150Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","database","redis","rust"],"created_at":"2025-01-20T05:05:52.337Z","updated_at":"2026-02-25T16:33:01.589Z","avatar_url":"https://github.com/Erio-Harrison.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Redis Imitate\n\n![Rust](https://github.com/Erio-Harrison/rust-redis-imitate/actions/workflows/rust.yml/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/rust-redis-imitate.svg)](https://crates.io/crates/rust-redis-imitate)\n[![Documentation](https://docs.rs/rust-redis-imitate/badge.svg)](https://docs.rs/rust-redis-imitate)\n\nA Redis imitate 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.\n\nNow support commands:\"SET\",\"GET\",\"DEL\",\"INCR\",\"DECR\",\"LPUSH\",\"RPUSH\",\"LPOP\",\"RPOP\",\"LLEN\",\"MULTI\",\"EXEC\",\"DISCARD\". Will add new commands in the future.\n\nIf you'd like to discuss more about this project, feel free to join me on Discord for a chat!\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord\u0026logoColor=white)](https://discord.gg/8jCKt9rTtN)\n\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Core Modules](#core-modules)\n- [Auxiliary Modules](#auxiliary-modules)\n- [Advanced Features](#advanced-features)\n- [Tools and Testing](#tools-and-testing)\n- [How to Run](#how-to-run)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nThis 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.\n\n## Core Modules\n\n### 1. Network Module (`network`)\nHandles client connections, TCP server initialization, and request parsing.\n- **Features**:\n  - TCP server for handling client connections\n  - Request parsing and processing\n\n### 2. Command Processing Module (`commands`)\nManages parsing and execution of Redis commands.\n- **Features**:\n  - Command parser for interpreting client commands\n  - Executor for processing supported Redis commands\n\n### 3. Data Storage Module (`storage`)\nManages in-memory data structures and persistent storage.\n- **Features**:\n  - HashMap, List, Set, and other Redis-like data structures\n  - Persistence through RDB and AOF mechanisms\n\n### 4. Cache Module (`cache`)\nImplements caching strategies and handles expired keys.\n- **Features**:\n  - AVL Tree structure\n  - LRU/LFU caching algorithms\n\n## Auxiliary Modules\n\n### 1. Configuration Module (`config`)\nHandles configuration file parsing and runtime configuration management.\n\n### 2. Logging Module (`logging`)\nManages logging for errors and operations.\n\n### 3. Monitoring Module (`monitoring`)（TODO）\nCollects performance metrics and status reports.\n\n## Advanced Features\n\n### 1. Cluster Module (`cluster`)（TODO）\nSupports node communication, data sharding, and failover mechanisms.\n\n### 2. Transactions Module (`transactions`)\nImplements Redis's MULTI/EXEC commands with optimistic locking (CAS).\n\n### 3. Publish/Subscribe Module (`pubsub`)\nManages channels and message distribution for Redis's pub/sub feature.\n\n## Tools and Testing\n\n### 1. Benchmarking (`benchmarks`)\nIncludes a performance testing suite to evaluate system efficiency.\n\n### 2. Unit and Integration Testing\nEach module has corresponding unit and integration tests for end-to-end validation.\n\n## How to Run\n\nOpen a terminal and type:\n\n```bash\ncargo run\n```\n\nOpen another terminal and:\n\n```bash\ncd rust-redis-client\ncargo run\n```\n\nLet's try some commands:\n\n![result](asset/output.png)\n\n\n## Contributing\n\nContributions are welcome! Open an issue or pull request.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferio-harrison%2Frust-redis-imitate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferio-harrison%2Frust-redis-imitate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferio-harrison%2Frust-redis-imitate/lists"}