What are the advantages of node. js? Introduction to the pros and cons of node

Source: Internet
Author: User
This article is about the 4 great advantages of node. js and the choice of node. js Four point reason, are the benefits of node. js, of course, there are certainly bad places, the article also describes the five shortcomings of node. js. Let's see it together.

Let's first introduce the advantages of node. JS:

From my personal experience, node has 4 major advantages:

1.Nodejs based on the JavaScript language, the new language is no longer a separate learning, thus reducing the threshold of study. At the same time, the JavaScript language in the Web front-end development is very important, especially HTML5 application must use, so the front and rear unified language, not only can realize the programmer's full stack development, but also can unify public class library, code standardization. On this point alone, Nodejs has won the favor of the market.

2.Nodejs did not re-develop the runtime environment, but chose the fastest browser kernel V8 as the execution engine, ensuring the performance and stability of Nodejs.

The 4.Nodejs community is growing, not only the number of packages is increasing rapidly, but also the quality of the package is significantly better than in other languages. Many star-level packages are simple and dexterous, designed for the use of developers. My most commonly used toolkit, such as Socket.io, Moment.js, Underscore.js, Async.js, Express.js, Bower.js, Grunt.js, forever.js ..., is really changing my previous programming habits. (Want to know more about the Topic.alibabacloud.comnode.js Video tutorial section, watch the video can also learn)

Of course, the advantage of node. JS is certainly more than that, we are not more in this, if you have a better advantage can leave a message below

The reasons for choosing Nodejs can be summed up in the following 4 points:

Dynamic language: Development is very efficient and has the ability to build complex systems such as Ql.io.

Performance and I/O load: Nodejs is a very good solution to IO-intensive problems, through asynchronous IO to achieve.

Memory overhead for connections: each node. JS process can support more than 120,000 active connections, and each connection consumes approximately 2K of memory.

Operability: Implements the Nodejs for the memory stack monitoring system.

The advantages of node. JS we have said so much, then does it have any shortcomings?

The answer is yes, or why the fire is not up.

Let's look at the downside of node. JS:

The disadvantage of node. JS is that Nodejs is not suitable.

Each language or platform has a bad domain, and for nodejs, the least adept area is CPU and memory programming.

1. Compute-intensive applications that allow JavaScript and C to spell compute performance are not likely to win.

2. Memory control makes it difficult for JavaScript and Java to compare complex data type definitions. Because JavaScript's object-oriented is JSON-based, Java uses the memory structure directly. So, with the JSON serialization and deserialization process to control memory, JavaScript has lost.

3. For large memory applications, because the V8 engine has limited memory design, the largest heap in 32-bit environments is the largest heap in the 1g,64-bit environment and less than 2G, and if you want to read 10G data at once, it will not be possible for Nodejs.

4. Static server, although the advantages of nodejs in the IO dense set application, but with nginx processing static resources still have a big gap.

5. Applications that do not need to be asynchronous: such as System management, self-scripting, or Python, Nodejs asynchronous calls can cause problems with programming.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.