The Latest State of Perl ZMQ Bindings
I just uploaded the latest batch of zeromq (libzmq) bindings for Perl. They will eventually replace the current binding, ZeroMQ.pm. It's a big refactor, but it's one that will allow me to provide a far more stable bindings.
Note: they are still all dev releases, so will not show up by default in your CPAN client.
If you have comments, please speak up now!
WTF is 0MQ/ZMQ/ZeroMQ ?
Read it here. It's a fairly complicated library, one that allows for a fairly complex networking framework with ease. One thing that people often get confused is that it's not a "message queue" a.la RabbitMQ/ActiveMQ/Q4M. It's a "message oriented" networking framework.
Rationale For Making All This Change
- I had been asked to rename the bindings to "zmq" something by the maintainers of libzmq, so a rename was bound to happen
- Following up with the incompatible changes between the various libzmq versions was /really/ hard. I really wanted to separate out libzmq2 and libzmq3 out
- Constants kept appearing and disappearing, therefore auto-generating these caused great havoc. I need a static list of constants.
- The original interface provided by ZeroMQ sucked ( I can't remember now, but it's probably my fault ). Some functions threw exceptions, some functions returned error codes. This needed to be cleaned up
The main repository is now at p5-ZMQ. All of the related modules that I control are now in this repo.
LibZMQ2 and LibZMQ3 - The Raw Bindings
Now the "raw" bindings are named ZMQ-LibZMQ2 and ZMQ-LibZMQ3. Their task is simple: to provide an as-close-as-possible one-to-one mapping to libzmq's interface. There are small exceptions, but now almost all of the functions should accept and return values that the underlying libzmq promises to accept and return. I took care of some corner cases where $! wasn't properly set, too, so you should be able to expect this to work like libzmq as well. These modules supercede ZeroMQ::Raw.
ZMQ::Constants has been ripped apart from the main binding, because I wanted a consistent list of constants that doesn't rely on the underlying version of libzmq the binding was compiled with.
ZeroMQ.pm used to provide a Perl-ish interface, but that also relied heavily on the underlying libzmq version. Now we have a pure Perl wrapper around LibZMQ2 and LibZMQ3 that makes calls to the Perl bindings: ZMQ.pm
I think the JSON serializer was a cool idea, but I ripped it apart so that only the hooks are in the ZMQ distribution.
There's also an experimental CZMQ (http://czmq.zeromq.org) wrapper. I haven't quite tested this, and I currently don't plan to use it. If you are interested, I'd greatly appreciate test cases. Please see ZMQ-CZMQ