Skip to content

Commit

Permalink
add hacked memcacheq
Browse files Browse the repository at this point in the history
  • Loading branch information
xunxin committed May 7, 2009
0 parents commit 3888b56
Show file tree
Hide file tree
Showing 27 changed files with 15,619 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
@@ -0,0 +1 @@
Steve Chu <stvchu@gmail.com>
22 changes: 22 additions & 0 deletions ChangeLog
@@ -0,0 +1,22 @@
2008-11-25 Steve Chu <stvchu@gmail.com>
* version 0.1.1 is released.

2008-11-25 Steve Chu <stvchu@gmail.com>
* Bugfix: 'stats queue' did not return right queue name
* All replication code has been discarded and removed. Original replication
code is buggy, also nobody want to use replication on a message queue system.
* more graceful exit

2008-09-19 Steve Chu <stvchu@gmail.com>
* version 0.1.0 is released.

2008-09-19 Steve Chu <stvchu@gmail.com>
* All code is rewritten based on latest memcachedb, and multiple queue is supported.
Please see 'README.html' for usage.

2008-03-17 Steve Chu <stvchu@gmail.com>
* add a '-A' option to set page size

2008-03-15 Steve Chu <stvchu@gmail.com>
* version 0.0.1 is released.

64 changes: 64 additions & 0 deletions INSTALL
@@ -0,0 +1,64 @@
Dependencies
============
Before deploying MemcacheQ, make sure that following packages have been installed:

Berkeley DB 4.7 or later
-------------------------

Download from <http://www.oracle.com/database/berkeley-db/db/index.html>

How to install BerkekeyDB::

$tar xvzf db-4.7.25.tar.gz
$cd db-4.7.25/
$cd build_unix/
$../dist/configure
$make
$sudo make install


libevent 1.4.x or later
-----------------------

Download from <http://monkey.org/~provos/libevent/>

How to install libevent::

$tar xvzf libevent-1.4.x-stable.tar.gz
$cd libevent-1.4.x-stable
$./configure
$make
$sudo make install

On a linux, load .so file by add two line in /etc/ld.so.conf::

/usr/local/lib
/usr/local/BerkeleyDB.4.7/lib

Then, run 'ldconfig'.

Building MemcacheQ
==================

On a \*nix, just following::

$tar xvzf memcacheq-0.1.x.tar.gz
$cd memcacheq-0.1.x
$./configure --enable-threads
$make
$sudo make install

Start the daemon
================

For example::

memcacheq -d -r -H /data1/memcacheq -N -v -L 1024 -B 1024 > /data1/mq_error.log 2>&1

Notice: Because MemcacheQ is using fixed-length storage, so you should use '-B' option to specify the max length of your message. Default is 1024 bytes. Any message that shorter than the length you specified will be padded with '0x20', the space character. A message includes following bytes::

<your queue name bytes> + <message metadata(9 ~ 20+ bytes)> + <your message body bytes>

use "-h" option to see more configures.

Have fun :)

0 comments on commit 3888b56

Please sign in to comment.