Node v0.12.0

On February 6, a new version of Node.js v0.12 was released. It was a long and difficult process, not without losses for NodeJS, as a result of which io.js separated from the main branch , but, nevertheless, the list of innovations is quite impressive. Let's have a look.

Streams 3

As the developers promise, the thread implementation now works as expected. And most importantly, the old APIs introduced in v0.10 have not changed.

Added cork / uncork mechanism for applications that write to the stream several times synchronously. .cork () turns on buffering for all records in the stream, .uncork () flushes the entire buffer.


The maxSockets parameter is no longer limited to 5. By default, it is set to Infinity. So now the developer, or the operating system, can decide how many simultaneous connections the application can support.

The behavior of KeepAlive connections has also been changed. Now they will remain open until their timeout expires or the remote host disconnects. Thus, requests to extend the lifetime of the socket and libraries using this mechanics will stop working.


Added round robin mode of operation. It will now work by default. In this mode, the wizard will accept new connections and distribute them among worker processes.


Added spawnSync / execSync methods to spawn a child process synchronously. In my opinion, a very convenient function for writing some kind of system scripts. You won’t need to make noodles from callbacks anymore


The mechanism for allocating memory for buffers has been updated, the developers promise to reduce the consumed memory and accelerate the work of the garbage collector with buffers.


The crypto.setEngine (engine [, flags]) method has been added , allowing you to use your cryptographic algorithms.
Added methods for encryption / de-encryption with public and private keys (currently only RSA is supported).

crypto.publicEncrypt (public_key, buffer)
crypto.privateDecrypt (private_key, buffer)

Certificate class added.


A very interesting module for executing code in a sandbox. Subtleties and details can be found in the documentation .

From the sad. This release, as expected, came out with version V8 3.28.73. This means that there are no new features from ES6 Harmony. This, by the way, is the main reason why the guys from io.js left to make their fork.

In general, I have described far from all the changes; more details can be seen here and here .

As always, you can download the new Node.js on the official website .

Thanks for attention.

Also popular now: