Rustis is a Rust-based implementation of a subset of Redis's functionality. It provides an executable that can be used to start a server or issue commands to a server as a client.
You can install Rustis by downloading this repository, then running the following:
cargo install --path .
This will install the rustis
binary on your PATH
Right now there are two core services implemented in Rustis's client and server:
- Publisher / Subscriber
- Key / value storage
The Rustis server listens for TCP connections and parses/validates the packets they send into commands. It uses a pool of threads to handle TCP connections and another pool of threads to handle the publisher/subscriber logic.
To start a server that clients can send commands to, run the following:
rustis server
Rustis binds to 127.0.0.1:7878
by default, but you can also specify a host and/or port:
rustis server --host 0.0.0.0 --port 3000
All client
commands assume the Rustis server is listening on 127.0.0.1:7878
but you can also specify a host and/or port:
rustis client --host 0.0.0.0 --port 3000 <client command here>
rustis client publish 'channel' 'message'
rustis client subscribe 'channel'
rustis client set 'key' 'value'
rustis client setex 'key' <ttl in seconds> 'value'
rustis client get 'key'
rustis client ttl 'key'