News for hackers. Stuff that matters.
Re:JeroMQ: Native Java implementation of ZeroMQ by pekk on Monday February 10, 2014 @02:46PM (#7213217)
What was wrong with ZeroMQ that a port to Java fixes?
Re:JeroMQ: Native Java implementation of ZeroMQ by justincormack on Monday February 10, 2014 @04:39PM (#7214071)
The JVM is an isolationist ecosystem. It does not really run non JVM code sanely, so they reinvent the world (often very well). It is a pity in many ways as it creates duplication of effort.

There is an interesting new effort to make a performant JVM ffi though https://groups.google.com/forum/#!forum/jvm-ffi

Re:JeroMQ: Native Java implementation of ZeroMQ by mey on Monday February 10, 2014 @05:44PM (#7214349)
One jvm, one way to monitor it, one way to deploy it, one way to upgrade it, one way to recover it.

These are some of the things about code that stays inside the jvm bounding box that I personally find valuable. It's one of the ways we keep our operational burden down.

It's a high price, but the community has surprisingly deep solutions.

Re:JeroMQ: Native Java implementation of ZeroMQ by justincormack on Monday February 10, 2014 @05:49PM (#7214376)
Yes, it took many years, and there are good technical reasons. Other communities rewrite everything in their language for less technically good reasons.

It divides all the code into JVM, Posix and Windows (and a few other things) that don't share ideas much; some of the better ideas get ported in one direction or the other, many do not.

Re:JeroMQ: Native Java implementation of ZeroMQ by tbrownaw on Monday February 10, 2014 @02:59PM (#7213313)
Platform-specific native libraries are annoying.

If your code runs on the JVM, it should run on, well, the JVM. It shouldn't run partly on the JVM and partly on the host machine, since that breaks the purpose of using the JVM.

Re:JeroMQ: Native Java implementation of ZeroMQ by banachtarski on Tuesday February 11, 2014 @12:42AM (#7216007)
I don't get this logic. Native libraries are annoying? You can run zeromq (and most, what you would probably call "native," libraries) on almost any platform. Just change your compiler target. The JVM? Not so much. Try running that on an ipod and see where that gets you. Or many embedded devices for that matter.

Not to mention you need the JVM installed too and believe me when I say there are plenty of us who are sick of the JVM and its incessant auto-updater.

Re:JeroMQ: Native Java implementation of ZeroMQ by tbrownaw on Tuesday February 11, 2014 @01:45PM (#7219464)
You do realize that nobody will write an application in Java for the purpose of using ZeroMQ?

Instead they have an application already written in Java, or some other compelling reason to write the application in Java. Given that there is already a dependency on the JVM, it is silly to add another dependency on a particular host platform. It is silly to force the compile process to become aware of the host platform, when it otherwise wouldn't need to be.

Re:JeroMQ: Native Java implementation of ZeroMQ by pjmlp on Tuesday February 11, 2014 @03:07AM (#7216452)
> Try running that on an ipod and see where that gets you.

Easy, just use RoboVM or Aicas

> Or many embedded devices for that matter.

There are lots of commercial JDKs that compile directly to native code.

Most of the embedded devices that cannot be targeted by Java wouldn't support running something like ZeroMQ anyway.

Re:JeroMQ: Native Java implementation of ZeroMQ by pekk on Monday February 10, 2014 @10:11PM (#7215527)
JVM is a platform.
Re:JeroMQ: Native Java implementation of ZeroMQ by haddr on Monday February 10, 2014 @03:08PM (#7213405)
When using the native ZeroMQ from Java you summon the C hell. While the idea of JVM is that it is, well, platform independend, you have to break it in order to fit the ZeroMQ dlls. For instance, I remember that first of all you had to compile it for all platforms (Windows, Linux), then ensure the 32/64bit compatibility, then when building you have to keep track of it when preparing your releases. Having JeroMQ jar is just making all those problems dissapear.
Re:JeroMQ: Native Java implementation of ZeroMQ by GilbertErik on Monday February 10, 2014 @03:07PM (#7213396)
Is it just me, or do these performance numbers lead anyone else to believe that JeroMQ is more performant than ZeroMQ? I can probably believe that running on a modern JVM would buy you a little bit of an advantage, but these numbers seem like JeroMQ is roughly 20% faster. (I'm reading lower latency and higher 100K msgs/sec)
Re:JeroMQ: Native Java implementation of ZeroMQ by marktangotango on Monday February 10, 2014 @03:15PM (#7213463)
JNI is not considered to be a performant solution. Copying bytes across the jvm/c boundary is expensive. Depending on how the bindings are implemented (direct vs undirect ByteBuffers for example) you could easily see drastic differences in performance at high through put.
Re:JeroMQ: Native Java implementation of ZeroMQ by benmmurphy on Monday February 10, 2014 @04:25PM (#7213959)
The interesting thing was the comparison looked like pure c++ vs java. GC can give you better throughput than a naive memory allocator if you are willing to deal with the unpredictable pauses.
Re:JeroMQ: Native Java implementation of ZeroMQ by mey on Monday February 10, 2014 @05:46PM (#7214361)
But for a Java developer looking to make use of ZeroMQ, that comparison wouldn't make sense as they already are taking on the burden of the JVM.
Re:JeroMQ: Native Java implementation of ZeroMQ by capkutay on Monday February 10, 2014 @04:37PM (#7214052)
One possibility is that in the JeroMQ test, they allocated enough memory for the JVM so that GC wasn't as expensive as explicitly dealing with memory management in the C++ test.
Re:JeroMQ: Native Java implementation of ZeroMQ by JulianMorrison on Monday February 10, 2014 @03:15PM (#7213469)
Android.
Re:JeroMQ: Native Java implementation of ZeroMQ by andrewflnr on Monday February 10, 2014 @08:47PM (#7215157)
Would it be reasonable to use zeromq in an app to communicate with a server?
Re:JeroMQ: Native Java implementation of ZeroMQ by JulianMorrison on Tuesday February 11, 2014 @09:33AM (#7217749)
Seems reasonable to me. Its efficient approach to throughput would be well suited to the way mobile internet works.
Re:JeroMQ: Native Java implementation of ZeroMQ by Daviey on Monday February 10, 2014 @02:55PM (#7213287)
Enterprise ready.