[zeromq-dev] RFC:5/ZDCF work

john skaller skaller at users.sourceforge.net
Thu Feb 9 16:39:46 CET 2012

On 10/02/2012, at 1:53 AM, Ian Barber wrote:

> 1) "devices" are quite an important bit of terminology when it comes to understanding how to build larger zeromq systems. Even though the previously shipped devices were very simple, the general idea of a simple intermediary is an important one.

I agree, I'm actually a bit confused why they were dropped.

I am guessing because there was only one in the library?

> 2) 3.1 is still not the stable release, and even when it is many bindings will still have devices instantly available. 

You're right. Should some work be done on making some devices and putting them back in?
Perhaps a separate header file, maybe even a separate library.

Someone told me they're easy to implement, so not needed.
Actually, I copied the implementation from the old code to create one.
That device was the simple connection one, and whilst the code is
relatively simple, it is still not a two liner. It's enough that one could
easily get it wrong.

IMHO, the biggest problem with devices is that you're not coding them
for Felix :) :)

What I mean is: a device is a loop that uses polling and reads and writes
sockets. The problem is, how to use many devices.  In theory, to make them
separate you have to give each one its own pthread. If you're willing
to manually schedule them, you can make an array, make the device
loop exit when there's no data, and run around the devices trying them
one after the other: a list of callbacks.

Both techniques are gross! In Felix, which is specifically designed
for exactly the "chips and wires" structure, each device would be
a fibre, and the system scheduler would take care of the polling

So the real problem with devices is that to use them you need
a framework including a scheduler and integrated event driven
operation. This is a whole level higher than 0MQ, and the result
is no longer really a library (frameworks are anti-libraries :)

Hmm ...

john skaller
skaller at users.sourceforge.net

More information about the zeromq-dev mailing list