RedsRedis is a high-performance, multi-threaded Redis-like database implemented in C++. It supports a variety of data structures and features, including offset-based retrieval and an efficient packet system for data communication.
- Multi-threading: Optimized concurrency for handling multiple client requests.
- Data Structures:
- Hash Tables for key-value storage.
- ZSets (Sorted Sets) for ordered data.
- AVL Trees for balanced search operations.
- Heaps for priority-based retrieval.
- Offset-Based Retrieval: Efficient querying using data offsets for high-speed lookups.
- Packet System: A structured packet system for handling multiple data types and requests seamlessly.
- Optimized Performance: Leveraging advanced data structures and threading for scalability and speed.
Ensure you have the following installed:
- CMake (for project configuration)
- GCC/Clang (for compiling C++ code)
- Make (or an equivalent build tool)
# Clone the repository
git clone https://github.com/yourusername/RedsRedis.git
cd RedsRedis
# Create a build directory
mkdir build && cd build
# Run CMake
cmake ..
# Compile the project
makeRun the server:
./Server- Set a key-value pair:
set key value - Retrieve a value:
get key
- Insert into a sorted set:
zadd myset 10 value1
- Retrieve from an offset:
zquery myset 5 value1 r1 r2
- Lock-free structures where possible to minimize contention.
- Efficient memory management using pools and custom allocators.
- Batch processing support for handling multiple requests efficiently.
- Implement replication support.
- Add persistence for durable storage.
- Improve clustering capabilities.
Contributions are welcome! Please follow the standard GitHub workflow:
- Fork the repository.
- Create a new branch (
feature-xyz). - Commit and push your changes.
- Submit a Pull Request.
This project is licensed under the MIT License. See LICENSE for details.
For questions, feel free to open an issue or reach out to hamees.ehsan@gmail.com.