SlideShare a Scribd company logo
2
Most read
6
Most read
8
Most read
 A JavaScript runtime environment running
Google Chrome’s V8 engine
◦ a.k.a. a server-side solution for JS
◦ Compiles JS, making it really fast
 Runs over the command line
 Designed for high concurrency
◦ Without threads or new processes
 Never blocks, not even for I/O
 Uses the CommonJS framework
◦ Making it a little closer to a real OO language
 Instead of threads Node uses an event loop
with a stack
 Alleviates overhead of context switching
Threads Asynchronous Event-driven
Lock application / request with
listener-workers threads
only one thread, which
repeatedly fetches an event
Using incoming-request model Using queue and then processes
it
multithreaded server might
block the request which might
involve multiple events
manually saves state and then
goes on to process the next
event
Using context switching no contention and no context
switches
Using multithreading
environments where listener
and workers threads are used
frequently to take an incoming-
request lock
Using asynchronous I/O
facilities (callbacks, not
poll/select or O_NONBLOCK)
environments
 Request for “index.html” comes in
 Stack unwinds and ev_loop goes to sleep
 File loads from disk and is sent to the client
 Servers do nothing but I/O
◦ Scripts waiting on I/O requests degrades
performance
 To avoid blocking, Node makes use of the
event driven nature of JS by attaching
callbacks to I/O requests
 Scripts waiting on I/O waste no space
because they get popped off the stack when
their non-I/O related code finishes executing
NodeJS.ppt
 Use of JS on both the client and server-side
should remove need to “context switch”
◦ Client-side JS makes heavy use of the DOM, no
access to files/databases
◦ Server-side JS deals mostly in files/databases, no
DOM
 JSDom project for Node works for simple tasks, but not
much else
1. It's fast
2. It can handle tons of concurrent requests
3. It's written in JavaScript (which means you can
use the same code server side and client side)
Platform Number of request per
second
PHP ( via Apache) 3187,27
Static ( via Apache ) 2966,51
Node.js 5569,30
 http://nodejs.org/
 http://nodejs.org/cinco_de_node.pdf
 http://ajaxian.com/archives/google-chrome-
chromium-and-v8
 http://blog.chromium.org/2010/12/new-
crankshaft-for-v8.html
 http://news.softpedia.com/news/IE9-RC-vs-
Chrome-10-9-vs-Opera-11-vs-Firefox-11-
Performance-Comparison-183973.shtml

More Related Content

PPT
Node js
PDF
NodeJS ecosystem
PDF
Tech io nodejs_20130531_v0.6
PPT
PDF
Introduction to Node JS.pdf
PPTX
Introduction to node.js GDD
Node js
NodeJS ecosystem
Tech io nodejs_20130531_v0.6
Introduction to Node JS.pdf
Introduction to node.js GDD

Similar to NodeJS.ppt (20)

PPTX
Node.js
PPTX
Beginners Node.js
PPTX
PPTX
Node.js Workshop - Sela SDP 2015
PPTX
Introduction to NodeJS
PPTX
Building Applications With the MEAN Stack
ODP
Nodejs
PDF
Making it fast: Zotonic & Performance
PPT
DDD Framework for Java: JdonFramework
PPTX
Introduction to Node.JS
PDF
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
PDF
Node js internal
PPT
GlobalsDB: Its significance for Node.js Developers
PPTX
PPTX
Scalable server component using NodeJS & ExpressJS
PDF
node.js 실무 - node js in practice by Jesang Yoon
PPTX
Introduction to Node.js
PDF
Node.js introduction
PPT
Life In The FastLane: Full Speed XPages
PPTX
NodeJS guide for beginners
Node.js
Beginners Node.js
Node.js Workshop - Sela SDP 2015
Introduction to NodeJS
Building Applications With the MEAN Stack
Nodejs
Making it fast: Zotonic & Performance
DDD Framework for Java: JdonFramework
Introduction to Node.JS
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Node js internal
GlobalsDB: Its significance for Node.js Developers
Scalable server component using NodeJS & ExpressJS
node.js 실무 - node js in practice by Jesang Yoon
Introduction to Node.js
Node.js introduction
Life In The FastLane: Full Speed XPages
NodeJS guide for beginners
Ad

More from rani marri (20)

