foobar_db

Crates.iofoobar_db
lib.rsfoobar_db
version0.0.1
sourcesrc
created_at2024-11-30 15:06:31.089691
updated_at2024-11-30 15:06:31.089691
descriptionFoobarDB is an in-memory database implemented in Rust that supports the RESP protocol.
homepage
repositoryhttps://github.com/daydaydrunk/foobar_db
max_upload_size
id1466698
size142,612
HanLin (daydaydrunk)

documentation

https://docs.rs/stream_resp/latest/foobar_db/

README

███████╗ ██████╗  ██████╗ ██████╗  █████╗ ██████╗     ██████╗ ██████╗ 
██╔════╝██╔═══██╗██╔═══██╗██╔══██╗██╔══██╗██╔══██╗    ██╔══██╗██╔══██╗
█████╗  ██║   ██║██║   ██║██████╔╝███████║██████╔╝    ██║  ██║██████╔╝
██╔══╝  ██║   ██║██║   ██║██╔══██╗██╔══██║██╔══██╗    ██║  ██║██╔══██╗
██║     ╚██████╔╝╚██████╔╝██████╔╝██║  ██║██║  ██║    ██████╔╝██████╔╝
╚═╝      ╚═════╝  ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝    ╚═════╝ ╚═════╝ 

foobarDB

FoobarDB is an in-memory database implemented in Rust that supports the RESP V3 protocol. This project is for learning and research purposes. I aim to familiarize myself with Rust coding by implementing an in-memory database.

Features

  • Supports RESP protocol
  • Supports common Redis commands
  • High performance and low latency
  • Supports asynchronous operations

Prerequisites

  • Rust 1.82.0
  • Cargo package manager

Clone the repository

git clone https://github.com/yourusername/foobardb.git
cd foobardb

Build the project

cargo build --release

Usage

Start the server

cargo run --release --bin foobar_db

Client example

You can use any client that supports the RESP protocol to interact with FoobarDB. Here is a simple example using redis-cli to connect to FoobarDB:

redis-cli -h 127.0.0.1 -p 6379

In redis-cli, you can execute the following commands:

SET foo bar
GET foo
DEL foo

Contributing

We welcome contributions! Please follow these steps:

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

FoobarDB is licensed under the MIT License. For more information, please see the LICENSE file.

Authors

References

Commit count: 19

cargo fmt