nodejs
TRANSCRIPT
Kishore Yekkanti
Thoughtworks
Ryan Dahl
What ?
Why ?
I/O needs to be done differently
var result = db.query(”select * from T”);
// use result
What is software doing while it queries the database
db.query("select..", function (result) {
// use result
});
100 concurrent clients1 MB response
node 822 req/sec nginx 708 thin 85 mongrel 4
Ingredients
Who ?
Design Goals No function should directly peform I/O. To receive info from disk, network or another
process there must be a callback. Stream every thing, never force buffering of data. Have built in support for the most important
protocols (TCP, DNS, HTTP). Chunked requests and responses Keep – alive Should be familiar to clientside JS programmers
and old school UNIX hackers.
How ?
Install
$ git clone git://github.com/ry/node.git
$ cd node
$ ./configure
$ make install
Enough Is Enough !!
Quake Stats
Quake Server (hosted through sinatra).
Node server Node Client (Browser)
Faye (websocket server)
Node-static (to server static pages)
kishoreyekkantikishoreyekkanti
kishoreyekkanti.blogspot.com
Questions ?