开发者

How is nodejs different from running libevent?

开发者 https://www.devze.com 2023-02-17 12:52 出处:网络
I am curious what gives nodeJS the super concurrency that it gets right now. I have not actually usedwith either of these 开发者_开发问答that much, just played with both in my spare time.

I am curious what gives nodeJS the super concurrency that it gets right now. I have not actually used with either of these 开发者_开发问答that much, just played with both in my spare time.

Sounds like the 1000s of connections that node promises that you can set it up with, you can do that even with libevent, say in C++, no?


Sure you could. In fact, node.js is implemented using libev which is an event library similar to libevent. I think the main advantage of node.js over rolling your own event-driven server in C++ is that it's really easy to use and really easy to get a server up and running quickly without having to write all of the event-based details yourself.

0

精彩评论

暂无评论...
验证码 换一张
取 消