The first build of what will become Node v0.12 was released about a year ago back in April of 2013. StrongLoop has been busy making significant contributions of code to v0.12, and we’ve added a bunch of cool new features including performance optimizations, cluster round-robin and the ability to run child processes synchronously.
We’re waiting eagerly for Node v0.12 to be released. Unfortunately, the release may not happen soon since there are about 800 open bugs and about 180 pull requests waiting to be reviewed. While this work is on going, we’ve starting thinking past v0.12 and begun work on other areas which could use improvement.
Flow Control, Error Handling, Long Stack Traces
Managing async flow and avoiding callback hell can be accomplished if you develop in a disciplined manner. However, handling errors in async flow in a clean and easy to follow manner can prove very challenging even for experienced Node developers.
I’ve been on the Node core team for quite some time (since 2011), so I’ve had the benefit of seeing a lot of attempts at solving this problem. For a long time Node.js had an ‘event-source’ branch that contained an attempt but it never worked well enough. and similarly I tried to solve the problem myself in early 2012 but I could not fit the pieces of the puzzle together at the time.
In Node v0.8 we got domains for which I had high hopes. Unfortunately, it’s behavior was and still is too surprising for most people to use it, and with
domain.dispose() deprecated (it never worked) I feel it lacks ambition.
In the past couple of months I’ve prototyped another library. I’d like to have as much feedback as I can get; Sam Roberts, Ben Noordhuis, TJ Hollowaychuck have had their shot. It’s your turn now: today I’m excited to make available Zone for general testing (and hopefully contributions!) so that together we can continue to evolve Node.
The ‘zone’ npm module provides the following:
- Automatic resource cleanup and layered exception handling
- Long stack traces
- Detection of and handling of common pitfalls with callbacks
- The association of arbitrary data with asynchronous control flow Read more