The rise of Node.js: JavaScript graduates to the server
- 07 February, 2012 22:11
- Comments
Although it is just three years old, Node.js is gaining traction as an application development platform, letting developers extend JavaScript beyond the browser and into servers. But questions remain about JavaScript's appropriateness on servers and developers' readiness to use it.
Invented by Joyent developer Ryan Dahl, Node.js -- or simply Node -- is getting endorsements from established companies such as Microsoft and Yahoo, as well as from smaller ventures. Geared to network application development, the platform is built on the Google Chrome V8 JavaScript engine and features an event-driven, nonblocking I/O model that advocates say make it ideal for data-intensive, real-time applications running across distributed devices.
[ Read InfoWorld's interview with Node.js creator Ryan Dahl, where he discusses the basics of Node.js. | Subscribe to InfoWorld's Developer World newsletter for the latest news and insights on software development. ]
Dahl even sees Node.js displacing Java on servers. "Java got very complicated, and what was really nice about JavaScript two years ago was that it was this very simple language," Dahl says. "It had strings, and it had numbers and functions, but there really wasn't all that [much] else to it." But JavaScript did have capabilities such as closures and anonymous functions, Dahl noted: "That kind of set the stage to introduce a new server paradigm that focuses on nonblocking I/0."
JavaScript founder Brendan Eich, CTO at Mozilla, is not surprised that JavaScript has been extended beyond the browser and into servers. "I expected it because Netscape actually wanted to do that," Eich says. Developers "like a full-stack, end-to-end, one-language development model."
Big-time support for Node.js Microsoft is backing Node.js as a development language on the company's Windows Azure cloud platform. The company offers its Windows Azure SDK for Node.js. "Over the next couple of weeks, you're going to see basically us round out all of the features of Azure to have integrated Node.js libraries," says Microsoft vice president Scott Guthrie.
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.
Node.js, says IDC analyst Al Hilwa, has strengths in Web applications that follow an event-driven model: "The asynchronous nature of the language and its similarity to JavaScript, which is of course not Java, are the key assets making it much easier to express concurrency in the application." But he adds there is a big gap between developers who can use JavaScript at the basic level and those sufficiently skilled enough to build complex applications, such as what Node.js requires. "This situation is improving and the JavaScript syntax is being more broadly adopted by many tools and runtimes, but it would be a mistake to assume that any JavaScript developer is sufficiently skilled with Node.js to hit the ground running in a project."
Whereas Dahl sees Node.js as a Java replacement on servers, others disagree. "The short answer is no, we don't see Node.js displacing PHP or Java," says Solomon Hykes, CEO of DotCloud, which offers a cloud computing platform that supports Node.js. "But we're seeing two very important trends: First, the landscape of server-side languages and frameworks is increasingly fragmented -- and applications increasingly need to combine several of them to be successful. So we're going to see more of Java and Node.js, more of PHP plus Node.js, for example, all working together in the same application."
Where Node.js is headed The developers of Node.js hope to have a stable 0.7 release of the platform ready by March. It will support isolates, a type of parallel JavaScript thread. This enables shared memory between isolates in add-ons and allows for advanced optimization techniques such as rendering multiple parts of a page in parallel, Dahl says.
A formal 1.0 version should arrive this summer, Dahl says. Among features planned for Node.js, although not necessarily in the 1.0 release, are binary modules, which allow developers to interface with system libraries written in C. "For example, if you needed to connect to Oracle, you would want a binary module to interface with the database driver," he says. Also eyed is a versioning scheme for APIs, in which internal APIs would be labeled with a stability level.
With developers latching onto the opportunity to use JavaScript beyond browsers, Node.js's usage is destined to grow. Its acceptance by major technology players gives it a place alongside technologies such as Java and PHP, even if it is still a very young platform.
This story, "The rise of Node.js: JavaScript graduates to the server," was originally published at InfoWorld.com. Follow the latest developments in application development at InfoWorld.com. For the latest developments in business technology news, follow InfoWorld.com on Twitter.
Read more about application development in InfoWorld's Application Development Channel.
Join the CIO Australia group on LinkedIn. The group is open to CIOs, IT Directors, COOs, CTOs and senior IT managers.
- Bookmark this page
- Share this article
- Got more on this story? Email CIO
- Follow CIO on twitter
- JavaScript conquers the server : Application Development - InfoWorld
- Google boosts garbage collection for Chrome browser : Application Development - InfoWorld
- Node.js inventor extends JavaScript programming beyond browsers : Application Development - InfoWorld
- Newsletter Subscribe - InfoWorld
- What JavaScript's inventor really thinks about Google Dart : Application Development - InfoWorld
- Download InfoWorld's megaguide to HTML5 : HTML5 - InfoWorld
- Node.js is Cancer
- The rise of Node.js: JavaScript graduates to the server : Application Development - InfoWorld
- Business technology, IT news, product reviews and enterprise IT strategies - InfoWorld
- 12 essential programming tools for the mobile Web Channel - InfoWorld
- Application Development - InfoWorld
-
Australia's first 4G smartphone is the HTC Velocity 4G
-
Swedish e-commerce startup's execs linked to NYC sex crime
-
Face Time - Interview with John Brennan and Robert DiStefano
-
How to implement next-generation storage infrastructure for Big Data
-
Pfizer's Future Depends on IT Transformation
-
Oracle Database 11g Product Family
Oracle Database 11g is available in a variety of editions tailored to meet the business and IT needs of all organisations. This paper outlines the features and options available with each edition of Oracle Database 11g. Read on for more details. -
How to Choose an SMB - Unified Communications as a Service (UCAAS) Solution
The on-premise deployment of Unified Communications (UC) continues to be a source of considerable corporate angst especially for the Small to Medium Business (SMB) sector. IT research firm Gartner believes UCaaS will be adopted as an adjunct service by large enterprises and as a core service by SMBs before 2015. To help SMBs choose the best offering and develop a suitable roadmap Computerworld has prepared this special feature profiling the major offerings in the Australian market. -
Workshifting: a global market research report
New business requirements are transforming the demands placed on IT. To operate effectively in today’s fast-paced global environment, organisations need to be able to get work done anywhere, anytime, by any type of worker to achieve the best results. This is the context for the rise of workshifting—the practice of moving work to the most optimal location, time and resources. As one of the most comprehensive reports ever conducted into the role of desktop virtualisation in enabling workplace flexibility and mobility, it reflects the growing consensus of those using technology to improve the performance of their organisation.
-
B&N.com Microsoft Games Free CD
-
Internet Privacy for Dummies
-
Wrox's Visual C# 2005 Express Edition Starter Kit
-
Excel 2010 Workbook for Dummies®
-
Microsoft Train Simulator (Sybex Official Strateg Ies and Secrets)
-
Professional Vb 2005 with .Net 3.0 Extensions
-
Caution! Wireless Networking
-
Beginning Microsoft Visual Basic 2008
-
Common Design Patterns for Symbian OS - the Foundations of Smartphone Software








Comments
Post new comment