Your SlideShare is downloading. ×
Nodejs Intro
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Nodejs Intro

1,046
views

Published on

This presentation was intended to be used at Frankfurt HTML5/CSS3 meetup in April. It wasn't but I still felt like uploading it ;)

This presentation was intended to be used at Frankfurt HTML5/CSS3 meetup in April. It wasn't but I still felt like uploading it ;)

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,046
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. Node.js “Because nothing blocks, less-than-expert programmers are able to develop fast systems.” http://nodejs.org/#about04/2010 Rocco Georgi, PavingWays Ltd.
    • 2. Node.js written in C and JavaScript I/O framework evented non-blocking server-side JavaScript CommonJS module system using V804/2010 Rocco Georgi, PavingWays Ltd.
    • 3. written in C ./configure make make install #> node myfile.js04/2010 Rocco Georgi, PavingWays Ltd.
    • 4. I/O network I/O file I/O * I/O04/2010 Rocco Georgi, PavingWays Ltd.
    • 5. evented var tcp = require(tcp); var server = tcp.createServer(function (socket) { socket.setEncoding("utf8"); event handlers socket.addListener("connect", function () { socket.send("hellorn"); for anything }); socket.addListener("receive", function (data) { event loop }); socket.send(data); no threads socket.addListener("eof", function () { socket.send("goodbyern"); socket.close(); }); }); server.listen(7000, "localhost");04/2010 Rocco Georgi, PavingWays Ltd.
    • 6. non-blocking I/O is never blocking anything callbacks on anything everything in a single thread + loop very small memory footprint04/2010 Rocco Georgi, PavingWays Ltd.
    • 7. server-side JS V8 engine CommonJS: file = module // this loads circle.js and the sys object var circle = require(./circle); var sys = require(sys); // use the sys and circle object sys.puts(circle area at radius 4 = + circle.area(4)); no window object04/2010 Rocco Georgi, PavingWays Ltd.
    • 8. Benefits low memory footprint per connection high concurrency “hanging” requests -> Comet custom TCP/HTTP servers active module community e.g. WebSockets server04/2010 Rocco Georgi, PavingWays Ltd.