4 ms·
Node.js is event oriented I/O. It lets you design some server tasks in a way that is non-blocking and thus more efficient. (Some other languages let you do tha
by fla 10y ago
Node.js is event oriented I/O. It lets you design some server tasks in a way that is non-blocking and thus more efficient.
(Some other languages let you do that too)
- regularfry 10y agoPretty much all general purpose languages let you do that. Only Node makes you.
- fla 10y agoPHP doesn't
- tyingq 10y agohttps://docs.hhvm.com/hack/async/introduction https://docs.hhvm.com/hack/async/introduction
- fla 10y agoYeah OK :) HHVM is not the usual PHP runtime one expects to build the average web service upon. Anyway, my point was that Node.js main core value was to let people script evented I/O over a lightweight runtime. When Node came out, it was something new.
- tyingq 10y agoSure. I just happen to agree with the notion that node.js is mostly unique only in that it pushes you down that path. Java has a fairly rich NIO path that you can choose to take or not, and predates node.js. I believe the Tornado package for Python predates it as well. Certainly, there's some advantage there...fewer surprises with 3rd party libraries that aren't non-blocking. But, there's downsides as well.
- hookshot 10y agohttps://github.com/elazar/asynchronous-php https://github.com/elazar/asynchronous-php