What is "web server" in NodeJS and why it should be used for enterprise apps in 2016 instead of Java/Go/PHP/Python?

Responses (5)

Join the discussion

It isn't always about performance when choosing a technology. It's a combination of tools and technologies that help you build applications with high performance. Every tool has its ups and downs but when combined together, they can be really powerful.

PHP7 can be used together with NodeJS to build a real-time web application. I had a chance to build one few months ago. It was fun.

As for nodeJS and performance, LinkedIn, MySpace, PayPal, Netflix and many other famous web apps and services use it.

As for logs and configuration, you have to probably look for npm packages that allow you to do that, since that's how the NodeJS platform works.

Check out NodeJS at Netflix, also search for their tech blogs where they explain more why they switched and how better it is with it.

Remember that, no web stack is perfect, you just have to choose the tools that are best for your application and when you get into trouble, scale it accordingly.

Write a reply...

Well, the thing is, Node.JS is just executing JS code while providing some core modules. Nothing more, nothing less. If you want, it can be a web server. But it can also be a Tic-Tac-Toe console game written in JS (see for example this code).

1) Since you have to program config files, logs, HTTP etc. on your own, it's your decision, how things work and what you implement. Take a look at the different modules, like http, zlib,... , in order to find out which parts are already there for your convenience and which things you will have to write yourself.

2) Whenever you want to write a small (console) appliation, HTML-enabled appliation for GUI (e.g. Electron, which is used by Atom Editor and others), whenever you need a lot of IO operations or when you want to use socket communication over the web (e.g. chat application on your homepage). There might be more cases, but you should go and discover the world of Node.JS for yourself!

3) You cannot really compare a specialized application to a general HTML-preprocessor, can you? As for Go, why not make your own benchmark for your specific use case?

4) Application in JS with all the good stuff (front-end) developers have been used to for many years.

5) You do know how to google, right? Well, I can tell you that big companies have started adopting Node.JS. Source: Me, since I work for quite a big one. Also Microsoft is all over Node.JS lately, seeing as they used Electron for their Microsoft Code Editor and all the support in Visual Studio. And, of course, Samsung: They even bought Joyent, the company behind Node.JS.

Write a reply...

I am developing applications nodejs few years ago. And I have found it much more versatile than php. I don't know GO to compare with, and I think PYTHON is also very good. What seems to me, is that it could replace Java backends quietly for simplicity.

Regarding your question: "Where are configs, logs, how to enable / disable HTTPS, HTTP2, gzip, caching and everything else possible in nginx / apache out of the box?"

I can tell you that the "configs" and "logs" are there, wherever you want. But other questions need Googling.

You can use it safely with nginx, and create your applications so that they can be turned on or stopped with a simple command like:

sudo service myapp start | stop | restart

And with nginx you can derive your domain to your application. I know it's very easy.

I found how to do it in apache and is very simple:

<VirtualHost *: 80>
        ServerName yourdomain.dyndns.org
        On ProxyPreserveHost
        ProxyPass / http://0.0.0.0:3030/
        ProxyPassReverse / http://0.0.0.0:3030/
</ VirtualHost>

Maybe my answer is not enough to convince you, but I think NodeJS has great potential for the simple fact that the language used is javascript, the same used in the browser over 20 years ago. So you easily find resources for your requirements, both are in code, as young developers.

Write a reply...

I like the Node.js.

The point: We can use the one toolchain to build the Web application.

Write a reply...

One of the drawback for me personally is that Java is better for me since I often work with Java platform at my site domyhomeworkonline.net. I do not like NodeJS because all the methods for doing simultaneous work, callbacks are by a long shot the most exceedingly terrible, Twisted was tormented by them and is the principle motivation behind why it fizzled, and that was with an a great deal more rational and sensible dialect like Python, stackless Python was a vastly improved option and utilized a model like Go's CSP.

Write a reply...

loading ...