PPTX
RESTful Web Services.pptxbnbjmgbjbvvhvhj
PPT
ch11 jrtrtgrrhwddewwfetbbfdrhwefegtrhgtgr
PPTX
express.js.pptxgghhhhhhnnbvcdssazxvuyiknvc
PPTX
NagiOs.pptxhjkgfddssddfccgghuikjhgvccvvhjj
PPTX
Lecture7.pptxhfjgjgjghcgzgzfzfzvzgxhchchc
PPTX
git.ppt.pptx power point presentation got Google internet
PPT
EJB.ppthckhkhohjpfuysfzhxjvkgur6eydgdcjjggjj
PPTX
Containers Orchestration using kubernates.pptx
PPTX
JSP.pptx programming guide for beginners and experts
PPT
CSC128_Part_1_WrapperClassesAndStrings_CenBNcj.ppt
PPT
nodejs tutorial foor free download from academia
PPTX
NAAC PPT M.B.A.pptx
PPTX
must.pptx
PPTX
node.js.pptx
PPTX
oops with java modules iii & iv.pptx
PPT
oops with java modules i & ii.ppt
PPTX
software engineering modules iii & iv.pptx
PPTX
software engineering module i & ii.pptx
PPT
ADVANCED JAVA MODULE III & IV.ppt
PPT
ADVANCED JAVA MODULE I & II.ppt
RESTful Web Services.pptxbnbjmgbjbvvhvhj
ch11 jrtrtgrrhwddewwfetbbfdrhwefegtrhgtgr
express.js.pptxgghhhhhhnnbvcdssazxvuyiknvc
NagiOs.pptxhjkgfddssddfccgghuikjhgvccvvhjj
Lecture7.pptxhfjgjgjghcgzgzfzfzvzgxhchchc
git.ppt.pptx power point presentation got Google internet
EJB.ppthckhkhohjpfuysfzhxjvkgur6eydgdcjjggjj
Containers Orchestration using kubernates.pptx
JSP.pptx programming guide for beginners and experts
CSC128_Part_1_WrapperClassesAndStrings_CenBNcj.ppt
nodejs tutorial foor free download from academia
NAAC PPT M.B.A.pptx
must.pptx
node.js.pptx
oops with java modules iii & iv.pptx
oops with java modules i & ii.ppt
software engineering modules iii & iv.pptx
software engineering module i & ii.pptx
ADVANCED JAVA MODULE III & IV.ppt
ADVANCED JAVA MODULE I & II.ppt
Ad

Recently uploaded (20)

PDF
Business Ethics Teaching Materials for college
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
Cell Types and Its function , kingdom of life
PDF
Pre independence Education in Inndia.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Structure & Organelles in detailed.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Business Ethics Teaching Materials for college
01-Introduction-to-Information-Management.pdf
PPH.pptx obstetrics and gynecology in nursing
Supply Chain Operations Speaking Notes -ICLT Program
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Cell Types and Its function , kingdom of life
Pre independence Education in Inndia.pdf
Week 4 Term 3 Study Techniques revisited.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O7-L3 Supply Chain Operations - ICLT Program
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Complications of Minimal Access Surgery at WLH
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

NodeJS.ppt

  • 1.  A JavaScript runtime environment running Google Chrome’s V8 engine ◦ a.k.a. a server-side solution for JS ◦ Compiles JS, making it really fast  Runs over the command line  Designed for high concurrency ◦ Without threads or new processes  Never blocks, not even for I/O  Uses the CommonJS framework ◦ Making it a little closer to a real OO language
  • 2.  Instead of threads Node uses an event loop with a stack  Alleviates overhead of context switching
  • 3. Threads Asynchronous Event-driven Lock application / request with listener-workers threads only one thread, which repeatedly fetches an event Using incoming-request model Using queue and then processes it multithreaded server might block the request which might involve multiple events manually saves state and then goes on to process the next event Using context switching no contention and no context switches Using multithreading environments where listener and workers threads are used frequently to take an incoming- request lock Using asynchronous I/O facilities (callbacks, not poll/select or O_NONBLOCK) environments
  • 4.  Request for “index.html” comes in  Stack unwinds and ev_loop goes to sleep  File loads from disk and is sent to the client
  • 5.  Servers do nothing but I/O ◦ Scripts waiting on I/O requests degrades performance  To avoid blocking, Node makes use of the event driven nature of JS by attaching callbacks to I/O requests  Scripts waiting on I/O waste no space because they get popped off the stack when their non-I/O related code finishes executing
  • 7.  Use of JS on both the client and server-side should remove need to “context switch” ◦ Client-side JS makes heavy use of the DOM, no access to files/databases ◦ Server-side JS deals mostly in files/databases, no DOM  JSDom project for Node works for simple tasks, but not much else
  • 8. 1. It's fast 2. It can handle tons of concurrent requests 3. It's written in JavaScript (which means you can use the same code server side and client side) Platform Number of request per second PHP ( via Apache) 3187,27 Static ( via Apache ) 2966,51 Node.js 5569,30
  • 9.  http://nodejs.org/  http://nodejs.org/cinco_de_node.pdf  http://ajaxian.com/archives/google-chrome- chromium-and-v8  http://blog.chromium.org/2010/12/new- crankshaft-for-v8.html  http://news.softpedia.com/news/IE9-RC-vs- Chrome-10-9-vs-Opera-11-vs-Firefox-11- Performance-Comparison-183973.shtml