Hacker News new | ask | show | jobs
by pcglue 2059 days ago
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.

2 comments

If I remember correctly, they’re written by the original zeromq author. He has a blog post about how he realized that C++ was not ideal for the architecture he was using, and decided to make a clean break.

Edit: Found it. https://250bpm.com/blog:4/

He changed his mind over time. ZeroMQ is still maintained and nanomsg is pretty much dormant.
Look up "nanomsg is not dead" and nanomsg's replacement nng for even further confusion.

My takeaway is that even though these newer libs seem to be simpler and avoid some issues, they've just never caught on.

Problem is - nng is also hardly being updated. I was really hopeful for a C library that would by on par with ZeroMQ but every time a new project comes along that needs some sort of message bus and I have the time to evaluate the technology, ZeroMQ simply wins.
His arguments are valid [1] but I still don't understand why that means dropping C++ entirely. Sure, C++ isn't a perfect superset of C, but you could mostly write C-style code in C++, right?

I've seen this sentiment before from C enthusiasts. Maybe it makes sense on the Linux kernel, where you don't want to keep telling contributors not to use the most common C++ features.

But I don't think it makes sense on very small projects, and maybe I just draw the dividing line for where it stops working at a different size of project than he did.

[1] Exceptions suck and constructors suck and C++ would be better if it was just Rust with no borrow-checker.

nng is a reimplementation of nanomsg by the guy who made mangos (the go native impl of nanomsg). Nanomsg was written by the original author of zeromq.