[zeromq-dev] finding the right message pattern

Paul Colomiets paul at colomiets.name
Wed Sep 12 23:59:26 CEST 2012

Hi David,

On Tue, Sep 11, 2012 at 3:21 PM, David Kaufman <david.kaufman at gmx.de> wrote:
> Hi ZeroMQ Community,
> I'm currently working on a small project where multiple machines
> output data from a recording device (e.g. audio data). Note that a
> recording device is just another zeromq capable client. A master
> machine collects the output of each recording device. The recording
> device is selected, initiated and stopped by the master machine. To
> sum up, the master has to communicate with each recording devices in a
> bidirectional fashion.
> The request/replay message pattern works but produces unnecessary
> overhead since the master machine hast to reply to every data packet
> the recording device sends. Is there a cleaner solution, perhaps a
> paired socket? Do you have any suggestions?

Countrary to other proposal I advice to use two patterns:

1. PUB-SUB for recording, where recording device is publisher and
master is subscriber
2. Either ROUTER to REP or PUB-SUB (where master is a publisher) for
control info

It looks like more clean design and allows you to scale by having
failover/redundant master servers, introducing devices (proxies) and
so on.


More information about the zeromq-dev mailing list