I think the scaleability argument surrounding Node versus Java (typically)
is a bit of a red herring.

My understanding is that most Java shops that have adopted Node is because
of the quicker development effort. With that said, in my experience,
Node.js runs noticeably faster than Java on small-ish IBM i machines.

With Node's single thread approach, you have to be very careful indeed
that you don't block the thread and that you handle exceptions properly,

The Node.js single thread comment has come up a few times so I thought I
would note that most (all?) I/O is done in a separate thread to keep other
requests (or other Javascript in the same request) running concurrently.
Even with this approach, it can be advantageous to use Node.js Cluster
feature or pm2 to have many processes (IBM i jobs) to handle the load.


In my view the only compelling reason to use Node for the backed is that
it gives you the ability to write the frond-end and back-end in the same
language and even share common code between the two.

That is the primary compelling reason in my mind also. And it's a
significant reason. The majority of web projects I've worked on have one
or two people that are better at Javascript so they are always the ones
that make the front-end sing. Getting everyone well versed in both the
front and back-end lang is a big win. I also know that coding
scenarios are still fairly different (Angular vs. Hapi), but at least it's
in the same lang.


Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces


On Sun, Mar 18, 2018 at 10:50 AM, Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

I think the scaleability argument surrounding Node versus Java (typically)
is a bit of a red herring. The perceived issue with Java is that, because
it uses a threaded model, and each thread has some memory overhead
associated with it, scaling to support many thousands of simultaneous
connections get very expensive in terms of resources. While this is true,
and clearly an issue if you are Facebook or Netflix, I doubt that many IBM
i applications would come anywhere near that. On the other hand, using
threads does have some clear advantages; a poorly performing or failing
piece of code will not impact the rest of the application for example. With
Node's single thread approach, you have to be very careful indeed that you
don't block the thread and that you handle exceptions properly, otherwise
the entire application is going to get stuck. Personally, I think for the
typical sized IBM i application the advantages of the threaded model
outweigh the perceived scalability benefits of using Node. In my view the
only compelling reason to use Node for the backed is that it gives you the
ability to write the frond-end and back-end in the same language and even
share common code between the two.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.