Mohit
Mohit

Reputation: 153

How is nodejs different from running libevent?

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?

Upvotes: 13

Views: 4642

Answers (1)

jterrace
jterrace

Reputation: 67073

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.

Upvotes: 25

Related Questions