Node
- 2. What is Node?
• Javascript on the server
• Asynchronous and non-blocking code
• Event driven
• Scalable real-time applications
- 4. Node v/s PHP
PHP Node
"Hello World"
3177.27 5579.30
Simple html file
"File Read" 20.31 47.21
Textfile of 100KB
"Read Remote File" 3.21 6.43
Read a remote page and deliver
- 5. Node v/s the rest
Tested under Ubuntu using a Intel Core 2 Duo,2.53 GHz, 4 GB memory, Approximately 100 byte response for each
- 6. Node v/s the rest
Same environement. Variables : Fixed concurrency of 300, size of response
- 12. Event Driven
//JS
window.onload = function(){
document.body.innerHTML = 'Hello World';
};
//Node
http = require('http');
http.createServer(function(request, response){
response.writeHead(200);
response.write('Hello World');
response.end();
}).listen(8000);
- 14. Real World Real Time App
• Hummingbird
• Wheat
• Multi player games
• Real time push notifications
- 18. Thanks
Arjun Raj
(http://athousandnodes.com | @athousandnodes)