Live data from Hacker News

ØMQ – The Guide (2011)

zguide.zeromq.org

21–30 of 117 posts

Re: ØMQ – The Guide (2011)

#21
I looked at zeromq, but it seemed like it had very bad debug-ability and visibility into internal operations. Their FAQ [0] says things like:

> How do I determine how many messages are in queue?

> This isn't possible. [...] rather than provide incorrect information the library avoids providing any view into this data.

> How can I retrieve a list of all connected peers?

> This is not supported.

Those kinds of decisions are very scary for production environment. We've had to debug network connectivity problems before, and it just possible what all the interfaces Linux kernel provides. I cannot imagine doing it with library which hides stuff from you on purpose.

[0] http://wiki.zeromq.org/area:faq

Re: ØMQ – The Guide (2011)

#22
post #13

what I'm wondering is: we have https://xkcd.com/927/ with sockets in frame 1, and zeromq in frame 3 Are there some clear wins of zeromq over sockets/udp/tcp?

I've used ZeroMQ lightly as a socket-replacement and for simple IPC and I'd say the key thing it solved was connection establishment. It turns out that opening a two way connection between two apps on the same network without a clear starting order can go wrong in many ways and become quite messy to get right. With ZeroMQ it more or less just magically worked and it allowed me to focus on the actual problem I was working on.

The wide range of language support was also nice. It allowed me to test the interface using a Python notebook which came in handy for debugging.

Re: ØMQ – The Guide (2011)

#23
post #3

I have a feeling that ØMQ is a very good thing, but all these years I have never managed to understand what it is and what problem does it solve.

You can think of ZeroMQ as legos for building message queue-based messaging systems. ZeroMQ gives you different pieces - pushers, pullers, publishers, subscribers, routers, etc. and it's up to you to then hook them up in different ways to create the system you want. The guide gives you some different ideas of how to hook up the different pieces for common use cases, but there's nothing stopping you from building a custom one.

ZeroMQ is not an out-of-the-box MQ solution. It takes some work to understand and build a functional MQ solution with ZeroMQ. If you want something that works out of the box I recommend RabbitMQ.

Re: ØMQ – The Guide (2011)

#24
post #3

I have a feeling that ØMQ is a very good thing, but all these years I have never managed to understand what it is and what problem does it solve.

For internal machine-to-machine communications you can replace your full blown HTTP server + JSON inefficencies with a simple ZMQ request/reply + binary serialisation format.

It also allows one machine to broadcast a message to a 'topic' that other machines listen for.

Many other things. It's not perfect, but it Just Works.

Re: ØMQ – The Guide (2011)

#25
post #21

I looked at zeromq, but it seemed like it had very bad debug-ability and visibility into internal operations. Their FAQ [0] says things like: > How do I determine how many messages are in queue? > This isn't possible. [...] rather than provide incorrect information the library avoids providing any view into this data. > How can I retrieve a list of all connected peers? > This is not supported. Those kinds of decision…

I guess this is fair criticism given the FAQ, but many features have been added over time.

Setting up a monitor socket allows you to observe pretty much any event you could care about, like peer connect/disconnect/errors, etc.

There is also a draft feature to access the number of queued incoming/outgoing messages (see https://github.com/zeromq/libzmq/blob/master/doc/zmq_socket_... for details).

Re: ØMQ – The Guide (2011)

#26
In 2015, in one project one "clever" co-worker decided to use "zeromq" in project where is the guarantee of delivery was must. I think that because he wanted to attach this technology as fancy stuff in his cv. Later he left and we had to rewrite message sending and converted to basic http.

Re: ØMQ – The Guide (2011)

#27
post #21

I looked at zeromq, but it seemed like it had very bad debug-ability and visibility into internal operations. Their FAQ [0] says things like: > How do I determine how many messages are in queue? > This isn't possible. [...] rather than provide incorrect information the library avoids providing any view into this data. > How can I retrieve a list of all connected peers? > This is not supported. Those kinds of decision…

the [...] that you removed is

> At any given time a message may be in the ZeroMQ sender queue, the sender's kernel buffer, on the wire, in the receiver's kernel buffer or in the receiver's ZeroMQ receiver queue. Furthermore, a ZeroMQ socket can bind and/or connect to many peers. Each peer may have different performance characteristics and therefore a different queue depth. Any "queue depth" number is almost certainly wrong

The library doesn't hide stuff from you, it just refuses to show you information that might as well be a random number.

If you want to know how many peers are connected you use heartbeats instead of just blindly trusting that 1 tcp socket = 1 available peer.

Re: ØMQ – The Guide (2011)

#28
post #3

I have a feeling that ØMQ is a very good thing, but all these years I have never managed to understand what it is and what problem does it solve.

You know how people often bill sqlite as a replacement for (postgresql|mysql|oracle) but it is really best thought as a replacement for fopen()? zeromq is the same way. It's not a replacement for something like kafka or rabbitmq, it's a replacement for socket()

I love this description of zmq and sqlite.

Re: ØMQ – The Guide (2011)

#29
Anyone know how nanomsg (https://nanomsg.org) or nng (https://github.com/nanomsg/nng) compares?

Interesting that nanomsg tries to better zeromq (https://nanomsg.org/documentation-zeromq.html) and then nng tries to better nanomsg (https://nng.nanomsg.org/RATIONALE.html)

edit: just noticed nng and nanomsg share the same domain, so probably the same people behind them.

Re: ØMQ – The Guide (2011)

#30
Ø - The 28. Letter in the Norwegian alphabet, pronounced as the beginning of the sound ‘uuuuh’ (like when someone is making a sound when thinking). It’s a join between O and E, and was at first written as Ө. The same sound in Swedish is Ö
Post reply on HN