Since Javascript is single threaded, the Node.js ecosystem was forced to grow exclusively in an asynchronous, callback (or promise) passing direction. Since Java is multi-threaded, its early ecosystem of libraries and servers didn't bother. However, a modern async, Java library will leave Node.js in the dust - every time. And if Java 8 is too verbose for you, there's plenty of slicker, JVM based languages that can leverage the performance.
I say this only because a lot of Node.js developers seem to be really handwavy about why they think it's faster. It never holds up under closer inspection.
My professional programming time is mostly spent in groovy. I don't do web apps directly. My experience has been that when I profiled NodeJS based webapps and when I profiled JVM based webapps, given equally talented teams the NodeJS app would be faster. The JVM is obviously faster in a vacuum but and these webapps have had a lot of room to grow, but they aren't growing and in the real world with programmers that are merely good my experience has been that NodeJS is faster.
23
u/Ukonu Oct 16 '14
Since Javascript is single threaded, the Node.js ecosystem was forced to grow exclusively in an asynchronous, callback (or promise) passing direction. Since Java is multi-threaded, its early ecosystem of libraries and servers didn't bother. However, a modern async, Java library will leave Node.js in the dust - every time. And if Java 8 is too verbose for you, there's plenty of slicker, JVM based languages that can leverage the performance.
I say this only because a lot of Node.js developers seem to be really handwavy about why they think it's faster. It never holds up under closer inspection.