Update: Jason Hoffman (Chief Scientist, Founder of Joyent) has written a very good response to this post. Obviously I owe him some responses, which is on a separate post.
If you have not watched Douglas Crockford’s video lecture on server-side Javascript, I recommend you do that first before reading further into this post.
I have been saying for a while that server-side Javascript matters. We, at Yahoo!, see a bright future in server-side Javascript and are making a big investment in it. But if you follow me on twitter, you’ll know that I am also looking into ensuring high-availability of server-side Javascript-based services on production. Which really comes down to something like: to V8 or not to V8.
NodeJS is currently tightly coupled to Google’s V8 engine. V8 was not designed as a server-side engine, but as a browser-based engine. Furthermore, V8 was designed squarely to run in Chrome’s multi-process model. As much as I think V8 is a brilliant piece of engineering, it’s software that was not designed to run on a server.
More to the point, it’s really up to Google to work with the community to make V8 work on the server-side. Sometimes Google is responsive, but sometimes it might not. It varies as it depends how fixing a bug or applying a patch may align with Google’s product roadmap and plans. I don’t know Google’s plans, and I suspect most NodeJS committers don’t know either.
Maybe for some folks this might not seem like a big problem. And probably, if you are running a site with a few thousand daily page views, it might actually not be a big deal. But to Yahoo!, and to others, it’s a big deal and we believe this is fundamental to the success of the NodeJS project.
Writing a Javascript runtime that does not fail is hard. Even the really smart V8 folks have explicitly designed V8 for failures to happen and safeguard the browser. In a browser, a JS engine failure is an inconvenience to the user: damn, you lost a tab. In a thread-per-request blocking I/O server design it’s also not a big deal, you lose one in-flight request. But in an event-driven web server, it’s a major flaw, you lose thousands of in-flight requests you have already accepted.
For NodeJS to scale to billions of page views like Yahoo!’s, we need to make sure the Javascript engine / VM behind Node is rock-solid for server-side loads, i.e. it fails extremely rarely.
Google may invest on supporting V8 on the server-side, just like the Mozilla folks do. Or somebody else might invest and ensure V8 is rock-solid on the server and Google may merge the patches nicely. Or maybe not, and the community may need to fork V8. Or something else … Nobody really knows.
Either way, it’s time for the NodeJS community to realise there is a roadblock and discuss it openly.
[...] Bruno Fernandez-Ruiz (Yahoo! Fellow, VP and Platform Architect) wrote about his concerns around the current tight coupling between node.js and V8. Feel free to take a moment and read the original article: “NodeJS: To V8 or not to V8″. [...]
[...] bruno fernandez-ruiz random code dumps « NodeJS: To V8 or not to V8 [...]
[...] is a response to this blog post by @olympum, with the rest of the thread being here and [...]
[...] NodeJS: To V8 or not to V8 [bruno fernandez-ruiz] [...]
[...] Bruno Fernandez-Ruiz (Yahoo! Fellow, VP and Platform Architect) has raised some concerns about the tight coupling of node.js to Google’s V8 engine. He raises the concern that V8 was primarily designed for the browser, and while the engine has been made to be fault-tolerant in a browser, it hasn’t necessarily been made the same way for code running on a server, where faults are more catastrophic and affect many more users. He also brings up a concern about Google’s responsiveness: “Sometimes Google is responsive, but sometimes it might not [sic].” [...]
A Fascinating Exchange on Node.JS, Google’s V8… and Control…
Back on Sunday, there was a fascinating exchange on blog sites about the tight linkage between Node.js and Google’s V8 JavaScript Engine. It started with Bruno Fernandez-Ruiz of Yahoo with his post: NodeJS: To V8 or not to V8 where he expressed h…
[...] QuestionAdd QuestionV8 (JavaScript engine) Node.js JVM Can V8 or node.js replace JVM?Follow-up on http://www.olympum.com/future/no… Add AnswerBIU @ Edit Link Text Show answer [...]
[...] http://www.olympum.com/future/nodejs-to-v8-or-not-to-v8/ [...]