[zeromq-dev] [NEWS] zapi/1.1.0 released
Pieter Hintjens
ph at imatix.com
Thu Mar 24 09:26:16 CET 2011
On Thu, Mar 24, 2011 at 7:31 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 03/24/2011 12:24 AM, Pieter Hintjens wrote:
>
>> Next stage is to migrate the Guide C examples onto zapi, except for a
>> few basic ones to show the 0MQ core API.
>
> Don't migrate, translate, please.
That's a neat idea except it assumes the current C examples use the
core libzmq API, which they haven't done for ages, except for the
really simplest ones.
The C examples are based on an ad-hoc API (zhelpers, zmsg, etc.) which
formed the basis for the new zapi API. So it's cleaner and less
surprising to use zapi instead of this ad-hoc API.
At the same time if you want to translate some of these examples back
to using only the low-level core API, go for it. It's doable for some,
but many are impossible without some higher-level APIs. Those you
could translate will become huge, because the core API needs lots of
LoC to work with messages.
Further, the current C examples are not portable, they e.g. use POSIX
threads and thus don't build on Windows. With zapi that problem
disappears, it includes a thread API.
-Pieter
More information about the zeromq-dev
mailing list