
ØMQ: Mission Accomplished - nephics
http://www.250bpm.com/blog:1
======
pedoh
I think 0MQ is brilliant. If this is your first time looking at 0MQ, I'd
suggest the following:

<http://www.zeromq.org/intro:read-the-manual>

Watch the first video by Ian Barber. He's an excellent presenter.

The guide ( <http://zguide.zeromq.org/page:all> ) is very lengthy and
comprehensive, but the "hello world" example and the "Divide and Conquer"
example (fan out jobs, work, fan in results) will get you up and running and
start showing you a sliver of the amazing power of 0MQ.

They've even got a lot of their examples in many languages:

C++ | C# | Clojure | CL | Erlang | F# | Haskell | Haxe | Java | Lua | Node.js
| Perl | PHP | Python | Ruby | Scala | Ada | Basic | Go | Objective-C | ooc

~~~
espeed
Yes, these are good as well...

ZeroMQ: Modern & Fast Networking Stack, by Ilya Grigorik
[http://www.igvita.com/2010/09/03/zeromq-modern-fast-
networki...](http://www.igvita.com/2010/09/03/zeromq-modern-fast-networking-
stack/)

ZeroMQ an Introduction, by Nicholas Piël <http://nichol.as/zeromq-an-
introduction>

Advanced Network Architectures with ZeroMQ, by Zed Shaw [http://blip.tv/pycon-
us-videos-2009-2010-2011/pycon-2011-adv...](http://blip.tv/pycon-us-
videos-2009-2010-2011/pycon-2011-advanced-network-architectures-with-
zeromq-4896861)

------
snewman
0MQ looks very interesting, but most of the information available seems to be
"how to use it". I can't find detailed specifications of its behavior, nor a
detailed description of the implementation that I could use to figure that out
myself. (Short of wading through the source code.) So it's hard to understand
exactly how load balancing works, exactly what happens to in-flight messages
on a server crash, exactly what guarantees are provided for message ordering
(e.g. in a complex multi-participant scenario), at-least-once vs. at-most-once
message delivery, etc.

Does anyone know of a good, detailed explanation of how 0MQ is implemented?

~~~
grk
As for in-flight messages and server crashes, some explanation is given in the
zguide in the part about durable sockets.

And you're right that some explanation of implementation is needed. I spent a
few hours digging through the code today and it's not easy to read.

~~~
rumcajz
<http://www.zeromq.org/whitepapers:architecture>

------
espeed
ZeroMQ is amazing. The last few months I have been using it for all kinds of
things -- from creating multiprocessing Python apps to replacing an HTTP REST
backend with a high-performance ZeroMQ server.

~~~
marquis
How does this compare to XMPP? Are there any benefits to learning ZeroMQ for
web notifications over using, say Strophe.js?

~~~
paperwork
ZeroMQ is very low level, compared to XMPP. ZeroMQ considers itself as part of
the networking stack: tcp/udp/0mq (or perhaps just above tcp and udp).

ZeroMQ and XMPP are not really competitors.

------
cmars
Last time I looked into zmq, it was not recommended for use in public internet
services -- not resilient enough against a potential DoS attack or buggy
client implementation. Has this changed?

~~~
rumcajz
It have got much better. The latest stable version should be pretty much
resilient.

~~~
malkia
I don't think it's supposed to be exposed in this way, rather it's very good
for internal wiring between trusted systems.

~~~
nolanw
If I recall, the issue with a public 0mq socket was that anyone driving by
sending something 0mq didn't like would cause an assertion to fail, so your
process would crash. It wasn't so much a "supposed to be exposed" as "expose
it and crash".

~~~
malkia
Yes you are right. I guess what I wanted to say, is that 0MQ relies on trusted
code and network. It's okay for code to assert, as soon as there is someone to
fix it, and it's probably expected. (Crash early, fix early).

------
bdr
Wow, programming can really be romantic.

~~~
ralphc
My favorite - "I recall the hot summer in remote Bulgarian village, almost on
the Turkish border, with car broken and no way to get home, where I devised
the first version of ØMQ wire protocol. Thanks to the guy who fixed the car!
Without him I would have been herding donkeys today. There would be no ØMQ."

------
h0h0
What HPC products use 0mq?

Would it be applicable to large-scale optimization problems, e.g. in context
of machine learning?

~~~
rumcajz
[http://engineering.twitter.com/2011/08/storm-is-coming-
more-...](http://engineering.twitter.com/2011/08/storm-is-coming-more-details-
and-plans.html)

~~~
wladimir
Looks very interesting! I cannot find any details about its release though,
even though the article talks about September 19. Will it be open source?
proprietary?

~~~
jhawk28
Github repo: <https://github.com/nathanmarz/storm> Strange Loop presentation:
<http://www.infoq.com/presentations/Storm>

------
vph
He's talking about 3.1, while publicly 3.0 is still in beta. Does anyone know
when 3.1 will come out?

~~~
rumcajz
Community vote taken last weeks was to continue 3.x series of releases by
3.1.x versions.

------
smailq
Congratz! I've been using 0MQ for few years on distributed db, now it's hard
not to architect distributed/threaded apps without 'message passing' design
which 0mq is pushing for. Plus the mailing list is pretty helpful and
friendly.

------
zdw
Anyone know of a good and recent ØMQ/AMPQ/STOMP comparison, specifically with
attention paid to the implementations available?

~~~
rumcajz
0MQ is a product, AMQP and STOMP are protocols. In addition to that both AMQP
and STOMP assume classic star topology with a messaging server in the middle,
whereas 0MQ allows you to connect your applications directly and create
arbitrary topologies.

~~~
wink
Not saying you're wrong, but I wouldn't phrase it this way.

I've only been using 0MQ as a library and AMQP in the form of RabbitMQ - so it
can be quite the opposite.

------
atuladhar
Are there any hosting services out there that currently support using ZeroMQ?

~~~
reuser
Any VPS host, or EC2, will let you run ZeroMQ in whatever way is appropriate
to your problem.

edit: and same for if you run your own server or rent a server, obviously

~~~
beagle3
However, many services won't let you make full use of it; e.g. last year when
I tried to get multicast between my EC2 nodes, it discovered it was
unsupported.

If you're only using ZeroMQ in tcp or inproc mode, it is nice, but in a
pub/sub scenario you are wasting a lot of bandwidth and CPU time.

~~~
oconnor0
Can you explain why you're wasting a lot of bandwidth/CPU time in pub/sub?

~~~
hogu
if you're not using multicast in pub sub, you're establishing individual tcp
connections between nodes, it's not any different than doing N point to point
communications, whereas with multicast, the data is only copied when needed,
your data will fan out if that makes sense with your network topology I think
if you look at the picture it'll be clear

<http://en.wikipedia.org/wiki/Multicast>

