If you haven’t heard of Node, you’re not alone. Still in its infancy, Node is an input/output (I/O) engine written to implement server operations very rapidly using a methodology usually reserved for client-side code. Wait, what does that mean?
It’s all about events
Back when I started developing in Flash, the highest hurdle I had to overcome was the event-driven nature of the language. Flash is built to respond to events. The user clicks, a connection is made, an image finishes downloading, and so on. These are all events that can be listened for and reacted to. A more traditional language would execute statements in order until the program was complete, but this style caused the program flow to be asynchronous, which is to say, you never knew when things were going to happen. Fundamentally, this was a different style of programming than I was used to. This is also how Node works. It sits quietly waiting, using very little resources, until an event occurs.
People love bullet lists, so here are a handful of awesome things about Node:
- It doesn’t have all the overhead of a regular server. It’s just an I/O engine, and while it could be used to make a webserver, it has a much smaller footprint.
- Without getting too technical, each Node program is like an island (thus the name Node). The way Node programs have to communicate forces the programmer to build programs that are ready to scale.
What to build?
Once a developer knows about it, their first question usually is “This is awesome, but what would I build?” The answer is: anything. Loads of components are already built to act as webservers, access services like databases, and facilitate routing a la Ruby on Rails. There are, however, certain tasks Node would be very good at. It would work brilliantly if your program needs to response to events immediately, such as in situations like the following:
- Mobile apps that need dynamic navigation
- Games and interactive e-learning
- Integrating cloud services (think Cloud HQ, for instance)
If you want to find out more about node.js, check out this introductory video from the guy who invented it:
There’s always a moral
And this story is no exception: be careful what you scoff at. It may be the next big thing. Then you’ll be the jerk that scoffed at it. And you won’t get to ride in the swan boat.
We are just getting started with node.js. Stay tuned for more info on installing and configuring this little wonder. If you’ve used it and have any tips, let us know!