7 ms·
It's a combination of both. The event loop and non-blocking I/O are inherent in JavaScript. The language lends itself very well to scalable server-side program
by EB66 8y ago
It's a combination of both.
The event loop and non-blocking I/O are inherent in JavaScript. The language lends itself very well to scalable server-side programming.
- pjmlp 8y agoThere are plenty of event loop and non-blocking I/O libraries for the languages I have mentioned.
- EB66 8y agoYep, that's true. However, JavaScript does it right out of the box and the JavaScript ecosystem is very well-aligned for async. One of the most significant reasons to use a language like Node for server-side async programming is that for any random library you choose to use there's a very high probability the library also supports async and won't block on you. For better or for worse, async is pervasive in the JavaScript ecosystem. Even languages that have good async frameworks, like Python, most libraries will block as it's the normal I/O mode for the language.
- forgotpwd16 8y agoHow are event loop and non-blocking I/O inherent in JavaScript?