News for hackers. Stuff that matters.
Re:Node.js and the new web front-end by EGreg on Monday October 07, 2013 @01:09PM (#6509628)
Yes and no.

If Node.js can do things like

* cache responses

* not send duplicate responses but instead maintain a waiting queue

* throttle requests based on # of preforked threads etc.

then it would be faster most of the time.

And equally importantly you can take a page from Yahoo's book and pre-render stuff on the presumably faster server, for mobile devices and robots.

Re:Node.js and the new web front-end by rubiquity on Monday October 07, 2013 @01:18PM (#6509693)
Why can't you do these things in PHP (or whatever other language you're already using)?
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.

Re:Node.js and the new web front-end by Touche on Monday October 07, 2013 @02:06PM (#6510023)
Because that shouldn't be the responsibility of the business layer. Perhaps they are serving many apps other than just the web client, some of which don't want cached data.