Dev8ed Workshop: Node JS

May 30, 2012 by

Dev8ed Workshop: Node JS

Throughout Dev8ed there was a lot of interest in Node JS. Scott Wilson from JISC Cetis shared his experiences in a discussion-based workshop. He provided a brief overview of how Node JS was developed to solve the problem arising from the move towards HTML 5, which uses a lot more JavaScript. Node JS handles this by using the JavaScript engine in the browser and packaging it into a server or node. One of the main features is that it has no threads: everything is written in call backs. This means the memory footprint of the server remains flat. Node JS also provides a lot of low level APIs and the libraries are just JavaScript files, so there are already lots available all over the web which can be repurposed.

Wilson observed that it takes a bit of getting used to, as it is not like a normal server environment. However, it is really useful if you want to use sockets. He outlined how best to get started by using a text editor to write some JavaScript and create a server, noting that whilst the stability of the server is very good, the stability of the code base is not as good. It is still quite young so there is a lot of churn. People often start by building a chat bot, which is easy to do using Node JS.

Examples of use within an educational setting include use as an http monitor for sites, and for applications that rely on real-time activity. Wilson has written a lot of demos that replicate some of the features offered by Google Wave. There have also been lots of rapid game hacks, as Node JS is the quickest way to create a multi-player games. Wilson demonstrated ShareJS which is basically an etherpad in four lines of code. You can play with this at Wilson’s ambition is to build a massively multiplayer Pacman :-)

He stressed that Node JS is not for building a website. It is for doing he hard, fast, synchronous activities, so it is good for real time, multiplayer/multiuser activity, which makes it useful in education.

The group then shared their favourite Node JS applications, including Trello, and discussed where future developments would be useful – including the need for a console manager for managing multiple Node JS server instances.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>