The rise of Node.js: JavaScript graduates to the server

Microsoft and others have already adopted this technology to extend JavaScript beyond the browser -- but it has limits developers must beware

By , InfoWorld |  Data Center

Mozilla is using Node.js in its identity project, for single sign-on for the Web. Because JavaScript is already the language of the browser, it makes sense that the programs that browser applications connect to are also written in JavaScript, says Mark Mayo, a principal engineer at Mozilla.

In November, Yahoo introduced its Cocktails technology for Web developers, featuring Node.js, JavaScript, HTML5, and CSS. Initial deliverables include Mojito, an environment-agnostic Web application framework for the client and server, and Manhattan, a hosted platform for Mojito applications. "The way we leverage Node.js in Manhattan is by having Node.js be the execution core of Manhattan," says Renaud Waldura, a senior product manager at Yahoo. Manhattan adds several high-end services not available in Node.js itself, such as security and isolation, he says.

Node.js also is catching on at lesser-known companies such as GroupDock, which provides a business application platform for HTML5 applications that can work on computers and mobile devices.

Node.js is no panacea Although Node.js is generating a lot of positive buzz, not everyone is sold on it. Ted Dziuba, a senior technical staff member at eBay, has posted a profanity-laced blog in which he declares, "Node.js is cancer." In the blog, he calls it a "scalability disaster waiting to happen." He also argues a server-side framework should not be written in JavaScript and says Node.js disobeys the Unix way.

"I got into most of the detail on my blog, but I believe that JavaScript is a bad server-side language because it was never designed to be a server-side language," Dziuba says. "Because JavaScript has always been client-side, browser implementers assume its use is pretty lightweight. For example, it was only in September that a Node.js server-side process could allocate more than 1GB of memory, because of limits in Google's V8 JavaScript engine."

Node.js creator Dahl acknowledges Dziuba's concerns, but says they are not mainstream: "This person makes complaints about how CPU- bound tasks can block a process -- which is true. Most servers we see are I/O-bound -- not calculating numbers in a tight loop -- so they do not hit this problem. If there is a CPU-bound part of a server, we provide a number of methods for running it in parallel -- which [Dziuba] does not consider (for example, a child_process.fork). It certainly is not a scalability disaster waiting to happen." Dahl cites the smartphone application builder Voxer, which runs hundreds of Node processes to do VoIP, processing thousands of parallel processes.


Originally published on InfoWorld |  Click here to read the original story.
Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question
randomness