@ samshull Who is this guy? Follow along: http://ta.gd/samsnodepresentation
What is it? How does it differ?
Why to use it?
What is node.js?
node.js is not threaded!
Node.js uses a event driven non-blocking concurrency model Like a web browser!
How does it differ?
"Node is similar in design to and influenced by systems like Ruby's Event Machine or Python's Twisted . Node takes the event model a bit further—it presents the event loop as a language construct instead of as a library."
A TCP server emits a `connection` event each time a connection is made.
A HTTP request emits a `data` event each time a packet is received.
A readable file stream emits a `data` event each time the requested buffer is read into memory.
Typical Web Page Client Server Database
Web Application Client Server Database
Future Web Application Client Server Database
Why to use it?
"Node's goal is to provide an easy way to build scalable network programs."
"Node perfectly fills the proxy and authentication layer between the storage backend and client" --nodejs.org No waiting for a blocking database call or file system call allows developers to create faster systems
Benefits Efficient resource multiplexing by preventing MUTEX locks Multi-process resource sharing with libraries, like multi-node, take advantage of multi-core CPUs Up to 20,000 streams can be handled by a single thread without thread safety issues
It can handle tons of concurrent requests
* http://www.synchrosinteractive.com/blog/3-websites/22-nodejs-has-a-bright-future Platform Number of Requests per seconds PHP (via Apache) 3187.27 Static (via Apache) 2966.51 Node.js 5569.30
http://github.com/ry/node - Source code
http://nodejs.org/ - Documentation
http://ta.gd/realtimemousetracking - Real Time Example