What are the alternatives to ZeroMQ for moving protocol buffer payloads around?

mahonya picture mahonya · Apr 14, 2012 · Viewed 13.4k times · Source

At the moment I have a solution that uses ZeroMQ to exchange protocol buffer payloads. The protocol buffer method of serialization is bound to stay as it is, but I can replace ZMQ with a more convenient option. The things I am not happy about in ZMQ are:

It uses JNI on the Java side,and I've been bitten before by JNI, in complex, multi thread scenarios. I try to eliminate it whenever I can.

I don't need queuing, I just need rpc.

My requirements (which are mostly covered by ZeroMQ) are:

  • Support for 32/64 bit *nix, Windows, MacOS.

  • Support for Java, C++ and C# primarily, and Python, Ruby etc. would be nice.

  • Language support must be provided by native implementations in the language, not via wrapping native code.

  • High performance.

  • Non Viral license, no GPL, AGPL etc.

  • I've been thinking about using Thrift as the transport layer over TCP (I guess it supports that) with protocol buffers payloads, if its Java implementation for messaging is not using JNI.

What options can you think of other than ZMQ for this setup?

Answer

Bertil Chapuis picture Bertil Chapuis · Apr 15, 2012

You should probably have a look at Netty. It's a high performance Java NIO server framework with built-in support for Protocol Buffer which is released under the terms of the Apache License. The framework is well documented and some examples show how to prototype protocols with Protocol Buffers.