[zeromq-dev] ZMQ_FLAT_PULL feature discussion

Daniel Krikun krikun.daniel at gmail.com
Fri Jun 7 11:53:48 CEST 2013


Hi all,

I have a setup, where a server does graphics rendering based on client
requests, that is, clients send geometric data (position, orientation,
etc.) and the server runs in cycles: process incoming messages and do
some rendering.
Occasionally, the clients might be faster and few messages get
themselves queued on the server queue. However, only the most recent
message is of interest as the server does not renders the objects as
they were a couple of cycles before.

To solve the problem, I have extended the ZMQ_ROUTER socket (via
subclassing) so that it has a background thread that empties the
socket message queue and stores the last message. The message is
stored in a double-buffer (one for each client, this is why I need a
router socket type). Then, when the server calls recv() on my extended
socket, it gets one of the stored messages (if there are any).

I ask myself whether some similar functionality should be put inside
zeromq (say, under ZMQ_FLAT_PULL socket type), left as is in a "user
space" or maybe I should use UDP instead?


Thank you,

--
Daniel Krikun



More information about the zeromq-dev mailing list