SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante 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
 

Semelhante 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

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
 
[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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
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
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

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 ...
 
[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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
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
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

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