Book Review: Node: Up and Running

I just finished "Node: Up and Running: Scalable Server-Side Code with JavaScript" Overall it was a really good book and I really like the idea of nearly every single request being asynchronous w/ the use of callbacks. The overhead of this style of programming as a web server (i.e. heaving network i/o) is so light as far as memory consumption. I can definitely think of use cases to use node cli scripts if I had to scale some action to hit lots of servers! My biggest take-away's from the book:

Using the same language on the server and the client

Javascript is obviously ubiquitous in the browser. This is huge when you can literally use the same library and code when it comes to using some hot new features like WebSockets, or many of the other Socket.IO features. Also your devs don't have to create api's in php/python/ruby on the server, and implement client code in javascript to talk to it. It is all one in the same.

Event-driven asynchronous programming is super fast

The apis that node implements makes creating asynchronous applications very easy. Even though it technically only has one main event loop, they're process api makes it very easy to use your node application on all cores on your box in a very cross platform way that does not involved the main event loop to process requests. They all listen on the same port and allow the kernel/OS basically round robin the requests. Nice.

The community is strong and they have some really cool projects

A few that are interesting to me is the Express framework to implement a MVC architecture. Also some of the templating systems, like jade, are quite refreshing to use (at least compared to my experience with python template systems). Also the Socket.IO library seems to be quite complete as well. Lastly all of the session management, memcache, db, nosql libraries are availablie with the npm package manager.

All-in-all I'm very happy that I read this book. While I can't say I think javascript is the prettiest language (c-style for loops, curly braces, etc), I really like what they've done with node. I'm a fan of coffeescript that is a language that very much resembles python that compiles to javacript. And lastly, this is my first book I've used Safari Books Online on my iPad. I only have the $10/month subscription and already it's paid for itself this month as this book is $15 in the kindle store. Sweet. I definitely have plenty of digs on the Safari iPad app but that is for another post :)

Here is a link to the book for those interested!