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

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.

主站蜘蛛池模板: 砚山县| 赤城县| 南京市| 桐乡市| 扎兰屯市| 哈密市| 和政县| 汝南县| 文化| 东台市| 平罗县| 海林市| 科尔| 临湘市| 静安区| 阿鲁科尔沁旗| 英超| 容城县| 哈巴河县| 黔东| 商水县| 盐边县| 关岭| 雅江县| 印江| 齐河县| 博湖县| 通渭县| 仁布县| 丹江口市| 威远县| 富宁县| 清镇市| 吴堡县| 宜黄县| 瓦房店市| 定结县| 莱州市| 普格县| 涪陵区| 始兴县|