It’s hopeless trying to keep up with developments in the Node.js community. Believe me, I’ve tried.
Once upon a time, I held out hope that I would be able to keep my finger on the pulse of Node-related discourse, but it all turned out to be in vain. New modules are added and updated to npmjs.org on an almost minute-by-minute basis. It’s enough to make your head spin (in a good way, if that makes sense). However, there have been a few big and bold movements in the Node.js space that have caught my attention recently that I think are incredibly promising and that I just couldn’t keep to myself: desktop client creation with App.js and WebRTC.
Make some room, Qt: App.js is the new kid in town
Possible use cases include building image editing clients into the browser, like this one. Or maybe a basic task monitoring tool. Or maybe even a desktop game linked to a web server (though I have yet to find one). I can also imagine using App.js for building CRM-style clients, text editors, word processors, and much more.
Sure, a lot of people argue that desktop clients (and desktops in general) are on the way out and that it’s all about the browser now and forever more. But that strikes me as being more than a bit hasty. People still use all kinds of desktop apps and the ability to produce them easily and without knowledge of lower-level programming languages strikes me as a major win. In addition, being able to easily a general desktop client-style feel within the browser quite often gives things a highly professional feel. When I’m using something like Cloud9 IDE, for example, I don’t feel like I’m using just any old web app. I feel like I’m using something polished and powerful.
App.js is nothing if not very promising at the moment.
WebRTC: using Node to cut out the server middleman
One of the assumptions that’s usually made about the architecture of the web as we know it is that clients (browsers) communicate with servers. The browser makes requests to servers, the server pumps information back, and that’s simply the end of the story.
The rise of so-called “thick clients” has done a lot to change this picture by enabling more and more functionality to happen without communication with the server. Client-side MVC frameworks like Backbone, Knockout, and Angular have enabled developers to do amazing things, from browser caching to in-browser pub-sub to complex view-to-data model interaction, and this has thoroughly changed our whole sense of what browsers are for and how we should use them.
WebRTC is a young but promising technology that seeks to shake things up once again by cutting the server out of the equation and allowing browsers to simply communicate with one another directly. WebRTC (Real-Time Communication) is a browser-to-browser communication protocol that enables browsers to talk to each other without an intermediary. It’s been argued that the ChatRoulettes, Skypes, and Google Hangouts of the future will take place via WebRTC. Implementing this technology with Node isn’t brand new, as projects like this one from eight months back attest, but it is still somewhat immature and hasn’t seen broad based implementation. That’s too bad because the potential is enormous.
In the Node community, there are efforts underway to integrate WebRTC-style functionality into Node applications. The Web-RTC and WebRTC.io libraries are currently the most mature examples. Web-RTC is an attempt to provide a Node implementation of a video chat client introduced (and later abandoned) by Ericsson (the creators of Erlang). WebRTC.io seeks to enable you to connect directly to other browsers via simple
rtc.connect functions. Outside of the Node universe strictly speaking, there are promising efforts to work WebRTC functionality into HTML5. This is all very new, but the possibilities are boundless: sophisticated chat clients, peer-to-peer games, new forms of data transfer and information sharing, and much more.
Google Chrome has thus far been a standard bearer in making WebRTC more widely used, and it looks like Internet Explorer, the last major holdout amongst the major browsers, will be getting in on the game soon, although it will be doing so in ways that are not entirely aligned with Google’s proposed vision. It remains to be seen how cross-browser standardization, if any, will be implemented. Unfortunately, if history is any indication, we simply can’t expect this. What we can hope for, however, is that the Node community will come up with ways to easily manage cross-browser compatibility.
WebRTC and Node are simply a perfect fit for one another, for both share the same goal of making the real-time web a reality, and a relatively easy-to-implement one at that. Let’s just hope that browser politics don’t get in the way. Stay tuned to happenings in the WebRTC realm, because developments there could be some of the most compelling in the web development universe in the coming years.
More on the way
Given the continued exponential growth rate in the Node module galaxy, I can only imagine that there is lots and lots more to come. Like I said, I’m having trouble keeping track of new innovations–and sometimes even new paradigms–within the Node world. So please feel more than free to share your most recent Node-related discoveries in the comments. I’m all ears!
Big shout-out to Chris Matthieu of Nodester, who, in addition to being an all-around cool guy, alerted me to the existence of both App.js and WebRTC for Node. If anyone comes close to knowing everything that’s going on in the world of Node, it’s him.