Node.js boosts load balancing, adds to API ahead of 1.0 release

Node.js 0.13 will follow, and 1.0 release will be 'insanely fast,' promises core code maintainer

Node.js, the popular implementation of JavaScript that takes it outside of a browser and into servers, is being fitted with load balancing and API improvements as a precursor to the planned 1.0 release.

Version 0.12 of Node.js, due soon, will feature round-robin load balancing for evenly distributing incoming connections across processes in a cluster, said Trevor Norris, Node.js core maintainer at Mozilla, during the Node Summit conference in San Francisco this week. Currently, cluster-module load balancing on Linux and Solaris was leading to skewed loads, he said.

Full multicontext support, another improvement planned for version 0.12, enables the running of two node processes on the same event loop within the same process. "This is one large step closer to implementing full Isolate support," Norris said.

API additions in release 0.12 include support for cork and uncork capabilities for messages. Applications have a cork setting in which data is written, whereupon uncork is implemented and data is pushed to the screen. "This is great when you're writing a whole bunch of messages and you don't care about those messages going out in real-time," noted Norris.

With the smalloc API, developers can implement their own bufferlike objects by allowing memory to be allocated to arbitrary objects. Treatment of external memory also can be specified. An asynclisteners API, meanwhile, enables developers to know the current state of all requests, preventing the misplacement of asynchronous requests. Developers also will be able to profile the CPU, the heap, and garbage collection.

The asynclisteners capability was praised by conference presenter Sean McCullough, a software engineer at Groupon. "That will allow us to do some really nice things that we couldn't do before" by providing a framework for distributed tracing, error handling, and performance profiling, McCullough said. "We'll be able to better understand how our apps are working." He also looks forward to improvements in performance and debugging in release 0.12. Groupon has moved its Web front end in the United States from Ruby on Rails to Node.js.

A formal 1.0 version of Node.js, however, is likely going to have to wait until after the release of both versions 0.12 and 0.13, Norris said. "What I see in 1.0 is we're going to able to implement even more of these low-level hooks that allow you to write even more performant applications." The 1.0 release is going to be "insanely fast," even more so than today, he said, claiming that developers should be able to put all their "hopes and dreams" on the 1.0 release.

Version 0.13 is less ambitious than 0.12. According to Norris, "It will be a branch specifically meant for performance enhancements and stability improvements." No API additions are planned for the 0.13 release, except for anything already done that needs to be changed. Norris stressed a desire for Node.js to be fun. "I really enjoy that users and developers can take it and have it not stand in the way of what they want to do."

This story, "Node.js boosts load balancing, adds to API ahead of 1.0 release," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Mobile Security Insider: iOS vs. Android vs. BlackBerry vs. Windows Phone
Join the discussion
Be the first to comment on this article. Our Commenting Policies