官术网_书友最值得收藏!

When to use Node.js

You may have heard of this proverb by an american psychologist, Abraham Maslow:

"If all you have is a hammer, everything looks like a nail!"

This makes a lot of sense in this context. Node.js is not a technology to depend for on all the application problems that you intend to solve, and if not chosen wisely, the decision to use it will backfire. Node.js is well suited for applications that are expected to handle a huge amount of concurrent connections. Also, it should be noted, it is most suited for applications where each incoming request requires very few CPU cycles. This means that if you intend to do computation-intensive tasks upon request, it will end up blocking the event loop, thereby impacting other requests concurrently processed by the web server. Node.js is well suited for real-time web applications, such as chat rooms, collaboration tools, online games, and so on. So, when deciding whether or not to use Node.js, we should analyze the application context seriously and figure out whether Node.js really suits the context of the application.

It is quite hard to debate over the use cases of Node.js in a detailed manner. However, the following Stack Overflow thread does this effectively, and I strongly recommend you to go through the answers on this post if you are more interested in the use cases of Node.js: http://stackoverflow.com/questions/5062614/how-to-decide-when-to-use-node-js.

As we have briefly gone through the concept and features of Node.js, now let's look into the NoSQL and MongoDB side.

主站蜘蛛池模板: 乌兰浩特市| 和平区| 金门县| 吉首市| 汤原县| 望江县| 金川县| 高邮市| 金湖县| 富平县| 襄汾县| 蓬溪县| 枣庄市| 景泰县| 吉隆县| 体育| 江孜县| 镶黄旗| 上蔡县| 萍乡市| 新密市| 通道| 梧州市| 南皮县| 海口市| 榆社县| 油尖旺区| 漯河市| 温宿县| 和平县| 白朗县| 八宿县| 永寿县| 乐至县| 和静县| 绍兴县| 鄯善县| 谷城县| 香河县| 铜鼓县| 密云县|