SlideShare a Scribd company logo
Node.js
   Interpreted using Google’s V8 JavaScript
    engine (same one they use in Chrome)
   Provides some core libraries (network, IO,
    console, etc.)
   Supports extensions / modules
   Is both a runtime environment and a library
   It’s not browser / document JavaScript
   It’s not jQuery
   It’s not PHP/Ruby/ASP.NET/other server-side
    language
   It’s not Apache / IIS
   Functions are Objects
    ◦ Passed as arguments into other functions
    ◦ Similar to Lambdas / Anonymous Methods in .NET
    ◦ Ajax.oncomplete = function(result) {
         document.write(result);
      };
    ◦ $.ajax(function(result) { document.write(result); });
   Callbacks EVERYWHERE
Wait for Connection
   Waiting for expensive operations is stupid
   Single thread event loop
    ◦ Your code is single-threaded, so you don’t have to
      deal with any concurrency / shared state / other
      multi-threaded problems
    ◦ Expensive “back-end” operations are spawned as
      separate processes and trigger events and/or call
      back to your code when they’re finished
“Everything runs in parallel, except your code”

           Go read this file


           Go listen for this message


           Go download this image




        K, I’m done   Waiting
Node.js
Node.js
   (Almost) All interaction is done via events and
    callbacks
   If your code relies on multiple async
    operations to complete, you’ll have to do a
    bit of call management / abstraction
   All of “your code” should return very quickly,
    or create itself as an async object (via
    EventEmitter)
   “parallel” IO execution allows you to make
    expensive queries at the same time,
    increasing efficiency
   One language to rule them all – server side
    and client side code for the same web app
   V8 is one of the fastest script interpreters on
    the planet
   Ridiculously fast benchmarks
    ◦ 600% faster than apache
100,000 requests
1,000 concurrent

                  Node        Apache /
                              PHP
Failed Requests      147          879
Requests/seco      4725.4      823.38
nd                      3
Total              211.62     1214.51
ms/request              1           0
Processing time          40       565
(ms)/request
Total time (s)     21.162     121.451
   Uses more CPU and RAM on server (only a
    little more, but more nonetheless)
   Can get complicated if doing more than one
    async call per request
   Lots of node-specific language constructs
    ◦ require, exports, etc.
   Uses JavaScript, which in itself has a lot of
    quirks and fallacies
   Browserling.com
   Doodleordie.com
   Ge.tt
   Kodingen.com
   Multiplayerchess.com
   Orona
   Wordsquared.com
   Musicquiz.to

More Related Content

PDF
Ch5 beeing an application
PPTX
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
PDF
Increasing performance with Elixir Tasks
PPTX
Developing Rich Internet Applications with Perl and JavaScript
PPTX
Automating JavaScript testing with Jasmine and Perl
PDF
Microservices in Scala: Play Framework
PDF
Basic terminologies for a developer
Ch5 beeing an application
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Increasing performance with Elixir Tasks
Developing Rich Internet Applications with Perl and JavaScript
Automating JavaScript testing with Jasmine and Perl
Microservices in Scala: Play Framework
Basic terminologies for a developer

What's hot (20)

PPTX
Spring Boot Update
PPTX
Apache
PPTX
Advance java session 15
PDF
Node.js 101 with Rami Sayar
PPT
HTML5 Multithreading
PPTX
Advance java session 20
PPTX
Олександр Хотемський “ProtractorJS як інструмент браузерної автоматизації для...
PPTX
Introduction to Vagrant
PPTX
Making Symfony Services async with RabbitMq (and more Symfony)
PDF
Ch. 13 filters and wrappers
PPTX
Applying microservices principles to front end
PPTX
Bccon use notes objects in memory and other useful
PPT
Consume wsa
PPTX
Introdcution to Adobe CQ
PPTX
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
PDF
Tech io nodejs_20130531_v0.6
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PPT
Fast Slim Correct: The History and Evolution of JavaScript.
PDF
The myth of unicorn
PDF
Enterprise messaging
Spring Boot Update
Apache
Advance java session 15
Node.js 101 with Rami Sayar
HTML5 Multithreading
Advance java session 20
Олександр Хотемський “ProtractorJS як інструмент браузерної автоматизації для...
Introduction to Vagrant
Making Symfony Services async with RabbitMq (and more Symfony)
Ch. 13 filters and wrappers
Applying microservices principles to front end
Bccon use notes objects in memory and other useful
Consume wsa
Introdcution to Adobe CQ
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Tech io nodejs_20130531_v0.6
Better End-to-End Testing with Page Objects Model using Protractor
Fast Slim Correct: The History and Evolution of JavaScript.
The myth of unicorn
Enterprise messaging
Ad

Similar to Node.js (20)

