public
Description: Toy in-memory queue server using Facebook's Thrift protocol/RPC generator
Homepage:
Clone URL: git://github.com/myelin/simple-thrift-queue.git
myelin (author)
Mon Aug 04 03:06:02 -0700 2008
commit  2d5b46e9a73b3ccba5ef094babf9c3aafac780c7
tree    47f24d66a9ce25254871e04150e3f824d906c505
parent  0fc0ccd2e30326bd6a82e78f62f77dec9815c0ed
name age message
file .gitignore Sun Aug 03 23:51:37 -0700 2008 first rough hack - 3.5k pushes per second [myelin]
file README Mon Aug 04 02:44:04 -0700 2008 added server in c++ [myelin]
directory src/ Mon Aug 04 03:06:02 -0700 2008 added a 'clean' option to the root Makefile [myelin]
simple-thrift-queue
===================
  Phillip Pearson
  http://www.myelin.co.nz/post/2008/8/4/#200808043

This is a toy in-memory (very much non-durable) queue, with a client
and server in Python and a server in C++ -- the results of an
evening's hacking with Facebook's Thrift protocol/RPC generator.

On my laptop it handles about 4000 RPCs per second, i.e. if you have
one producer and three consumers, the producer can push about 2000
messages per second, which are fairly evenly spread across the
consumers.

The throughput is almost identical with the C++ server.  'top' reports
~80% system time and 'iftop' reports ~300kB/s traffic.  

Requirements
============

- Thrift
- Python

Building and running
====================

cd src
make
python py/server.py
python py/timer.py
python py/consumer.py
python py/producer.py

Try starting the server and a few consumers, then a producer.

C++ server
===========

cd src/cpp
make run