SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Meetup #1
Farsheed & Eddy
Sponsored by Drumbi
Food for Thought
● Packages per day across popular platforms
● Source: https://blog.nodejitsu.com/npm-innovation-through-modularity
Who We Are
● Farsheed Atef
● @captainatef
● Farsheed@Drumbi.com
● Eddy Kim
● @EddyDKim
● eddy@Drumbi.com
● Drumbi
● Drumbi.com
● Blog.Drumbi.com
● @getdrumbi
Overview
● What is Node.js
● Why Node.js
● Benefits
● JavaScript
● Modularity
● Scalability
● Architecture
● Resources/Documentation
● Hands On
What is Node.js
● A framework for developing I/O based javascript server applications
● Node.js is a set of bindings to the V8 javascript VM.
● V8 is Google's open source JavaScript engine.
● Used in Chrome
● Standalone or embedded
● Octane (https://developers.google.com/octane/)
● Focused on performance
Why Node.js
● Programmable Web
● Internet of Devices
● Requires: Scalable / Real-time
platform
● Benchmark (take with grain of salt):
● 100 Concurrent clients
● 1 megabyte response
● Node 822 req/sec
● Nginx 708 req/sec
● Thin 85 req/sec
● Mongrel 4 req/sec
http = require(’http’)
Buffer = require(’buffer’).Buffer;
n = 1024*1024;
b = new Buffer(n);
for (var i = 0; i<n; i++) b[i] = 100;
http.createServer(function (req, res) {
res.writeHead(200);
res.end(b);
}).listen(80);
Why Node.js
● Typical request
● Request a page
● Do a bunch of client stuff
● Load a bunch of static stuff
● Load a bunch of dynamic stuff
● Call a web service (Network)
● Call a Database (Network)
● Database get data (Disk, CPU)
● Format returned data (CPU, RAM)
● display data (CPU, RAM)
Why Node.js
● npm Packages
● JavaScript on Server
● Real-Time
● Design Goals:
○ Built in support for
DNS, HTTP, TLS
○ Stream Everything
○ No function should directly
perform I/O
○ Simple License MIT/BSD
● Be Careful
○ Blocking operations
Event Driven Programming
● Typical programming (multithreading - memory hungry):
○ Ask for some data
○ Wait for the person to enter
○ Do something with the submitted data
○ Display the results
● Functional programming:
○ Ask for some data
○ while waiting for the person to enter something, ask for data from someone
else, process some data, display results to someone whose data is ready.
JavaScript
● First Class Functions
● Lambdas
● Available across all web browsers
● Closures
Why Javascript?
Ubiquity
Code Re-use
Existing Skillset/Libraries
-moment js
-underscore js
Why Javascript?
Functions are 1st class objects
Ideally suited for Evented/Async Programming
Why Javascript?
Functions as Objects in Async Programming
Why Javascript?
Closures in a Nutshell
● Allows Inner Functions to access variables in Outer Function
○ Very useful for event callback patterns
Why Javascript?
Closures in a Nutshell
● Enables Data Encapsulation via local scopes
Modularity
● NodeJS focuses on quality, small modules
○ export via module.exports =
○ import via require('moduleName')
Resources
http://nodejs.org/
http://javascriptissexy.com/
http://stackoverflow.com/questions/2353818/how-do-i-get-
started-with-node-js
eddy@drumbi.com
farsheed@drumbi.com
Hands On
● Node JS Installation
○ http://nodejs.org/download/
● Creating a hello world using Http Module
● Creating a web using Express Module

Más contenido relacionado

La actualidad más candente

Devoxx Belgium 2018 - Micronaut in Action!
Devoxx Belgium 2018 - Micronaut in Action!Devoxx Belgium 2018 - Micronaut in Action!
Devoxx Belgium 2018 - Micronaut in Action!Iván López Martín
 
Codemotion Madrid 2018 - Microservicios Reactivos con Micronaut
Codemotion Madrid 2018 - Microservicios Reactivos con MicronautCodemotion Madrid 2018 - Microservicios Reactivos con Micronaut
Codemotion Madrid 2018 - Microservicios Reactivos con MicronautIván López Martín
 
Building the AO tech blog
Building the AO tech blogBuilding the AO tech blog
Building the AO tech blogAO Tech
 
Building the AO Tech Blog
Building the AO Tech BlogBuilding the AO Tech Blog
Building the AO Tech BlogSarahNorris47
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroEPAM
 
Node.js by Alex and Nalin
Node.js by Alex and NalinNode.js by Alex and Nalin
Node.js by Alex and NalinTagged Social
 
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...NETWAYS
 
Mean Stack for Beginners
Mean Stack for BeginnersMean Stack for Beginners
Mean Stack for BeginnersJEMLI Fathi
 
Mifos X - Extensible Platform and Software Development Kit
Mifos X - Extensible Platform and Software Development KitMifos X - Extensible Platform and Software Development Kit
Mifos X - Extensible Platform and Software Development KitMarkus Geiß
 
Voyage en terre du multi-cloud
Voyage en terre du multi-cloudVoyage en terre du multi-cloud
Voyage en terre du multi-cloudFrederic Leger
 
Integrating Node.js with PHP
Integrating Node.js with PHPIntegrating Node.js with PHP
Integrating Node.js with PHPLee Boynton
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg ExtendedSören Wrede
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Bibby Chung
 
CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornMichel Graciano
 
Go bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KGGo bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KGJonas Riedel
 
Intro to Ruby on Rails - BCC 2014
Intro to Ruby on Rails - BCC 2014Intro to Ruby on Rails - BCC 2014
Intro to Ruby on Rails - BCC 2014chrischattin
 

La actualidad más candente (20)

Devoxx Belgium 2018 - Micronaut in Action!
Devoxx Belgium 2018 - Micronaut in Action!Devoxx Belgium 2018 - Micronaut in Action!
Devoxx Belgium 2018 - Micronaut in Action!
 
Codemotion Madrid 2018 - Microservicios Reactivos con Micronaut
Codemotion Madrid 2018 - Microservicios Reactivos con MicronautCodemotion Madrid 2018 - Microservicios Reactivos con Micronaut
Codemotion Madrid 2018 - Microservicios Reactivos con Micronaut
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
Node.js Test
Node.js TestNode.js Test
Node.js Test
 
Building the AO tech blog
Building the AO tech blogBuilding the AO tech blog
Building the AO tech blog
 
Building the AO Tech Blog
Building the AO Tech BlogBuilding the AO Tech Blog
Building the AO Tech Blog
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to Hero
 
Node.js by Alex and Nalin
Node.js by Alex and NalinNode.js by Alex and Nalin
Node.js by Alex and Nalin
 
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
 
Mean Stack for Beginners
Mean Stack for BeginnersMean Stack for Beginners
Mean Stack for Beginners
 
Mifos X - Extensible Platform and Software Development Kit
Mifos X - Extensible Platform and Software Development KitMifos X - Extensible Platform and Software Development Kit
Mifos X - Extensible Platform and Software Development Kit
 
Mastering the pipeline
Mastering the pipelineMastering the pipeline
Mastering the pipeline
 
Voyage en terre du multi-cloud
Voyage en terre du multi-cloudVoyage en terre du multi-cloud
Voyage en terre du multi-cloud
 
Integrating Node.js with PHP
Integrating Node.js with PHPIntegrating Node.js with PHP
Integrating Node.js with PHP
 
Django packages list
Django packages listDjango packages list
Django packages list
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg Extended
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project Nashorn
 
Go bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KGGo bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KG
 
Intro to Ruby on Rails - BCC 2014
Intro to Ruby on Rails - BCC 2014Intro to Ruby on Rails - BCC 2014
Intro to Ruby on Rails - BCC 2014
 

Similar a NODE JS OC Meetup 1

Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmudjcp
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersLewiz
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional ProgrammerDave Cross
 
Tech meetup: Web Applications Performance
Tech meetup: Web Applications PerformanceTech meetup: Web Applications Performance
Tech meetup: Web Applications PerformanceSantex Group
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJSJITENDRA KUMAR PATEL
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Izzet Mustafaiev
 
Node.js Presentation
Node.js PresentationNode.js Presentation
Node.js PresentationExist
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013Ramesh Nair
 
Ansible and CloudStack
Ansible and CloudStackAnsible and CloudStack
Ansible and CloudStackShapeBlue
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausWomen in Technology Poland
 
Dockerize magento 2 24.02.2016
Dockerize magento 2   24.02.2016Dockerize magento 2   24.02.2016
Dockerize magento 2 24.02.2016Andreas Pointner
 
Scalable Clusters On Demand
Scalable Clusters On DemandScalable Clusters On Demand
Scalable Clusters On DemandBogdan Kyryliuk
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Adam Štipák
 
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...Dan Farrelly
 

Similar a NODE JS OC Meetup 1 (20)

Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Netty training
Netty trainingNetty training
Netty training
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
 
Netty training
Netty trainingNetty training
Netty training
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developers
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
Tech meetup: Web Applications Performance
Tech meetup: Web Applications PerformanceTech meetup: Web Applications Performance
Tech meetup: Web Applications Performance
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?
 
Node.js Presentation
Node.js PresentationNode.js Presentation
Node.js Presentation
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 
Ansible and CloudStack
Ansible and CloudStackAnsible and CloudStack
Ansible and CloudStack
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Dockerize magento 2 24.02.2016
Dockerize magento 2   24.02.2016Dockerize magento 2   24.02.2016
Dockerize magento 2 24.02.2016
 
Scalable Clusters On Demand
Scalable Clusters On DemandScalable Clusters On Demand
Scalable Clusters On Demand
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...
Building a Pluggable, Cloud-native Event-driven Serverless Architecture - Rea...
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

NODE JS OC Meetup 1

  • 1. Meetup #1 Farsheed & Eddy Sponsored by Drumbi
  • 2. Food for Thought ● Packages per day across popular platforms ● Source: https://blog.nodejitsu.com/npm-innovation-through-modularity
  • 3. Who We Are ● Farsheed Atef ● @captainatef ● Farsheed@Drumbi.com ● Eddy Kim ● @EddyDKim ● eddy@Drumbi.com ● Drumbi ● Drumbi.com ● Blog.Drumbi.com ● @getdrumbi
  • 4. Overview ● What is Node.js ● Why Node.js ● Benefits ● JavaScript ● Modularity ● Scalability ● Architecture ● Resources/Documentation ● Hands On
  • 5. What is Node.js ● A framework for developing I/O based javascript server applications ● Node.js is a set of bindings to the V8 javascript VM. ● V8 is Google's open source JavaScript engine. ● Used in Chrome ● Standalone or embedded ● Octane (https://developers.google.com/octane/) ● Focused on performance
  • 6. Why Node.js ● Programmable Web ● Internet of Devices ● Requires: Scalable / Real-time platform ● Benchmark (take with grain of salt): ● 100 Concurrent clients ● 1 megabyte response ● Node 822 req/sec ● Nginx 708 req/sec ● Thin 85 req/sec ● Mongrel 4 req/sec http = require(’http’) Buffer = require(’buffer’).Buffer; n = 1024*1024; b = new Buffer(n); for (var i = 0; i<n; i++) b[i] = 100; http.createServer(function (req, res) { res.writeHead(200); res.end(b); }).listen(80);
  • 7. Why Node.js ● Typical request ● Request a page ● Do a bunch of client stuff ● Load a bunch of static stuff ● Load a bunch of dynamic stuff ● Call a web service (Network) ● Call a Database (Network) ● Database get data (Disk, CPU) ● Format returned data (CPU, RAM) ● display data (CPU, RAM)
  • 8. Why Node.js ● npm Packages ● JavaScript on Server ● Real-Time ● Design Goals: ○ Built in support for DNS, HTTP, TLS ○ Stream Everything ○ No function should directly perform I/O ○ Simple License MIT/BSD ● Be Careful ○ Blocking operations
  • 9. Event Driven Programming ● Typical programming (multithreading - memory hungry): ○ Ask for some data ○ Wait for the person to enter ○ Do something with the submitted data ○ Display the results ● Functional programming: ○ Ask for some data ○ while waiting for the person to enter something, ask for data from someone else, process some data, display results to someone whose data is ready.
  • 10. JavaScript ● First Class Functions ● Lambdas ● Available across all web browsers ● Closures
  • 11. Why Javascript? Ubiquity Code Re-use Existing Skillset/Libraries -moment js -underscore js
  • 12. Why Javascript? Functions are 1st class objects Ideally suited for Evented/Async Programming
  • 13. Why Javascript? Functions as Objects in Async Programming
  • 14. Why Javascript? Closures in a Nutshell ● Allows Inner Functions to access variables in Outer Function ○ Very useful for event callback patterns
  • 15. Why Javascript? Closures in a Nutshell ● Enables Data Encapsulation via local scopes
  • 16. Modularity ● NodeJS focuses on quality, small modules ○ export via module.exports = ○ import via require('moduleName')
  • 18. Hands On ● Node JS Installation ○ http://nodejs.org/download/ ● Creating a hello world using Http Module ● Creating a web using Express Module