A simple analysis of the advantages and disadvantages of Node.js

不言
Release: 2018-08-11 15:52:30
Original
1666 people have browsed it

This article brings you a simple analysis of the advantages and disadvantages of Node.js. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Advantages:

Event-driven:Mobilize available resources and execute tasks based on events that occur at a point in time

Non-blocking IO:In the non-blocking state, it will not wait for the result of the I/O operation to return, and continue to execute the next statement. When the result returns, the I/O will be notified in the form of an event; while boiling water, it will Sweep the floor and boil the water before proceeding with the next operation

Disadvantages:

Single process and single thread, unable to fully utilize multi-core CPU. Once one process crashes, the entire server crashes.

Applicable scenarios:

Lightweight and efficient, suitable for IO intensive, not suitable for CPU intensive

IO intensive: chat room

CPU intensive: video decoding

Related recommendations:

How to get the scroll bar width in js (code example)

js implementation of array What are the methods to remove duplicates? A brief introduction to js array deduplication method

#What are the implementation methods of JS modularization? Explanation of js modularization

The above is the detailed content of A simple analysis of the advantages and disadvantages of Node.js. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!