We all know that today’s revolution in web apps is fueled by JavaScript and such libraries as JQuery, Dojo and Prototype. Pages nowadays load a ton of JavaScript in order to implement features that reside in a responsive client-side environment. Slideshows and other fancy effects of today are built with a few lines of code utilizing a combination of ready to use calls. JavaScript is as important as HTML and CSS in today’s web. No wonder Google’s Chrome focuses squarely on JavaScript performance. The keynote speech at Google I/O from last May is a prime example of this. Check out their demo at 16:10.
It is unquestionable that JavaScript has firmly established itself as a de-facto standard for client-side apps. But how about the back end? And is there really a need for JavaScript in the world of racks of servers running Apache, PHP, Python, Tomcat and Java in huge datacenters? After all, existing technologies have proven themselves. They bear the load of the Internet and quite successfully.
Turns out, old server-side technologies are not designed with real-time user interaction in mind. They are good at serving massive amounts of pages and have caching and scaling technologies to cope with increased load, but they are not really good for having constant back and forth communication with the user, which requires passing small amounts of data every time at a low latency.
Enter Node.js. It was developed by Ryan Dahl and made waves in the JS community last year. Node.js essentially implements the entire web stack with an event-oriented philosophy in mind. No more threads, no more I/O bottlenecks reading from file and database connections, it’s all callbacks. As in your browser.
This opens up new horizons for JavaScript. Not only it can be introduced to server-side, but it can provide some very real speed improvements. The technology is in its infancy at the moment, but the potential is there. Check out talk by Ryan Dahl.
Who knows, maybe in 5 years there will be a massive migration to frameworks based on Node.js. Just like there is a massive migration from static webpages to rich web apps today.
One Response