Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

node.js vs Java backend  RSS feed

 
Ranch Hand
Posts: 39
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

What are the pros and cons of node.js when compared to a Java backend, such as Jetty? I am looking for something very high-level, e.g. "Use Java for data-intensive processing" or "Learning curve of asynchronous programming for Java developers is very steep". It would be valuable if the answer touched on performance, productivity, adoption and tooling of these two backend technologies.

Thanks,

Alec
 
Author
Greenhorn
Posts: 15
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Alec Swan wrote:Hello,

What are the pros and cons of node.js when compared to a Java backend, such as Jetty? I am looking for something very high-level, e.g. "Use Java for data-intensive processing" or "Learning curve of asynchronous programming for Java developers is very steep". It would be valuable if the answer touched on performance, productivity, adoption and tooling of these two backend technologies.

Thanks,

Alec



Hi Alec,

My knowledge of Java isn't too in-depth, but I'll give this question a shot. A lot of Java frameworks rely, as far as I know, on threading for concurrency. This can be more expensive, in terms of CPU and memory usage, than using an event loop, like Node.js does. So if high concurrency is something you need, then you might want to avoid traditional Java web frameworks. However if you know Java, continuing to use Java may be the right thing to do. There's a project called Vert.x which employs the same event-driven strategy as Node.js to get high concurrency, but it can be programmed in Java (or JavaScript, Ruby, Groovy, and Python). Vert.x isn't Node.js compatible, though, so you won't be able to use Node.js modules. There's a new project, however, called Nodedyn (http://nodyn.io/) that aims for compatibility with Node.js, but runs using the JVM. This could end up being useful for folks with a lot of experience tuning the JVM.

Cheers,
Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!