Darner is a very simple message queue server. Unlike in-memory servers such as redis, Darner is designed to handle queues much larger than what can be held in RAM. And unlike enterprise queue servers such as RabbitMQ, Darner keeps all messages out of process, relying instead on the kernel's virtual memory manager via log-structured storage.
The result is a durable queue server that uses a small amount of in-resident memory regardless of queue size, while still achieving remarkable performance.
Darner is based on Robey Pointer's Kestrel simple, distributed message queue. Like Kestrel, Darner follows the "No talking! Shhh!" approach to distributed queues: A single Darner server has a set of queues identified by name. Each queue is a strictly-ordered FIFO, and querying from a fleet of Darner servers provides a loosely-ordered queue. Darner also supports Kestrel's two-phase reliable fetch: if a client disconnects before confirming it handled a message, the message will be handed to the next client.
Compared to Kestrel, Darner boasts much higher throughput, better concurrency, an order of magnitude better tp99, and uses an order of magnitude less memory. But Darner has less configuration, and far fewer features than Kestrel. Check out the benchmarks!
sudo apt-get install -y build-essential cmake libboost-all-dev libsnappy-dev wget https://leveldb.googlecode.com/files/leveldb-1.5.0.tar.gz tar xvzf leveldb-1.5.0.tar.gz && cd leveldb make sudo mv libleveldb.* /usr/local/lib/ && sudo chown root:root /usr/local/lib/libleveldb.* cd ..
Then you can fetch and install Darner:
git clone email@example.com:wavii/darner.git cd darner cmake . && make && sudo make install
Make a directory for Darner to store its queues, say
/var/spool/darner/, then run Darner like so.
vagrant@ubuntu-oneiric:~/workspace/darner$ ./darner -d /var/spool/darner/ [INFO] 2012-Aug-13 03:59:41.047739: darner: queue server [INFO] 2012-Aug-13 03:59:41.048051: build: Aug 12 2012 (22:24:28) v0.0.1 (c) Wavii, Inc. [INFO] 2012-Aug-13 03:59:41.048132: listening on port: 22133 [INFO] 2012-Aug-13 03:59:41.048507: data dir: /var/spool/darner/ [INFO] 2012-Aug-13 03:59:41.048798: starting up
Voila! By default, Darner listens on port 22133.
Darner follows the same protocol as Kestrel, which is the memcache protocol.
Currently missing from the Darner implementation but TODO:
DELETE, and some stats.