Node.js is my latest inspiration

I’m really excited right now about this project called Node.js, by Ryan Dahl. (http://tinyclouds.org/node)

It’s a “purely evented” framework for writing real network client/server software in Javascript, built using Google’s V8 Javascript engine. Here’s a snippet from the Node site about what “purely evented” means:

…users of Node are free from worries of dead-locking the process—there are no locks. No function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems.

I have been preparing to work on a fairly massive side project which will involve a significant amount of identical code that will need to execute on both the servers and in clients/browsers. Javascript is pretty much the only ubiquitous target for client-side code, so my project would benefit greatly from executing server-side Javascript.

There have been more than a few server-side Javascript options over the years, but I recently was attracted to this Node.js project because of the very sensible continuation-based approach it takes to IO. Node places very explicit constraints on the manner in which any IO calls are managed— i.e. if you call any function that involves the network, filesystem, etc, you provide it a callback function to invoke when the IO operation returns something.

My experience with launching large scale public-facing web applications Ruby (http://qik.com and http://thepoint.com), has shown me that bottlenecks and hotspots will tend to be IO-bound. Add to the fact that Google’s V8 engine for Javascript is optimized for insane speed, you have one tight little processing engine for a comet-ready web server that can natively speak the language of the browser and of CouchDB!

Anyways, I’ve been hacking up some basics functionality to mimic the way Rails handles Routes/Dispatcher and Controller/Views, in Javascript, specifically for Node and will hopefully have something available online soon.

I don’t think I’ve been as excited by something like this since I found Ruby four years ago. Good one, Ryan!

posted 8 months ago on June 30th, 2009 at 02:21 /
Comments (View)
blog comments powered by Disqus