Node. js

Source: Internet
Author: User
Node. js

Node is a javascript runtime environment). In fact, it encapsulates the Google V8 engine (used in Google Chrome browsers. V8 cited worker to execute JavaScript very quickly and with very good performance. Node optimizes some special use cases and provides an alternative API to make V8 run better in a non-browser environment. For example, in a server environment, binary data processing is usually essential, but JavaScript does not support this. Therefore, v8.node adds a buffer class to facilitate and efficiently process binary data. Therefore, node not only simply uses V8, but also optimizes it to make it more powerful in various environments.

The V8 engine uses some of the latest compilation technologies.. This makes it written in advanced languages such as JavaScript.CodeThe performance of the code written in low-level languages such as C is almost the same, but the development cost is reduced. The performance requirement is a key factor in node. Javascript is an event-driven language. node uses this advantage to write highly scalable servers. Node adopts an architecture called "event loop", which makes writing highly scalable servers easy and secure. There are a variety of techniques to improve server performance. Node selects an architecture that improves performance and reduces development complexity. This is a very important feature. Concurrent Programming is usually complex and well-structured. Node bypasses this, but still provides good performance.

Node uses a series of "non-blocking" libraries to support event Loops. Essentially, it provides interfaces for resources such as file systems and databases. When you send a request to the file system, you do not need to wait for the hard disk (addressing and retrieving files). When the hard disk is ready, the non-blocking interface will notify node. This model simplifies access to slow resources in a scalable manner, which is intuitive and easy to understand. This is especially true for users who are familiar with DOM events such as onmouseover and onclick.

Although JavaScript running on the server is not unique to node, it is a powerful function. I have to admit that the browser environment limits our selection.Programming Language. Any server and increasingly complex browser client applicationsProgramThe desire to share code between them can only be achieved through JavaScript. Although there are other platforms that support JavaScript running on the server, node has developed rapidly due to the above features and has become a real platform.

Within a short period of time when the node is started,CommunityA large number of extension libraries (modules) have been contributed ). Many of them are drivers for connecting to databases or other software, but there are still many very useful software developed based on their strength.

Finally, we have to mention the node community. Although the node project is still quite a year old, it is rare to see a community that is so enthusiastic about a project. Everyone, novice or expert, uses and contributes their own abilities around the project, and is committed to creating a paradise for exploration, support, sharing, and listening to suggestions.

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.