What makes Node.js faster than Java? In a nutshell, it's all about concurrency
1–10 of 59 posts
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#2And socket.io justifies using Node :-)
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#3That said, I tend to prefer building in NodeJS because it's fast enough for most (unanticipated) use cases.
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#4http://www.techempower.com/benchmarks/#section=data-r8&hw=i7...
NodeJS is far behind with 55% vs PlayFramework 67% on 20-queries test.
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#5"While Java or Node or something else may win a benchmark, no server has the non-blocking ecosystem of Node.js today. Over 50k modules all written in the async style, ready to use. Countless code examples strewn about the web. Lessons and tutorials all using the async style. Debuggers, monitors, loggers, cluster managers, test frameworks and more all expecting your code to be non-blocking async."
is true.
Java has had all of the same async capabilities for many, many years, but nobody uses them because the blocking paradigm is simply easier.
That said, if true scalability is required, I'd suggest living with Akka and the cleaner actors paradigm. However, it's true that eventually you're going to run into the barrier that the vast majority of the java ecosystem is built on blocking io.
(That said, with Java 8, I think we have a real opportunity to change that. I think a parallel "lean java" ecosystem is coming.)
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#6Yea. This headline has to be troll bait. NodeJS is not faster than Java, and it's also not Concurrent. It is single threaded. It makes efficient use of that single thread with an event-oriented model. That said, I tend to prefer building in NodeJS because it's fast enough for most (unanticipated) use cases.
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#7Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#8Yea. This headline has to be troll bait. NodeJS is not faster than Java, and it's also not Concurrent. It is single threaded. It makes efficient use of that single thread with an event-oriented model. That said, I tend to prefer building in NodeJS because it's fast enough for most (unanticipated) use cases.
Concurrency is about doing things in the same time period not necessarily at the exact same time.
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#9At first, I was ready to dismiss this article completely. However, this paragraph: "While Java or Node or something else may win a benchmark, no server has the non-blocking ecosystem of Node.js today. Over 50k modules all written in the async style, ready to use. Countless code examples strewn about the web. Lessons and tutorials all using the async style. Debuggers, monitors, loggers, cluster managers, test framewor…
That's exaggeration.
Lots of Java libraries use async and concurrency. Java 7 has NIO.2 which is easy to use. There is also Netty; many projects build upon that.
I'm not here to say Java's ecosystem is richer or better; I'm just saying exaggeration is not useful.
Re: "the vast majority of the java ecosystem" I don't mean to sound dismissive, but lots of languages have code you probably don't want to use based on your preferences or needs. So? Don't use the vast majority of libraries. :) You probably don't anyway.
UPDATE: See also Akka and Clojure's concurrency for useful, popular approaches for the JVM.
Re: What makes Node.js faster than Java? In a nutshell, it's all about concurrency
#10Yea. This headline has to be troll bait. NodeJS is not faster than Java, and it's also not Concurrent. It is single threaded. It makes efficient use of that single thread with an event-oriented model. That said, I tend to prefer building in NodeJS because it's fast enough for most (unanticipated) use cases.