[zeromq-dev] Important: backward incompatible changes for 0MQ/3.0!

Pieter Hintjens ph at imatix.com
Tue Mar 22 17:03:43 CET 2011


On Tue, Mar 22, 2011 at 3:56 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> 1. Mimic UDP, ie. recv into undersized buffer truncates the message,
> however, there's MSG_PEEK flag, which allows you not to consume the message.
> That allows you to check the size of the message in advance, allocate the
> buffer and read it afterwards.

Both options are horrid, IMO, and not compatible with the notion of
building a better, (simpler?) API.

> 2. Mimic SCTP's partial delivery. Read data into buffer, check whether EOR
> was reached. If not read more data etc.

Better... allows chunking of large messages. But it still means copying data.

The risk I see here is that the native (non-POSIX) API may be more
efficient and simpler, which means people won't use the POSIX API.

If SCTP can define their own API semantics, I'd argue 0MQ can also do so.

-Pieter



More information about the zeromq-dev mailing list