Wednesday, 10 August 2011

Gary Short does node.js

A big thank you to Gary Short as he drove a whopping 410 miles from Dundee to Hereford NxtGenUG to talk about node.js. Respect!

The presentation started with Gary taking it easy with us:-

  • He first explained what node.js was and how to install on Ubuntu it via the package manager apt-get 
  • We then went on to see how to run node.js via a putty client and saw a "hello world" example

At this point I could not work out why I would use node.js over using .net.

After pizza (yes we always serve pizza) Gary went on to show us how how node.js can monitor lots of twitter feeds and store the results into CouchDB. From here he then showed us how node.js can send back Json via a HTTP request. A simple webforms (!) project then pulled back this Json and produced charting.

The reason Gary chose Ubuntu was due to the fact that twitter servers are up and down like yoyo's and utilising Ubuntu allowed him to take advantage of Upstart and respawn.

The benefits of using node.js are:-
  1. It can run on a low spec machine as it runs linux (Ubuntu)
  2. It is totally non blocking and does not deadlock
  3. It only uses a small heap allocation as it sleeps until a connection is made
  4. It uses less compute cycles as it employs a callback strategy, that it sleeps until the callback is made
  5. It can handle heavy loads of HTTP traffic
  6. It is therefore ideal for the cloud where you pay for compute cycles

All in all the presentation was a real eye opener and I for one would recommend it to anyone. I think he has a proposed a more advanced session for DDD North

If you would like to see any future sessions at Hereford then please click here.

1 comment:

  1. Thanks for the write up and I'm glad you liked the talk! I do have a NodeJS talk proposed for #DDDNorth but not this one, a more advanced one, hope you can make it along.