Node. js Study Notes (1)-Introduction to Node. js

Source: Internet
Author: User

Recently I am reading some Node. after reading the js knowledge, I thought that I forgot some of the previous things, so I sorted them out for convenience and hoped to learn Node. my js friends have some help. Of course, the following is my personal point of view and understanding. If you don't like it, please kindly advise. I. Node. what is js about this issue? When I first saw it, I may think it has something to do with javascript. Yes, it does. But first, Node. js is not a language. It is different from php python perl ruby's "both language and platform"; Node. js is not a javascript framework or javascript class library, unlike Jquery ExtJS; Node. js is a platform that allows javascript to run on the server. 2. Node. js features Node. js has the following features: ① Is a javascript runtime environment or platform ② relies on Chrome V8 engine for code interpretation ③ event-driven ④ asynchronous I/O (non-blocking I/O) ⑤ single process and single thread ⑥ simple and scalable, suitable for real-time data interaction applications through the above features, we can summarize a sentence: Node. js is an asynchronous I/O and event-driven javascript running that relies on Chrome's V8 engine for code interpretation. Environment; Node. the biggest feature of js is asynchronous I/O and event-driven. For high concurrency solutions, Node. js abandons the traditional multi-threaded model. It uses a single-threaded model and uses asynchronous requests for all I/O requests, asynchronous I/O and event-driven: asynchronous I/O, also known as non-blocking I/O. When a thread encounters an I/O operation, it will wait for the completion of the I/O operation to cause blocking, and a thread can only process one task. To provide the throughput, it must pass through multiple threads, i/O will not wait for the result of the I/O operation to return, and continue to execute the next statement. When the result is returned, I/O will be notified by event; Node. js asynchronous I/O is completed by the callback function. When an I/O request is encountered and the I/O operation is completed, an event is sent to the event queue, node. the js event Loop Mechanism checks whether there are any unprocessed events in the queue until the end of the program, so it can be said that Node. the js program starts from the event loop and ends with the event loop. Iii. Node. js purpose Node. js is applicable to scenarios with high concurrency, intensive I/O, and a small amount of business logic: 1. computing-intensive applications 2. single-user multi-task program 3. complicated transactions 4. unicode and Internationalization

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.