Node.js通过将基于事件的模型放在其核心,使用事件循环而不是线程来解决"每个连接一个线程问题".所有昂贵的I/O操作总是与启动的操作完成时执行的回调异步执行.
如果任何操作发生的观察由epoll()等多路复用机制处理.
我的问题现在是:
为什么在使用阻塞Systemcalls select/epoll/kqueue时NodeJS阻塞?
或者根本不是NodeJS Single Threaded,所以需要第二个Thread 来观察select/epoll/kqueue的所有I/O操作?
architecture multithreading node.js
如何存储要用于服务器中所有客户端的数据?(比如聊天的消息)
storage node.js
node.js ×2
architecture ×1
multithreading ×1
storage ×1