#lockfree #lock #zeromq #datastore #tiny #super #run #free #pub-sub #replacement

app zedis

A little brokerless persisted lockfree datastore. 7 commands, super simple

2 releases

โœ“ Uses Rust 2018 edition

0.1.102 Sep 25, 2019
0.1.101 Sep 24, 2019

44 downloads per month

Apache-2.0 and MPL-2.0 licenses

450 lines



A lightweight zeromq and seld based replacement for Redis. <90 LOC focused on a portable cross language simple storage system. No need to run a full service.


Recommended Install

This will always fetch and build the most recent version of zedis for your computer. If you don't have cargo checkout https://www.rust-lang.org/tools/install

cargo install zedis

Not supporting apt and homebrew anymore, too many places to update.

Run ๐Ÿ‘

#	   _______ ___ ___ ___ 
#	  |_  / __|   \_ _/ __|
#	   / /| _|| |) | |\__ \ 
#	  /___|___|___/___|___/ 

Zedis is opinionated and limited. With ZEDIS you can only READ and WRITE key values pairs. All writes overwrite past values.

Really Fast reads < 250ยตs for ~2 MB json payload.

Pretty Fast writes < 18ms for ~2 MB json payload.

Setting Port

Now you can set the port/socket that zedis will be available on. If no port is specified zedis will fallback on 5555

zedis 6677

Interacting with CLI app

get zedis cli Logo


Get values

GET key

Return the string values of the key. Returns b'Error occurred: InvalidKey' if key does not exist

Set values

SET key value

Insert a key value. If the key already exists the value will be overwritten.

Remove values

DEL key

Delete a key and it's value from zedis. This will also return the last known value of the key.

Show keys


This retrns a JSON format list of all of the keys. This is ineffiecent, it iterates through the whole DB and then concats the key names togther. Do not use if you have more than 1000 keys if you want instant results.


PRE keyprefix

Returns all keys with that prefix. So "A" will return "Alpha", "Awesome"... this is case sensitive.

Python3 client example

import zmq
import json

port = "5555"

context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:%s" % port)

socket.send_string("SET david richard blyn holtz");socket.recv()
# 'done.'

socket._string("GET david");socket.recv()
# 'richard blyn holtz'

jsonblob = json.dumps({"example": "you can store seralized JSON"})
socket.send_string("SET js "+jsonblob);socket.recv()
# 'done.'

socket.send_string("GET js")
# {u'exmple': u'lorem ipsum...'}

socket.send_string("DEL js");socket.recv();socket.recv()
# b'2 yo yo'

for x in range(0, 100):
    socket.send_string("SET "+str(x)+" "+str(x)+" yo yo")

socket.send_string("PRE 1");socket.recv()
# b'["1", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]'

# b'["0", "1", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"]'

Check alive

nc -v -z -w 5 localhost 5555
# found 0 associations
# found 1 connections:
#      1:	flags=82<CONNECTED,PREFERRED>
# 	outif lo0
# 	src port 52227
# 	dst port 5555
# 	rank info not available
# 	TCP aux info available

# Connection to localhost port 5555 [tcp/personal-agent] succeeded!

๐Ÿฆ€ 01010 Developer Stuff

Build it

Clone, build and add a symlink so you can access zedis in the cli

git clone https://github.com/drbh/zedis.git && cd zedis
cargo build --release && sh install.sh 


fpm -f -s dir -t deb -n zedis target/release/zedis=/usr/local/


~513K SLoC