Wednesday, March 2, 2011

NodeJS: Non-Blocking Server Side Javascript


NodeJS: Non-Blocking Server Side Javascript

Abstract:
Multi-process models, in software like Apache web server, helps to add concurrency, to scale up. Similarly, multiple processors and later cores, adds concurrency in a hardware medium. Multiple threads sharing a process at the software layer assists in scaling higher while reducing the penalty of context switches. Multiple threads at a hardware layer also helps mitigate the penalty of memory accesses away. To continue to scale at the application layer, the migration to asynchronous programming allows for simple scaling, but programming language infrastructure had traditionally been negligent in facilitating the scaling easily. NodeJS, modeled using JavaScript, is a new framework to facilitate event driven server side programming where massive scale is required.

A Little History: X, Netscape, Navigator, LiveScript, LiveWire, JavaScript
One of the most ubiquitous frameworks which moved from synchronous to asynchronous was the X Windows system. This windowing system, produced by x.org, is indigenous on nearly every UNIX and Linux system. The next great user interface move was the web browser, to serve (through HTTP protocol) static content (HTML) with images, which became popular from Netscape through their Navigator browser. In an attempt to convert static pages to dynamic pages of data, LiveScript was create on the Netscape Navigator client and server side (as LiveWire.) LiveScript, renamed to JavaScript, leverages an event driven architecture in an application browser and web server, like X Windows was before it.

June 2009 Demo of NodeJS
Ryan Dahl, the creator of NodeJS, works at Joyent. In this early video, he presents his creation of Server Side Java Script programming framework, which is nearly all event driven.

Slides from the 2009 JSConf
These are the PDF slides from the 2009 JavaScript Conference, 2009 November 8.

Slides from the 2010 JSConf
These are the PDF slides from the 2010 JavaScript Conference, 2010 April 14

Video from the May 2010 Yahoo Talk
An introduction video to NodeJS presented at Yahoo on 2010 May 5.

Network Management Connection
Network Management becomes difficult when scaling to manage tens of thousands of devices and millions of managed virtual objects. The necessity to move to light transports like ICMP and UDP, was well understood, and could easily be made asynchronous. NodeJS would make a fine framework to model future network management infrastructure in, once it is stable.

No comments:

Post a Comment