I’ll be taking you through NodeJS from a different perspective. Currently, NodeJS is being “fanboyed” by tons of fanboys and have a lot of bias articles out there to promote the use of NodeJS. Therefore, I see a really strong need for this article to be written.
Here’s a brief introduction of how I knew about NodeJS. Words on the Internet spread really fast and I was told that NodeJS was great. At first, I believed the rumors. Then I used NodeJS and found it very easy to built web socket web pages through Express.js and Socket.IO. It was fine until I read through some of the NodeJS code and saw the horror…
So folks usually solve this “invisible” single threading problem by running multiple NodeJS servers within a physical server and then load balancing the traffic in between these NodeJS servers. This means that another web server, typically Nginx or Apache, has to come into place to proxy and do the load balancing! Hahaha, how hilarious and how stupid NodeJS is! Oh and some may also argue that multi-threaded code is incredibly hard to debug, I have to agree. Its definitely easier to write code than to read code, so leave that to the professionals at Apache to do it while NodeJS developers can continue writing their single threaded codes.
There is absolutely no reason for you to use NodeJS, other than it being easy to execute web socket stuff. Other languages such as PHP, Ruby and Python can do that too but its slightly more difficult. It is not sane to sacrifice multi-threading functionality just for the sake of convenience.