3 ms·
Originally, for performance reasons. Async code lets you handle multiple concurrent connections without having to rely on multiple threads or processes (which a
by olalonde 12y ago
Originally, for performance reasons. Async code lets you handle multiple concurrent connections without having to rely on multiple threads or processes (which are more resource hungry)[0].
Nowadays, there's also the fact that if you want to use Javascript on the backend, Node.js is the de facto standard. You don't necessarily have to do async I/O but you'd be fighting against the whole ecosystem by not doing so.
[0] http://en.wikipedia.org/wiki/Preemption_(computing)#Preemptive_multitasking http://en.wikipedia.org/wiki/Preemption_(computing)#Preempti...
- BonoboBoner 12y agoI agree that is is the standard way of doing things. I was just curious why the trend moved towards this approach. Not a long time ago Concurrency based on a lot of threads had an upswing. http://www.mailinator.com/tymaPaulMultithreaded.pdf http://www.mailinator.com/tymaPaulMultithreaded.pdf