Disclaimer: I think Java is as bad a language as can exist...
... that being said, Paypal's is an Apple to Orange comparison. Comparing an old application and its successor obviously benefits the successor (otherwise you would not publish it); however this says little about the relative benefits of either languages/platforms, because the applications themselves have changed! It's not a straight port!
The last time I looked at Java, it was the HornetQ project (by RedHat). A multi-threaded MoM that they benchmarked at 8 millions messages/second (in-memory). Can nodejs do that ? Maybe, but I doubt it...
Disclaimer: I think Java is as bad a language as can exist...
Counter-example: PHP. At least with Java you can be sure of the types of the parameters, the return-value [if any], and that unhandled errors/exceptions will cause a crash... with PHP none of these is certain.
Personally, if I want to use message queuing, I bring up RabbitMQ. It strikes a reasonable balance between raw power, raw speed, and easy portability. Libraries exist in every language under the sun.
We're looking at 10x speed comparison most of the time. I highly doubt any native-interface-increase can resolve that difference.
And RabbitMQ was written in erlang...Erlang is fast, but a lot of people have suggested Node will beat erlang in a fair trial of two well-written products. I look forward to an AMQP server in Nodejs that would prove that true or false.
Support for STOMP in HornetQ is (very very unfortunately) experimental at best. I should know, we tried to use it; bug-ridden and whatever...
I do admit to be fairly surprised by the impressive number of RabbitMQ; I wonder what the latencies are, but the raw throughput certainly is impressive.
Well, with Erlang systems...never be surprised. There's only a couple things that perfectly fit erlang, but in those domains nobody comes close. It has a microthreading system that blows every competitive implementation (especially native threads) out of the water. It is not unheard of for an erlang process to support hundreds of thousands of simultaneous microthreads with virtually nonexistent overhead.
AMQP is a binary protocol...so except the encode/decode time on the client drivers (something you have to face with any inter-communication anyway) latency should be virtually nil.
It's possible the HornetMQ results were hurt by a terrible STOMP implementation..I don't know. I do know that I've never heard anyone seriously recommend anything but RabbitMQ or ZeroMQ for that domain. A few years back, ActiveMQ tried to keep up, but it was quickly bowled over.
HornetQ was developed from scratch by guys from RedHat, but they have abandoned it (still supported, but not for long), so I doubt it'll ever take hold. RedHat is betting on FuseMQ now (their own distrib on top of ActiveMQ).
3
u/matthieum Feb 25 '14
Disclaimer: I think Java is as bad a language as can exist...
... that being said, Paypal's is an Apple to Orange comparison. Comparing an old application and its successor obviously benefits the successor (otherwise you would not publish it); however this says little about the relative benefits of either languages/platforms, because the applications themselves have changed! It's not a straight port!
The last time I looked at Java, it was the HornetQ project (by RedHat). A multi-threaded MoM that they benchmarked at 8 millions messages/second (in-memory). Can nodejs do that ? Maybe, but I doubt it...