SlideShare a Scribd company logo
Server-Side JavaScript
   Developement
       Node.JS Quick Tour

      q3boy <q3boy1@gmail.com>
        from http://cnodejs.org/
Server-Side JavaScript
    Development
Aptana Jaxer (SpiderMonkey)




      Helma (Rhino)
•
•
Revelutions in 2009
•   CommonJS (ServerJS), by Dangoor

•   JSConf, by Chris Williams & Iterative Designs

•   Node, by Ray Dahl.
Node's goal is to provide an easy
way to build scalable network
programs

                   -- nodejs.org
Ray Dahl
• 1/5/2009 Ryah Dahl
• 2/15/2009
• 5/31/2009
• ......
• 11/16/2010 v0.3.1
•        wiki   600 module

•   20

•
• libev (event loop)
• libeio (nonblocked posix, thread pool)
• v8 (javascript engine by google)
•
•
•
io




io
io




io
-

•
•
•
-

•   cpu


•
- Web Worker
• AMD Opteron 2200 , 4G RAM
• socket client 20,000+ qps
• socket server 17,000 qps
• http server 4,400 qps
•            30~40m
• see more. <http://nodejs.kongwu.net/blog/?
  p=8>
• SSL
• Windows
• 1G        (by v8)
• Web
•
• Spider
Digg in the node
$ git clone git://github.com/ry/node.git
$ cd node
$ ./configure --prefix=$HOME/node
$ make install
Hello World!




Familiar & Simple
$ node singleThread.js
1
2
3
4
CommonJS




$ node CommonJS.js
foobar
io




$ node nonblocking.js
Reading my.txt ...
my.txt
Here is contents in "my.txt".
HTTP
TCP
      $ node tcpServer.js &
      $ telnet locahost 1234
      Welcome!
      > Node is so Cooool.
      Node is so Cooool.
      >
$ node watchFile.js &
$ sleep 3; touch my.txt
the current mtime is: 1292594780000
the previous mtime was: 1292594752000
$ node childProcess.js
hello
world
String vs Buffer

         String

•
• node               v8 String    ,
    socket              memcopy

•            v8 gc
String vs Buffer




    With String
String vs Buffer




    With Buffer
With String
With Buffer
Want to see more?
• PHP: pear
• Python: PyPI, setuptools
• Ruby: Gems

• Node:
$ cat >>~/.npmrc <<NPMRC
root = ~/.node_libraries
binroot = ~/bin
manroot = ~/share/man
NPMRC
$ curl http://npmjs.org/install.sh | sh


$ npm ls
$ npm install package_name
$ npm update
IDE base on node




 http://www.cloud9ide.com/
Links
• http://www.commonjs.org/
• http://nodejs.org/
• http://howtonode.org/
• https://github.com/ry/node/wiki
• https://github.com/ry/node/wiki/modules
• https://github.com/isaacs/npm
Node js quick-tour_v2
Node in Taobao
•   UED
    •   nodejs-kissy by         <bachi@taobao.com>
•   EDP
    •   http://cnodejs.org/ (                     node    , coming
        soon)
    •   node-reverse-proxy (                  ,           , coming
        soon)
    •   node-myfox (mysql                2011 Q1)
    •   node-glider (                                2011 Q2)
    •   node-kvproxy (key-value                   2011 Q2)
Node js quick-tour_v2
Ad

More Related Content

What's hot (19)

Node.js - The New, New Hotness
Node.js - The New, New HotnessNode.js - The New, New Hotness
Node.js - The New, New Hotness
Daniel Shaw
 
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Codemotion
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
Future of NodeJS
Future of NodeJSFuture of NodeJS
Future of NodeJS
Sébastien Pertus
 
Node.js - A practical introduction (v2)
Node.js  - A practical introduction (v2)Node.js  - A practical introduction (v2)
Node.js - A practical introduction (v2)
Felix Geisendörfer
 
