Showing posts with label node.js. Show all posts
Showing posts with label node.js. Show all posts

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.

Wednesday, 3 August 2011

Gary Short and node.js

NxtGenUG are proud to announce that Gary Short is visiting Hereford on Monday 8th August 2011, to talk about Node.Js. It seems that Node.js is gaining momentum in the developer community.

Gary's presentation will cover a quick introduction to Node.js before going on to de-construct a network appliance application written in Node.js. By the end of the session you will have a better appreciation for this language which is sure to become more important in the coming years.

According to WIKI:-
Node.js is an event-driven I/O server-side JavaScript (built on V8 JavaScript engine) environment for Unix-like platforms. It is intended for writing scalable network programs such as web servers. It was created by Ryan Dahl in 2009, and its growth is sponsored by Joyent, which employs Dahl. Node.js is similar in purpose to Twisted for Python, Perl Object Environment for Perl, libevent for C and EventMachine for Ruby. Unlike most JavaScript, it is not executed in a web browser, but is instead a form of server-side JavaScript. Node.js includes a REPL environment for interactive testing.

HTTP Server version of hello world in Node.js:
var http = require('http');
 
http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
    response.end('Hello World\n');
}).listen(8000);
If you would like to find out more then please register on the NxtGenUG site. The event is FREE for non members, details on how to find us are:-

Shire Hall
Union Street
Hereford
HR1 2HX

Monday, August 08, 2011, 7:00 PM - 9:00 PM

We hope to see you there.