NodeJS
Milestones
● Server-side Javascript based on Google V8
● Non-blocking Input/Output event model
● 100% CPU using: one proce...
Google V8
● V8 JavaScript VM is used in Google Chrome
● No JIT, all JavaScript is compiled to
assembler
● Hidden classes o...
Non-blocking I/O
The non-blocking nature makes node.js a good
fit for comet and next generation realtime web-
applications
...
NodeJS Perks: front- and backend
● One Javascript - different approaches
● Common libs
● Unit-tests for both sides
NodeJS Perks: Frameworks
Native example:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead...
NodeJS Perks: Comet
Comet is a web application model in which a long-held HTTP request allows
a web server to push data to...
NodeJS Weaknesses
● Due to Javascript flexible nature it's hard to
locate mistakes
● Strict convention rules are highly
re...
NodeJS Scalability
NodeJS Scalability
Resources
1. http://nodejs.org
2. www.nodebeginner.ru
3. http://pacemaker.pp.ua/presentations/Yura_Bogdanov-nodejs_inside_...
Upcoming SlideShare
Loading in …5
×

NodeJS overview

2,629 views

Published on

NodeJS flashcards

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,629
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
24
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

NodeJS overview

  1. 1. NodeJS
  2. 2. Milestones ● Server-side Javascript based on Google V8 ● Non-blocking Input/Output event model ● 100% CPU using: one process - one thread - one core
  3. 3. Google V8 ● V8 JavaScript VM is used in Google Chrome ● No JIT, all JavaScript is compiled to assembler ● Hidden classes optimization from Self (V8 does not dynamically lookup access properties, instead it uses hidden classes that are created behind the scene) ● Improved garbage collector
  4. 4. Non-blocking I/O The non-blocking nature makes node.js a good fit for comet and next generation realtime web- applications nginx: non-blocking apache: threaded non-blocking can handle more requests-per-second and uses a lot less memory
  5. 5. NodeJS Perks: front- and backend ● One Javascript - different approaches ● Common libs ● Unit-tests for both sides
  6. 6. NodeJS Perks: Frameworks Native example: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello Worldn'); }).listen(3000, '127.0.0.1'); ExpressJS: var app = express.createServer(); app.get('/', function(req, res){ res.send('Hello World'); }); app.listen(3000);
  7. 7. NodeJS Perks: Comet Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it. ● Comet servers need to have a lot of open connections ● One thread-per-connection does not scale ● The solution is to use event based servers ● It’s only possible to create event based servers in node.js
  8. 8. NodeJS Weaknesses ● Due to Javascript flexible nature it's hard to locate mistakes ● Strict convention rules are highly recommended ● One process serve plenty requests: so, mistake in one request may "freeze" other. ● Non-trivial garbage collector (closures, long-term processes) ● Strange open-source community (no standards) ● No backward compatibility
  9. 9. NodeJS Scalability
  10. 10. NodeJS Scalability
  11. 11. Resources 1. http://nodejs.org 2. www.nodebeginner.ru 3. http://pacemaker.pp.ua/presentations/Yura_Bogdanov-nodejs_inside_tactoom.ppt 4. http://code.google.com/p/v8/

×