
What’s New in Node.js v0.12 – Performance Optimizations - jguerrero
http://strongloop.com/strongblog/performance-node-js-v-0-12-whats-new/
======
eknkc
I'm more excited to see that Ben Noordhuis is still working on Node.JS core.

And yay! for the round robin cluster scheduler. Got bitten by this myself. We
currently use different ports on each child process and distribute traffic on
our reverse proxy server (varnish) in front of node.

------
coherentpony
Ok, I'm going to seem incredibly blunt and perhaps ignorant here. Hopefully
someone can help me understand. I don't understand Node.js. Why do I care
about being able to write javascript on the server? I can just as easily write
a python script which, in my humble opinion, is much easier to read than
javascript. I don't want to turn this into a language bashing session as I
realise the argument can somewhat become a religous one. Is Node.js faster? Is
it easier to hook into a web server? Why?

Apologies in advance for any trodden toes.

~~~
ak217
No toes trodden on!

Advantages of node.js as I see them:

\- Provides npm (a state-of-the-art package manager which introduced a number
of innovations)

\- Built on V8, which is possibly the best dynamic language compiler made to
date, in terms of performance

\- Provides a well-done streaming I/O and event model, which many languages
fail at

\- Provides an extremely powerful and high performance async/concurrency
model, which is set to improve as promises and other concurrency patterns
mature

\- Has a well-tested, high-performance, properly layered standard library
(most of the time)

\- Has a nice C++ extension framework

\- Has a very active (though sometimes rough around the edges) developer
community

The downsides are:

\- It's Javascript, which has some serious design issues as a language

\- Currently still suffers from callback spaghetti, which is set to improve as
per point 4 above

\- Can be very hard to debug in the face of its async model because of
insufficient built-in debug facilities

~~~
zackbloom
I have to disagree with the Javascript design issues.

I've used both Python and Javascript for years, and the more I use Javascript
the more I realize how ad hoc Python really is. So many of it's features
(metaclasses, raising an exception to break iteration, the MRO, the import
behavior, etc.) seem to be hacky solutions to problems of it's own making.
Javascript is a much smaller, and therefore simpler language.

~~~
ak217
To each their own. I really dislike Javascript, and while Python is not
perfect, at least it has the right set of core values and a community process
that results in tangible improvement. I mean, you're complaining about the
finer points of Python OOP - to me, Javascript OOP is broken, and there is no
community standard to fix it.

What's wrong with raising exceptions to break iteration or with the import
behavior?

------
veeti
Slightly off-topic, but I've basically missed out on the entire Node train and
I'd like to get on it. What's the best way to get started? Official docs?

~~~
AH4oFVbPT4f8
Codeschool.com has a Node.js course

[https://www.codeschool.com/courses/real-time-web-with-
nodejs](https://www.codeschool.com/courses/real-time-web-with-nodejs)

Same question on SO

[http://stackoverflow.com/questions/2353818/how-do-i-get-
star...](http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-
node-js)

~~~
rfytrvru
StrongLoop has a few good videos to help you get a fundamental understanding
of what node.js is and how it works, highly recommend spending a few minutes
watching these:

[http://strongloop.com/developers/videos/#a-video-intro-to-
no...](http://strongloop.com/developers/videos/#a-video-intro-to-nodejs-
fundamentals)

[http://strongloop.com/developers/videos/#a-video-intro-to-
ho...](http://strongloop.com/developers/videos/#a-video-intro-to-how-node-
works)

For professional consulting, training and certification, check out
[http://strongloop.com/node-js-
consulting/strongexpert/](http://strongloop.com/node-js-
consulting/strongexpert/) as well.

------
cmbaus
Interesting on the corking stuff. I looked at this a long time ago
([http://baus.net/on-tcp_cork/](http://baus.net/on-tcp_cork/)) and found it
could make a significant difference for event driven applications.

~~~
justincormack
They arent actually using TCP_CORK though (its not portable), they are just
constructing a cork-like behaviour, using writev to write all the parts at
once.

~~~
cmbaus
Understood. It certainly is better to coalesce data with writev() than to use
TCP_CORK.

BTW, from my link: "If you need to write multiple buffers that are currently
in memory you should prefer the gather function writev() before considering
TCP_CORK with multiple calls to write()."

------
debacle
I'm really surprised Node hasn't hit 1.0 yet. What is the major stumbling
block?

~~~
Skinney
The next release after 0.12 is 1.0. They want to be sure that the APIs are
stable, secure and well designed before they push the 1.0 release.

------
Baliw
Does anyone know of a resource tracking the remaining todo's left before
Node.js 0.12 is released?

Every time I ask what the projected release date for 0.12 is I always get a
"When it's ready" response. That's fine, I understand the uncertainty of
software development like everyone else. But there really should be a
continually updated todo list of line items that when done will mark the
release of the next version.

I'm excited about generators and Koa. I just want to get an idea as to whether
I'm looking at a month, 6 months or a year before I can use them in a stable
environment.

------
jkrems
For someone who is really waiting for the 0.12.0 release, I hate that they
call their blog posts "What's New in Node.js v0.12".

~~~
yachtintransit
why?

~~~
Spiritus
I guess he thinks it sounds like an official release.

~~~
jclulow
It is certainly unfortunate that Strongloop have published this blog post in a
voice that implies 0.12.0 is already released.

For _official_ messaging around Node.js, you should definitely be looking at
[http://nodejs.org/](http://nodejs.org/) and
[http://blog.nodejs.org/](http://blog.nodejs.org/) instead!

~~~
morganherlocker
They also tend to word much of their social outreach in ways that imply they
are releasing it, not the community. I know they have some talented people who
work hard on core, but their marketing is pretty slimy and purposely
misleading in my opinion.

~~~
yachtintransit
well I don't have anything to say regarding the marketing group, but Ben and
Bert are legit. the contributions to node-inspector are great and the scaling
work is much appreciated.

------
runewell
I like Node because it let's me focus on a single language for my web apps. I
can even use many node libraries on the client-side.

Also, NPM is an excellent package manager and makes code-reuse and API
integration so much easier than other languages.

------
eliteraspberrie
I'm very happy about the AES-NI support. Thank you for the hard work!

------
james33
Nice overview, excited to finally get my hands on this!

