News for hackers. Stuff that matters.
Re:The emperor's new clothes were built with Node.js by logn on Friday June 06, 2014 @10:22AM (#7858015)
I prefer http://silkjs.net

It handles each request in a forked subprocess so it's a lot more straight forward.

Re:The emperor's new clothes were built with Node.js by hardwaresofton on Friday June 06, 2014 @10:28AM (#7858053)
without sounding like a web 3.0 idiot -- how do you manage to scale that? subprocesses are not cheap
Re:The emperor's new clothes were built with Node.js by logn on Friday June 06, 2014 @10:45AM (#7858147)
I'm sure someone else reading can answer your question based on more experience and expertise than me... anyhow the subprocesses are re-used so there's no overhead in their creation. And if your server is doing I/O bound work (or is just waiting a lot) then it should perform ok. If everything is CPU bound, then you'd want to not create more subprocesses than cores. SilkJS lets you define the number of subprocesses you want.

More info:

http://silkjs.net/sync-vs-async/

Re:The emperor's new clothes were built with Node.js by hardwaresofton on Friday June 06, 2014 @11:06AM (#7858288)
Thanks for the additional info -- though I would argue that it starts to sound like apache+fcgi (not that it's bad), or unicorn+wsgi... I think node pushes async to an extreme that makes it truly different from what's out there. Unfortunately, it results in leaky abstractions, and lots of misguided enthusiasm as the post goes into...

You could think of pure functional programming (haskell/ml) as a similar extreme -- Haskell gets a lot of concurrency/parallelism guarantees for free just because of how the language was built (pure functions,etc)... Is it wrong to think that node took a similarly crazy step, but in their case, they weren't able to rebuild the language, and that's what you get?

If I wanted to event-loop, or lightweight thread stuff in python, I'd need some libraries, and many of the ones that you might find are not very easy to learn.

Re:The emperor's new clothes were built with Node.js by angersock on Friday June 06, 2014 @10:42AM (#7858128)
subprocesses are not cheap

This statement depends heavily on the runtime environment. Consider either Erlang or fibers as implemented in C/C++, for example.

Re:The emperor's new clothes were built with Node.js by erjiang on Friday June 06, 2014 @10:55AM (#7858207)
We usually only refer to OS-level processes as "subprocesses". You'll see terms like "lightweight threads", "greenlets", "fibers" for concurrency units managed by the application runtime instead.
Re:The emperor's new clothes were built with Node.js by hardwaresofton on Friday June 06, 2014 @10:59AM (#7858236)
Exactly what I meant -- thanks... Are you the erjiang that wrote the blog post? If so, thanks, I thoroughly enjoyed it
Re:The emperor's new clothes were built with Node.js by general_failure on Friday June 06, 2014 @11:21AM (#7858405)
I don't know about silk but forking subprocess model usually involves caching the subprocess. So it's going to be as light weight as any other cgi thing.