Presentation of JSConf.eu
Presentation of JSConf.euPresentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
 
Node.js - A Quick Tour II
Node.js - A Quick Tour IINode.js - A Quick Tour II
Node.js - A Quick Tour II
Felix Geisendörfer
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
JITENDRA KUMAR PATEL
 
Node.js - As a networking tool
Node.js - As a networking toolNode.js - As a networking tool
Node.js - As a networking tool
Felix Geisendörfer
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
Sudar Muthu
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 
Server side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPServer side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHP
Marc Gear
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3
Felix Geisendörfer
 
Dirty - How simple is your database?
Dirty - How simple is your database?Dirty - How simple is your database?
Dirty - How simple is your database?
Felix Geisendörfer
 
NodeJS Concurrency
NodeJS ConcurrencyNodeJS Concurrency
NodeJS Concurrency
pgriess
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
fukamachi
 
Nodejs - A quick tour (v4)
Nodejs - A quick tour (v4)Nodejs - A quick tour (v4)
Nodejs - A quick tour (v4)
Felix Geisendörfer
 
Node.js - The New, New Hotness
Node.js - The New, New HotnessNode.js - The New, New Hotness
Node.js - The New, New Hotness
Daniel Shaw
 
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Codemotion
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
Node.js - A practical introduction (v2)
Node.js  - A practical introduction (v2)Node.js  - A practical introduction (v2)
Node.js - A practical introduction (v2)
Felix Geisendörfer
 
Presentation of JSConf.eu
Presentation of JSConf.euPresentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
JITENDRA KUMAR PATEL
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
Sudar Muthu
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 
Server side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPServer side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHP
Marc Gear
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
Dirty - How simple is your database?
Dirty - How simple is your database?Dirty - How simple is your database?
Dirty - How simple is your database?
Felix Geisendörfer
 
NodeJS Concurrency
NodeJS ConcurrencyNodeJS Concurrency
NodeJS Concurrency
pgriess
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
fukamachi
 

Viewers also liked (19)

調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
博行 門眞
 
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v22013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
Pascal Van Loo
 
Sealy Publications
Sealy   PublicationsSealy   Publications
Sealy Publications
jemels
 
Engraving Services Australia
Engraving Services AustraliaEngraving Services Australia
Engraving Services Australia
engravingservices
 
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Pascal Van Loo
 
Pasas Case Complex Groupmediation
Pasas Case Complex GroupmediationPasas Case Complex Groupmediation
Pasas Case Complex Groupmediation
Pascal Van Loo
 
2011 TTT VOV The Training Transition Lancering
2011 TTT VOV The Training Transition Lancering2011 TTT VOV The Training Transition Lancering
2011 TTT VOV The Training Transition Lancering
Pascal Van Loo
 
Clark
ClarkClark
Clark
Coolclark
 
Pasas Mediation op vov beurs 2013
Pasas Mediation op vov beurs 2013Pasas Mediation op vov beurs 2013
Pasas Mediation op vov beurs 2013
Pascal Van Loo
 
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Pascal Van Loo
 
Sealy Publications
Sealy   PublicationsSealy   Publications
Sealy Publications
jemels
 
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Pascal Van Loo
 
20141124 presentation innovative knowledge sharing put into practice in 3 cas...
20141124 presentation innovative knowledge sharing put into practice in 3 cas...20141124 presentation innovative knowledge sharing put into practice in 3 cas...
20141124 presentation innovative knowledge sharing put into practice in 3 cas...
Pascal Van Loo
 
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
Pascal Van Loo
 
Kalandorok - március - Burgenland
Kalandorok -  március - BurgenlandKalandorok -  március - Burgenland
Kalandorok - március - Burgenland
1901fszek
 
Triászok - március - Bécs
Triászok - március - BécsTriászok - március - Bécs
Triászok - március - Bécs
1901fszek
 
