• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Node js quick-tour_v2
 

Node js quick-tour_v2

on

  • 1,141 views

node-js

node-js

Statistics

Views

Total Views
1,141
Views on SlideShare
1,141
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Node js quick-tour_v2 Node js quick-tour_v2 Presentation Transcript

    • 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.
    • Nodes goal is to provide an easyway to build scalable networkprograms -- 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)
    • •••
    • ioio
    • ioio
    • -•••
    • -• 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.js1234
    • CommonJS$ node CommonJS.jsfoobar
    • io$ node nonblocking.jsReading my.txt ...my.txtHere 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.txtthe current mtime is: 1292594780000the previous mtime was: 1292594752000
    • $ node childProcess.jshelloworld
    • 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 <<NPMRCroot = ~/.node_librariesbinroot = ~/binmanroot = ~/share/manNPMRC$ 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 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)