March 2012 Archives

The YAPC::Asia Tokyo 2012 Venue Is ...

Moving out from our beloved Tokyo Institute Of Technology, YAPC::Asia Tokyo 2012 is going to be held at a new location: Ito International Research Center, in University Of Tokyo.

This is a brand new facility that opens come April 1st 2012, and us Perl hackers are going to take over the place September 27, 28, 29.

This year we're inviting Tim Bunce, Adam Kennedy, and Larry Wall to the festivities. And as always, I'm sure we're going to have many many …

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, 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" RabbitMQ/ActiveMQ/Q4M. It's a "message oriented" networking framework.

Mongrel2 is a good real-life use case. While I haven't actually seen the code, I hear that dotCloud also builds their auto-deploy infrastructure around ZMQ.

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.

Perl-ish Interface 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:

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 ( 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

About lestrrat

user-pic Japan Perl Association director; Livedoor, Inc; Tokyo, Japan