PPTX
Node.js Workshop - Sela SDP 2015
PPTX
GeekCampSG - Nodejs , Websockets and Realtime Web
PPTX
Node.js: A Guided Tour
PDF
FITC - Node.js 101
PDF
Nodejs a-practical-introduction-oredev
PDF
Introduction to Node.js
PPTX
Web technologies lesson 1
PPTX
Evented Ruby VS Node.js
PPT
NodeJS.ppt
PPT
NodeJS.ppt
PPT
NodeJS introduction and examples of event loops
PPT
NodeJS.ppt
KEY
node.js: Javascript's in your backend
ODP
Asynchronous I/O in NodeJS - new standard or challenges?
PPT
Krug Fat Client
PPTX
Achieving mass scale with Quasar Fibers
PPTX
Webtechnologies
PDF
Node.js introduction
PPTX
4th Lecture: JSP and such
PPTX
introduction to node.js
Node.js Workshop - Sela SDP 2015
GeekCampSG - Nodejs , Websockets and Realtime Web
Node.js: A Guided Tour
FITC - Node.js 101
Nodejs a-practical-introduction-oredev
Introduction to Node.js
Web technologies lesson 1
Evented Ruby VS Node.js
NodeJS.ppt
NodeJS.ppt
NodeJS introduction and examples of event loops
NodeJS.ppt
node.js: Javascript's in your backend
Asynchronous I/O in NodeJS - new standard or challenges?
Krug Fat Client
Achieving mass scale with Quasar Fibers
Webtechnologies
Node.js introduction
4th Lecture: JSP and such
introduction to node.js
Ad

More from RTigger (20)

PPTX
You Can't Buy Agile
PPTX
Caching up is hard to do: Improving your Web Services' Performance
PPTX
Ready, set, go! An introduction to the Go programming language
PPTX
Open source web services
PPTX
How to hire a hacker
PPTX
Windows 8 programming with html and java script
PPTX
Open regina
PPTX
Single page apps and the web of tomorrow
PPTX
Async in .NET
PPTX
Give your web apps some backbone
PPTX
Hackers, hackathons, and you
PPTX
AJAX, JSON, and Client-Side Templates
PPTX
JavaScript!
PPTX
Parallel Processing
PPTX
Reactive Extensions
PPTX
Sql vs NoSQL
PPTX
Git’in Jiggy With Git
PPTX
What The F#
PPTX
Web Services
PPTX
Total Engagement
You Can't Buy Agile
Caching up is hard to do: Improving your Web Services' Performance
Ready, set, go! An introduction to the Go programming language
Open source web services
How to hire a hacker
Windows 8 programming with html and java script
Open regina
Single page apps and the web of tomorrow
Async in .NET
Give your web apps some backbone
Hackers, hackathons, and you
AJAX, JSON, and Client-Side Templates
JavaScript!
Parallel Processing
Reactive Extensions
Sql vs NoSQL
Git’in Jiggy With Git
What The F#
Web Services
Total Engagement

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Modernizing your data center with Dell and AMD
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Modernizing your data center with Dell and AMD
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation

Node.js

  • 2. Interpreted using Google’s V8 JavaScript engine (same one they use in Chrome)  Provides some core libraries (network, IO, console, etc.)  Supports extensions / modules  Is both a runtime environment and a library
  • 3. It’s not browser / document JavaScript  It’s not jQuery  It’s not PHP/Ruby/ASP.NET/other server-side language  It’s not Apache / IIS
  • 4. Functions are Objects ◦ Passed as arguments into other functions ◦ Similar to Lambdas / Anonymous Methods in .NET ◦ Ajax.oncomplete = function(result) { document.write(result); }; ◦ $.ajax(function(result) { document.write(result); });  Callbacks EVERYWHERE
  • 6. Waiting for expensive operations is stupid  Single thread event loop ◦ Your code is single-threaded, so you don’t have to deal with any concurrency / shared state / other multi-threaded problems ◦ Expensive “back-end” operations are spawned as separate processes and trigger events and/or call back to your code when they’re finished
  • 7. “Everything runs in parallel, except your code” Go read this file Go listen for this message Go download this image K, I’m done Waiting
  • 10. (Almost) All interaction is done via events and callbacks  If your code relies on multiple async operations to complete, you’ll have to do a bit of call management / abstraction  All of “your code” should return very quickly, or create itself as an async object (via EventEmitter)
  • 11. “parallel” IO execution allows you to make expensive queries at the same time, increasing efficiency  One language to rule them all – server side and client side code for the same web app  V8 is one of the fastest script interpreters on the planet  Ridiculously fast benchmarks ◦ 600% faster than apache
  • 12. 100,000 requests 1,000 concurrent Node Apache / PHP Failed Requests 147 879 Requests/seco 4725.4 823.38 nd 3 Total 211.62 1214.51 ms/request 1 0 Processing time 40 565 (ms)/request Total time (s) 21.162 121.451
  • 13. Uses more CPU and RAM on server (only a little more, but more nonetheless)  Can get complicated if doing more than one async call per request  Lots of node-specific language constructs ◦ require, exports, etc.  Uses JavaScript, which in itself has a lot of quirks and fallacies
  • 14. Browserling.com  Doodleordie.com  Ge.tt  Kodingen.com  Multiplayerchess.com  Orona  Wordsquared.com  Musicquiz.to