JavaScript is more straightforward than Java, let’s see if it is also faster.

Web applications with server-side code written in JavaScript are getting increasingly more widespread nowadays. It is interesting to compare performance of a mature Java-based web server to a server based on relatively young Node.js JavaScript runtime.

Tomcat is the simplest and most popular among Java web servers. Basically it is an application executing Java web applications. The deployed applications use the implemented by Tomcat API for handling HTTP requests. Tomcat and Java existed before Node.js was developed but nowadays Node.js-based web applications are more widespread than the ones served by Tomcat or, perhaps, all the web applications written in Java. I would say the problem of Java applications is Java itself. It is a cumbersome language containing too much of repetitive code like data types and little of functional programming constructs. Lambda expressions in Java are rather handicapped. So I am thinking of migrating my Java-based server side code into Node.js and looking for additional reasons. Node.js performance could be an argument in favor of translating Java backend into JavaScript.

Express is an optional JavaScript library of methods for handling HTTP requests. Web applications based on Express are launched as any other script — using Node.js JavaScript runtime.

I will compare which web server, the most popular Java server or JavaScript-based server, serves faster static resources such as numerous JavaScript modules.

#java #javascript #nodejs #node

What is faster — Tomcat or Node.js with Express?
2.55 GEEK