Microservices Matters

Mar 5 2012   3:36PM GMT

Node.js: Bubbling up from JavaScript

Brein Matturro Profile: Brein Matturro

Jack Vaughan, Site Editor

Bubbling under the mainstream of computing these days is the fast growing phenomenon of Node.js – a framework built on Google’s Chrome JavaScript virtual machine and providing a type of server-side JavaScript experience. 

Node.js employs an event-driven architecture and a non-blocking I/O model, and it provides some blindingly fast performance to some types of data-intensive Web apps.  It seems to take a very-light-weight component approach that distinguishes it from even lightest of the lightweight Java servers, while, some would say, harkening back to C and C++ servers that predated the Java server. Node.js is written in C and C++ and, on one level at least, it seems the province of the system programmer rather than the typical application developer. But it is programmed via JavaScript.

LinkedIn, Yahoo and eBay are among ardent Node users (‘’js’’ is sometimes jettisoned and it’s simply called ‘’Node’’), and a recent West Coast Node conference was graced by none other than Microsoft, which is toying with end-to-end JavaScript coverage on its Azure cloud. But it may be said that none are more out front on the Node.js wave than IaaS cloud provider Joyent, which went ahead and hired Node.js creator Ryan Dahl. As a cloud provider, Joyent is driven to optimize performance of its server farms, especially for Web application handling.

We recently caught up with Joyent CTO and co-founder Jason Hoffman to learn more about Node.js. We asked why Joyent took the Node.js route. He said:

“Why we did it is, at Joyent we have a lot of servers, more than most companies in the Fortune500 and we write in C, in a compiled language. We needed to write servers in a dynamic language for talking to certain protocols. Basically, we had to write service endpoints. The Node part of Node.js is separate. It is designed so that it can handle a lot endpoints – on the order of a million. Most things written for the [Java Virtual Machine] can only handle 20,000 [endpoints]. Node is meant to handle a lot of I/O.So we took the node part and married that with V8 [the JavaScript virtual machine from Google].”

Node.js comes without the baggage of early platforms or frameworks. ‘’It has no history of blocking’’ said Hoffman, describing classic program languages as ‘’non-event driven languages.’’ He suggests that the idea of client side JavaScript turning around and running on the server side would not be possible if it weren’t paired with the V8 JavaScript VM. It acts like an application server, or container.

The VM enables the ability to do an event-driven server, he said. Nod, in effect, becomes a framework that shows you how to write a server in JavaScript.

“It’s meant to be very easy. It’s meant to let someone write a server,” said Hoffman. “When we look at the general interest – most businesses are having to do API endpoints today. When you let more people connect via mobile devices, you have a lot more people connecting. Rather than having to have hundreds of servers, you can add two or three.  Node.js is just a very easy way to write endpoints.”

Is it easy enough for a developer legion to grapple with? Maybe, as long as the tools that cover over the complexity for the enterprise come into being. Node.js is a far cry from Web services, representing in a way a new take on some earlier pedal-to-the-metal architectures. But it may help overall to speed and streamline REST services, especially in mobile app settings. It seems poised perhaps to give a further boost to the often maligned JavaScript language, which got a just-in-time boost via the flood of Ajax frameworks that arose almost ten years ago.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: