当前位置:网站首页>【nodejs】第一章:nodejs架构
【nodejs】第一章:nodejs架构
2022-08-05 05:16:00 【六月的可乐】
node概念
1、nodejs是js语言在脱离浏览器环境运行的解决方案,它主要由ECMAScript与node API(系统内置模块和第三方模块)两部分组成。
2、node是一种js语言的脱离浏览器运行的拓展平台。
node架构

1、natives modules部分:就是我们书写的易于nodeAPI的js代码部分
2、bingings部分:是通过c或c++实现的和底层模块功能交互的功能代码
3、v8、libuv库等:用于解析js语言和封装nodeAPI,同时也是js找到bindings功能API实现底层操作系统底层交互的桥梁
nodejs的非阻塞异步IO机制
1、nodejs的特点是:单线程和非阻塞异步io机制
2、nodejs处理高并发的优势源于非阻塞的异步io机制,该机制实现了单线程处理多线程任务的效果
3、在服务端业务中io操作是最耗时的,如果是同步实现就造成阻塞
4、nodejs的异步io机制是基于异步编程的,一次请求的夜逻辑处理是异步的,即使同时有多个请求也不会阻塞,并且异步业务io处理会被加入异步队列中处理,当io处理完成时就会停止主线程给业务返回结果




事件驱动
边栏推荐
猜你喜欢

【论文阅读-表情捕捉】High-quality Real Time Facial Capture Based on Single Camera

读论文-Cycle GAN

解决:Unknown column ‘id‘ in ‘where clause‘ 问题
![[Pytorch study notes] 11. Take a subset of the Dataset and shuffle the order of the Dataset (using Subset, random_split)](/img/59/ce3e18f32c40a97631f5ac1b53662a.png)
[Pytorch study notes] 11. Take a subset of the Dataset and shuffle the order of the Dataset (using Subset, random_split)

SQL(1) - Add, delete, modify and search

基于STM32F407的一个温度传感器报警系统(用的是DS18B20温度传感器,4针0.96寸OLED显示屏,并且附带日期显示)
![[Pytorch study notes] 10. How to quickly create your own Dataset dataset object (inherit the Dataset class and override the corresponding method)](/img/71/f82e76085f9d8e6610f6f817e2148f.png)
[Pytorch study notes] 10. How to quickly create your own Dataset dataset object (inherit the Dataset class and override the corresponding method)

BFC详解(Block Formmating Context)

神经网络也能像人类利用外围视觉一样观察图像

The difference between the operators and logical operators
随机推荐
沁恒MCU从EVT中提取文件建立MounRiver独立工程
【Pytorch学习笔记】10.如何快速创建一个自己的Dataset数据集对象(继承Dataset类并重写对应方法)
全尺度表示的上下文非局部对齐
It turns out that the MAE proposed by He Yuming is still a kind of data enhancement
Comparison and summary of Tensorflow2 and Pytorch in terms of basic operations of tensor Tensor
Thread handler句柄 IntentServvice handlerThread
【Multisim仿真】直流稳压电源设计报告
网络ID,广播地址,掩码位数计算
六步搞定子网划分
通过Flink-Sql将Kafka数据写入HDFS
轻松接入Azure AD+Oauth2 实现 SSO
spingboot 容器项目完成CICD部署
Tensorflow steps on the pit notes and records various errors and solutions
OSPF故障排除办法
盘点关于发顶会顶刊论文,你需要知道写作上的这些事情!
网络信息安全运营方法论 (下)
Flutter 3.0升级内容,该如何与小程序结合
The University of Göttingen proposed CLIPSeg, a model that can perform three segmentation tasks at the same time
CVPR 2022 | 70% memory savings, 2x faster training
flink基本原理及应用场景分析