Overview

Opatomic is a crash-safe persistent data structure server. It allows multiple clients to efficiently access and modify data at the same time using a network connection. It is similar to Redis.

Opatomic has been designed to overcome some limitations of Redis without sacrificing the simplicity and joy of using Redis. It will perform best if data access is not random.

Opatomic has bugs and will corrupt or lose your data. It will crash, it will leak memory. Some important features have not been implemented. Over time, the server should stabilize and become more reliable. However, you should not plan to use Opatomic if:

Contact Info:

Download

Latest release

Installation

There is no installation provided. Simply run the "opad" binary and your database will be stored in the current directory.

Running

./opad

To see a list of all arg options, run

./opad --help

Administration

An open source admin tool has been included. Run the server with extra args:

./opad --wsport 8080

Open a web browser to http://localhost:8080. On the webpage, use host ws://localhost:8080 and click the connect button. Your web browser will communicate with the opatomic server via websockets.

Clients

Several open source client libraries are available to connect to the database.

Implementation details

Concepts

Comparison with Redis

Major improvements over Redis

Problems with Redis

Speed

Opatomic may be slower than Redis for some ops. This is unavoidable because all data is sorted in Opatomic. However, the speed difference is often not very much.

Very simple benchmark results on a dev machine (Intel i3 dual core 2.6Ghz; 8GB ram; Linux 5.0.0-23-generic):

$ ./redis-server --version
Redis server v=5.0.5 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=624ff421d708d69b
$ ./redis-benchmark -q -r 50000
PING_INLINE: 75414.78 requests per second
PING_BULK: 75414.78 requests per second
SET: 76452.60 requests per second
GET: 75700.23 requests per second
INCR: 76219.51 requests per second
LPUSH: 74460.16 requests per second
RPUSH: 77821.02 requests per second
LPOP: 73046.02 requests per second
RPOP: 78369.91 requests per second
SADD: 71275.84 requests per second
HSET: 77760.50 requests per second
SPOP: 77881.62 requests per second
LPUSH (needed to benchmark LRANGE): 78308.54 requests per second
LRANGE_100 (first 100 elements): 44782.80 requests per second
LRANGE_300 (first 300 elements): 14823.60 requests per second
LRANGE_500 (first 450 elements): 11515.43 requests per second
LRANGE_600 (first 600 elements): 8499.79 requests per second
MSET (10 keys): 67567.57 requests per second


# run opad single threaded and pinned to cpu 0:
$ ./opad --cpua 0 --allowResp 1
# benchmark with no pipelining:
$ ./redis-benchmark -q -p 4567 -r 50000
PING_INLINE: 78926.60 requests per second
PING_BULK: 75987.84 requests per second
SET: 79808.46 requests per second
GET: 79365.08 requests per second
INCR: 71839.09 requests per second
LPUSH: 80645.16 requests per second
RPUSH: 81037.28 requests per second
LPOP: 80385.85 requests per second
RPOP: 80256.82 requests per second
SADD: 80515.30 requests per second
HSET: 58823.53 requests per second
SPOP: 78554.59 requests per second
LPUSH (needed to benchmark LRANGE): 80645.16 requests per second
LRANGE_100 (first 100 elements): 34626.04 requests per second
LRANGE_300 (first 300 elements): 16852.04 requests per second
LRANGE_500 (first 450 elements): 8992.00 requests per second
LRANGE_600 (first 600 elements): 6756.76 requests per second
MSET (10 keys): 24485.80 requests per second

notes about these results:

  1. These ops are testing random access which will be slower for Opatomic.
  2. Opatomic is at a disadvantage because every op must be translated between Redis/RESP types and Opatomic supported data/types.
  3. The Opatomic results are using redis-benchmark which uses the RESP protocol and is slower when an iterator is returned (ie, LRANGE). This is because the RESP protocol requires an array length, which forces Opatomic to serialize the iterator to memory to count the number of elements before sending the result back to the client.
  4. Pipelining isn't used which would improve results for both systems
  5. The last test (MSET of 10 random keys) illustrates the speed difference for random ops. Setting 10 random keys in Opatomic is definitely slower than Redis.

Major features missing but planned

Other missing features (may be implemented eventually)

Missing features that are unlikely to be added