News for hackers. Stuff that matters.
Re:Node.js and the new web front-end by EGreg on Monday October 07, 2013 @01:28PM (#6509758)
You can, but Node.js is often a better choice than PHP.

Caching: you can have ONE node.js process listening to all requests, and it can keep the cached info in memory, to be looked up much more quickly. In PHP, you'd have to load the entire script environment, connect to an external source like Memcached or APC, etc.

Waitlist: Similar to caching, except Node.js can hold off on responding to the request until the response came back. It's MUCH harder to make something like PHP iterate through the waitlist because a bunch of scripts might get called at once, and the way it works, all of them will have to sleep. With Node.js, only one process has to sleep -- or handles something else while you're waiting.

etc.

There are no comments on this comment yet.