[nanomsg] Re: Nanomsg and ZMQ

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: <nanomsg@xxxxxxxxxxxxx>
  • Date: Wed, 03 Apr 2013 10:51:45 +0200

Hi Alan,

Do you have any plans to introduce any kind of compatibility layer for zmq in the future? Or do the protocols diverge so much that it's untenable?

I think it's technically doable. nanomsg has pluggable transports (see the API here: https://github.com/250bpm/nanomsg/blob/master/src/transport.h) so adding a new one is not that big a problem. Say zmq://, which would emulate 0MQ's TCP wire format.

The transport would have to re-shuffle the header fields of the messages so that the layers on top of it are fooled to believe that the layering is done in the correct order.

That being said, there are nanomsg features that don't exist in 0MQ (such as new messaging patterns, or new types of subscriptions) which won't be accessible from 0MQ peers. Also, 0MQ features that were deprecated in nanomsg (e.h. ZMQ_IDENTITY) won't be accessible from nanomsg peers.

If anyone is interested in implementing this kind of transport, I'd be happy to provide advice and help in general.

Martin

Other related posts: