BT

Node.js 0.10 Released

by Zef Hemel on Mar 13, 2013 |

The Node.js development team has released version 0.10 of node.js, the Javascript-based platform for building high-performance asynchronous servers. The release features an easier to use module for handling streams, better error handling with domains, and performance improvements. The team also announced that after version 0.10, one more stable release (0.12) will follow before its 1.0 release.

Streams are a core part of node.js and have undergone a significant change in 0.10. Streams provide a common interface to any type of readable or writeable data stream, abstracting over whether the stream is backed by a file, a running process or a socket. Before version 0.10, data packets were emitted as data events that started to arrive immediately when the stream was opened. A common problem was that data packages were missed, because they arrived before the program had a chance to start listening to the data event. While 0.10 still has a backward compatibility mode exposing this same behaviour, the recommended way is to listen to a readable event, and on arrival, to explicitly make a call to .read() to retrieve buffered data. As a result, it is much harder to miss data packets.

Before version 0.8 of node.js, the default behavior for an unhandled exception was for the entire server process to crash. To avoid this problem, and give more control over the behavior of unhandled exception, version 0.8 of node.js introduced an experimental version of domains. Domains are a mechanism to localize crashes. For instance, it is possible to create a domain for every incoming HTTP request. If any code that is attached to the HTTP request domain crashes, only the domain dies, not taking the entire server process down with it, thereby localizing the crash to just the single HTTP request. In 0.10 the status of domains has been elevated from "Experimental" to "Unstable" and fixes various edge cases and provides better debug information.

The node.js community has grown significantly over the past years and has seen increased interest from the enterprise. In response, companies such as The Node Firm and StrongLoop have launched that provide paid node.js support, training and consultancy. StrongLoop launched a beta of StrongLoop Node, a fully supported distribution of node.js that includes various popular modules, following a model similar to Typesafe in the Scala community.

Prebuilt binaries of the official node.js 0.10 release can be downloaded for all popular operating systems, including Windows, Mac, Linux and Solaris. Of course, as node.js is an open source project, its source code is available as well.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT