[zeromq-dev] Pub/Sub anchoring/keyframing and administrative layers in general

Oliver Smith oliver at kfs.org
Sun Jul 25 07:57:20 CEST 2010


While refactoring a data-streaming subsystem today, I realized that 
using ZeroMQ with pub/sub would save me having to repeat the 
distribution process across a whole chain of processes.

With the exception that, at some point, the listeners need to obtain the 
base state.

In video-streaming terms, I guess you would call this keyframing or keying.

Example:

   socket_t outSocket(ctx, ZMQ_SUB) ;
   zmq_connect(outSocket, publisher) ;
   zmq_setsockopt(outSocket, ZMQ_KEYFRAMING, _keyFrameReceiverCallback) ;
   zmq_setsockopt(outSocket, ZMQ_SUBSCRIBE. subscription) ;

The keyframing option automatically sends an out-of-band message to the 
publisher which tells it to send a response with the last keyframe, 
which is then processed by the receiver callback.

Aware of Martin's comments regarding separate administrative layers, I'm 
just wondering if anyone has already created something like this?

Or if not, what the ZeroMQ devs would recommend as a reusable approach 
for implementing this in a 0MQ-contributable fashion?

A device?

If so, I'm already thinking - given Brian Grainger's questions - that it 
might be worth looking at a coherent infrastructure for user-extended 
devices. Such that any well-implemented re-usable layers could be 
contributed into the ZeroMQ source and then combined as needed into 
custom devices by end users.

- Oliver





More information about the zeromq-dev mailing list