[zeromq-dev] Right tool for combining Erlang and Ruby processes?
Matt Connolly
matt.connolly at me.com
Sat Dec 7 05:34:08 CET 2013
Different languages can communicate via ZeroMQ very well. I actually think it’s a great strength of this community is that there are so many bindings available.
My recent use case was using Ruby with the rbczmq gem (to which I contribute) and NetMQ in C#. This has worked perfectly so far. The only catch between them is what string encodings you use as a zmq message payload is simply an array of bytes.
I’ve also found it quite easy using JSON as a serialisation format because it is (a) widely available, (b) extensible. It turns out this is also useful for message validation - it’s not too hard to deliver garbage input to your application, for example: https://github.com/zeromq/libzmq/issues/769#issuecomment-29613527
For ruby, the rbczmq library is based on the czmq C library, and so it has some extra features which that library provides (e.g. beacon, loop, message & frame objects). It’s also a native C extension, which makes it faster than the ffi-based counterpart, but not compatibly with JRuby on the other hand.
https://github.com/methodmissing/rbczmq
Regards,
Matt
On 7 Dec 2013, at 12:28 pm, gvim <gvimrc at gmail.com> wrote:
> I'm new to ZeroMQ and looking for a way to combine 2 programming
> languages for web development. Basically, I've been converted to
> Elixir/Erlang for most web development tasks due to its concurrency and
> fault-tolerance. However, Ruby is much better for text processing so I
> want to be able to call a Ruby daemon from Erlang for the text
> processing bits. Is this where ZeroMQ facillitates interoperability?
>
> gvim
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list