SlideShare a Scribd company logo
Node.js
             “Because nothing blocks, less-than-expert
           programmers are able to develop fast systems.”
                                        http://nodejs.org/#about




04/2010 Rocco Georgi, PavingWays Ltd.
Node.js
                   written in C and JavaScript
                   I/O framework
                   evented
                   non-blocking
                   server-side JavaScript
                   CommonJS module system
                   using V8
04/2010 Rocco Georgi, PavingWays Ltd.
written in C

                   ./configure
                   make
                   make install
                   #> node myfile.js



04/2010 Rocco Georgi, PavingWays Ltd.
I/O

                   network I/O
                   file I/O
                   * I/O




04/2010 Rocco Georgi, PavingWays Ltd.
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.
non-blocking

                   I/O is never blocking anything
                   callbacks on anything
                   everything in a single thread + loop
                   very small memory footprint



04/2010 Rocco Georgi, PavingWays Ltd.
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 object


04/2010 Rocco Georgi, PavingWays Ltd.
Benefits
                   low memory footprint per connection
                   high concurrency
                   “hanging” requests -> Comet
                   custom TCP/HTTP servers
                   active module community
                   e.g. WebSockets server


04/2010 Rocco Georgi, PavingWays Ltd.

More Related Content

PPTX
Introduction to Node.js
PDF
using Virtualbox NAT and shared folder
PDF
11 Java 7
PDF
A little waf
PPTX
Redis fundamental
PDF
Sử dụng TLS đúng cách - Phạm Tùng Dương
PDF
Locks (Concurrency)
KEY
Why Bundler 1.1 will be much faster
Introduction to Node.js
using Virtualbox NAT and shared folder
11 Java 7
A little waf
Redis fundamental
Sử dụng TLS đúng cách - Phạm Tùng Dương
Locks (Concurrency)
Why Bundler 1.1 will be much faster

What's hot (19)

PDF
Google country day_intervento
PPTX
Vert.x v3 - high performance polyglot application toolkit
PDF
Grsecurity - Theoretical and Practical Application
PDF
SenchaLabs Connect & Express
PPTX
Puppet - Instant Data Center
PDF
Visual Programming Framework for Unity - UniFlow のご紹介
PDF
DEF CON 27 - ANDY GRANT - unpacking pkgs
PPTX
Building real-time apps with WebSockets
PPTX
Blockchain
PDF
KSDG-iSlide App 開發心得分享
PDF
Cygwin+and+open ssl+install+guide
PDF
RubyでIdenticon RejectRejectKaigi 2008
PDF
NodeJS "Web en tiempo real"
PDF
Aloofix
KEY
Websockets - DevFestX May 19, 2012
PDF
Quick Introduction to Node.js
PDF
Introduction to Rust
PDF
Socket.io tech talk 06022014
PDF
Mise en place d'un client VPN l2tp IPsec sous docker
Google country day_intervento
Vert.x v3 - high performance polyglot application toolkit
Grsecurity - Theoretical and Practical Application
SenchaLabs Connect & Express
Puppet - Instant Data Center
Visual Programming Framework for Unity - UniFlow のご紹介
DEF CON 27 - ANDY GRANT - unpacking pkgs
Building real-time apps with WebSockets
Blockchain
KSDG-iSlide App 開發心得分享
Cygwin+and+open ssl+install+guide
RubyでIdenticon RejectRejectKaigi 2008
NodeJS "Web en tiempo real"
Aloofix
Websockets - DevFestX May 19, 2012
Quick Introduction to Node.js
Introduction to Rust
Socket.io tech talk 06022014
Mise en place d'un client VPN l2tp IPsec sous docker
Ad

Viewers also liked (8)

PPT
Presentatie HRO CDM2-svim 180610
PPTX
Introduction to IoT
PPS
世界十大惡犬(精彩)
KEY
Rimedi Naturali
PDF
Audit Log Protection: Avoiding a False Sense of Security
PPS
世界十大惡犬(精彩)
PDF
There is an api for that
PPT
Ladies Of The Skies
Presentatie HRO CDM2-svim 180610
Introduction to IoT
世界十大惡犬(精彩)
Rimedi Naturali
Audit Log Protection: Avoiding a False Sense of Security
世界十大惡犬(精彩)
There is an api for that
Ladies Of The Skies
Ad

Similar to Nodejs Intro (20)

PDF
Node.js and Ruby
PDF
Developing realtime apps with Drupal and NodeJS
PDF
Comet with node.js and V8
PPTX
Event-driven IO server-side JavaScript environment based on V8 Engine
PDF
Node.js and websockets intro
PDF
WebSocket
PDF
Nodejs a-practical-introduction-oredev
PDF
Node js techtalksto
PDF
Node.js and How JavaScript is Changing Server Programming
KEY
Node.js - The New, New Hotness
PDF
Node.js
KEY
Realtime rocks
PDF
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
PPTX
Web sockets Introduction
PDF
WebSocket Perspectives and Vision for the Future
KEY
node.js: Javascript's in your backend
KEY
Node.js - A practical introduction (v2)
PDF
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
PPTX
introduction to node.js
PDF
Nodejs - A quick tour (v6)
Node.js and Ruby
Developing realtime apps with Drupal and NodeJS
Comet with node.js and V8
Event-driven IO server-side JavaScript environment based on V8 Engine
Node.js and websockets intro
WebSocket
Nodejs a-practical-introduction-oredev
Node js techtalksto
Node.js and How JavaScript is Changing Server Programming
Node.js - The New, New Hotness
Node.js
Realtime rocks
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Web sockets Introduction
WebSocket Perspectives and Vision for the Future
node.js: Javascript's in your backend
Node.js - A practical introduction (v2)
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
introduction to node.js
Nodejs - A quick tour (v6)

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Tartificialntelligence_presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
1. Introduction to Computer Programming.pptx
Network Security Unit 5.pdf for BCA BBA.
Group 1 Presentation -Planning and Decision Making .pptx
Getting Started with Data Integration: FME Form 101
Programs and apps: productivity, graphics, security and other tools
A comparative analysis of optical character recognition models for extracting...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Tartificialntelligence_presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx

Nodejs Intro

  • 1. Node.js “Because nothing blocks, less-than-expert programmers are able to develop fast systems.” http://nodejs.org/#about 04/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 V8 04/2010 Rocco Georgi, PavingWays Ltd.
  • 3. written in C ./configure make make install #> node myfile.js 04/2010 Rocco Georgi, PavingWays Ltd.
  • 4. I/O network I/O file I/O * I/O 04/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 footprint 04/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 object 04/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 server 04/2010 Rocco Georgi, PavingWays Ltd.

Editor's Notes