Skip to content

redsteadz/RedsRedis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RedsRedis

Overview

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.

Features

  • 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.

Installation

Prerequisites

Ensure you have the following installed:

  • CMake (for project configuration)
  • GCC/Clang (for compiling C++ code)
  • Make (or an equivalent build tool)

Build Instructions

# 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
make

Usage

Run the server:

./Server

Example Commands

  • 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

Performance Optimizations

  • Lock-free structures where possible to minimize contention.
  • Efficient memory management using pools and custom allocators.
  • Batch processing support for handling multiple requests efficiently.

Roadmap

  • Implement replication support.
  • Add persistence for durable storage.
  • Improve clustering capabilities.

Contributions

Contributions are welcome! Please follow the standard GitHub workflow:

  1. Fork the repository.
  2. Create a new branch (feature-xyz).
  3. Commit and push your changes.
  4. Submit a Pull Request.

License

This project is licensed under the MIT License. See LICENSE for details.

Contact

For questions, feel free to open an issue or reach out to hamees.ehsan@gmail.com.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published