Powerpoint 2003
Powerpoint 2003Powerpoint 2003
Powerpoint 2003
Uuz Zeaps
 
INROADS presentatie
INROADS presentatieINROADS presentatie
INROADS presentatie
INROADS
 
調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
調和道 『藤田霊斎 丹田呼吸法』 Zen Breathing
博行 門眞
 
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v22013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
2013 hub kaho university college onderwijsdag lezing ttt 5 rolmodel v2
Pascal Van Loo
 
Sealy Publications
Sealy   PublicationsSealy   Publications
Sealy Publications
jemels
 
Engraving Services Australia
Engraving Services AustraliaEngraving Services Australia
Engraving Services Australia
engravingservices
 
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Werken aan waardengedreven netwerkorganisatie bij AgSO Pascal Van Loo, Pasas ...
Pascal Van Loo
 
Pasas Case Complex Groupmediation
Pasas Case Complex GroupmediationPasas Case Complex Groupmediation
Pasas Case Complex Groupmediation
Pascal Van Loo
 
2011 TTT VOV The Training Transition Lancering
2011 TTT VOV The Training Transition Lancering2011 TTT VOV The Training Transition Lancering
2011 TTT VOV The Training Transition Lancering
Pascal Van Loo
 
Pasas Mediation op vov beurs 2013
Pasas Mediation op vov beurs 2013Pasas Mediation op vov beurs 2013
Pasas Mediation op vov beurs 2013
Pascal Van Loo
 
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Presentatie Pascal Van Loo via SD WOrx voor kbc adviesvaardigheden v5
Pascal Van Loo
 
Sealy Publications
Sealy   PublicationsSealy   Publications
Sealy Publications
jemels
 
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Vergadertechnieken essentie in 3 slides en 6 tips op #hautekiet radio 1 door ...
Pascal Van Loo
 
20141124 presentation innovative knowledge sharing put into practice in 3 cas...
20141124 presentation innovative knowledge sharing put into practice in 3 cas...20141124 presentation innovative knowledge sharing put into practice in 3 cas...
20141124 presentation innovative knowledge sharing put into practice in 3 cas...
Pascal Van Loo
 
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
20161021 pascal van loo ervaringsleren bij organisatieverandering v publicatie
Pascal Van Loo
 
Kalandorok - március - Burgenland
Kalandorok -  március - BurgenlandKalandorok -  március - Burgenland
Kalandorok - március - Burgenland
1901fszek
 
Triászok - március - Bécs
Triászok - március - BécsTriászok - március - Bécs
Triászok - március - Bécs
1901fszek
 
Powerpoint 2003
Powerpoint 2003Powerpoint 2003
Powerpoint 2003
Uuz Zeaps
 
INROADS presentatie
INROADS presentatieINROADS presentatie
INROADS presentatie
INROADS
 
Ad

Similar to Node js quick-tour_v2 (20)

Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with Faye
Matjaž Lipuš
 
Dcjq node.js presentation
Dcjq node.js presentationDcjq node.js presentation
Dcjq node.js presentation
async_io
 
Node js实践
Node js实践Node js实践
Node js实践
jay li
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 
nodecalgary1
nodecalgary1nodecalgary1
nodecalgary1
Eric Kryski
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common Js
Skills Matter
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
Felix Geisendörfer
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Arun Kumar Arjunan
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
Rack
RackRack
Rack
shaokun
 
What is Node.js
What is Node.jsWhat is Node.js
What is Node.js
mohamed hadrich
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
Felix Geisendörfer
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Tech in Asia ID
 
Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)
Felix Geisendörfer
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with Faye
Matjaž Lipuš
 
Dcjq node.js presentation
Dcjq node.js presentationDcjq node.js presentation
Dcjq node.js presentation
async_io
 
Node js实践
Node js实践Node js实践
Node js实践
jay li
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common Js
Skills Matter
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
Felix Geisendörfer
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Tech in Asia ID
 
Ad

Node js quick-tour_v2