simonewebdesign / red

🔴 Fast key-value storage inspired by Redis

Home Page:https://simonewebdesign.github.io/red/red/struct.State.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🔴 Red Build Status

Fast, reliable key-value storage. Inspired by Redis, built with Rust.

Red has a similar interface to Redis. It has two executables:

  • red - an interactive shell (like redis-cli)
  • red-server - a TCP server (like redis-server)

The shell is a REPL: it expects you to enter one command at a time.

The server, on the other hand, can handle multiple connections and multiple commands per connection. Commands must be separated by a newline and will be processed in a single step, as soon as EOF is reached. Replies are queued and will also be sent together.

Commands

Full documentation can be found here. List of supported commands:

GET key

Get the value of key. If the key does not exist the special value nil is returned.

SADD member

Add the member to the set. If the member is already in the set, it will be ignored.

SET key value

Set key to hold the string value. If key already holds a value, it is overwritten.

SMEMBERS

Returns all the members of the set.

SREM member

Remove the specified member from the set. If the member is not in the set, it will be ignored.

Installation

TODO: add crate

Compile from source

Clone the repo, then compile the project with:

rustc src/main.rs -o red  # Compile the CLI
rustc src/server.rs -o red-server  # Compile the TCP server

Alternatively, you can start an interactive shell with:

cargo run

Generate docs with:

cargo doc

About

🔴 Fast key-value storage inspired by Redis

https://simonewebdesign.github.io/red/red/struct.State.html

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Rust 84.6%Language:Shell 15.4%