Bullpen is a very simple, but configurable Worker Queue based on ZeroMQ. It allows multiple Workers to be connected to a single Server, which itself can be connected to by multiple clients. It creates a ZeroMQ network that looks something like this drawing below.
+-----------+
| Worker |
|-----------|
| REP | PUB |
+-----+-----+ { ... $n workers }
^ ^
| |
| +--------+
+-------+ |
| |
v v
+------------------+
| XREQ | SUB,{...} |
|------------------|
| Server |
|------------------|
| XREP | PUB |
+---------+--------+
^ ^
| |
+--------+ |
| +------------+
| |
v v
+-----+-----+
| REQ | SUB |
|-----------|
| Client |
+-----------+ { ... $n clients }
Note that we use the java.util.logging package for this, so you can configure the logging output as needed. There is an example .properties file in the conf/logging/ directory. Just pass in the value on the command line like this:
java -Djava.util.logging.config.file=my-logging.properties ...
The name of this module (a set of workers that publish things through a central hub to subscribers on the other end) is taken from the infamous Bullpen of Marvel Comics.
See the README.md in the lib/ directory, but basically we depend on ZeroMQ and JSON-Simple.
Copyright (C) 2011 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl (Artistic License).