SlideShare uma empresa Scribd logo
1 de 37
Node.js, toy or power tool?
                            Jax CodeCamp, Oct 2012

                                 Ovidiu Dimulescu




Saturday, October 6, 12
Agenda
                      •   What problem?
                      •   How’s Node.js helping?
                      •   Use cases
                      •   Industry support
                      •   Coding in Node.js
                      •   Ecosystem
                      •   Q &A




Saturday, October 6, 12
About @odimulescu
         • Working on the Web since 1997
         • Into startup and engineering cultures
         • Speaker at user groups
         • Organizer for JaxMUG.com
         • Co-Organizer for Jax Big Data meetup




Saturday, October 6, 12
Node.js - What’s the problem?
        Fast CPUs Spinning wheels




        How do we saturate the CPU doing useful work?

Saturday, October 6, 12
Node.js - How’s it helping?




                          • Uses event-driven, non-blocking IO
                          • Enforces async throughout*




Saturday, October 6, 12
Multi-Threaded Servers




       *Credit: blog.cloudfoundry.com

Saturday, October 6, 12
Node.js - Single Thread, Event-ed




       *Credit: blog.cloudfoundry.com

Saturday, October 6, 12
Node.js - Concurrency

                          Node.js Event Loop


              Rq1                              Rq1

              Rq2                              Rq2


              Green - Request Executing
              Red - IO wait


Saturday, October 6, 12
Node.js - Concurrency

                          Thread

                          Node.js

                                    Higher Concurrency
                                    Same Latency




Saturday, October 6, 12
Node.js - Been there, done that
         Event Machines
              •           - Twisted
              •           - EventMachine
              •           - Mina, Netty, Atmosphere, vertx.io
              •           - POE


         Others
              • Erlang
              • Scala / Akka



Saturday, October 6, 12
Node.js - But ...




                          They mix async with sync and the mentality is
                          towards sync in libraries, drivers etc.




Saturday, October 6, 12
Node.js - Use Cases
         • Proxy between different data layers
         • Soft real-time apps
         • Crawlers
         • CLI tools
         • Quick prototyping
         • Lower HW and Operational cost*




Saturday, October 6, 12
Node.js - Not best fit
         • Culture mismatch
         • Uses Javascript
         • Requests are CPU intensive
         • Apps relies on specific libraries / functionality
         • Transactional systems




Saturday, October 6, 12
Node.js - Industry Support




Saturday, October 6, 12
Node.js - Industry Usage




Saturday, October 6, 12
Node.js - Installation



                          1. Go to nodejs.org
                          2. Download and run installer




Saturday, October 6, 12
Node.js - Installation
         1. Go to nodejs.org
         2. Download and run installer


         What’s included?

              node - binary
              npm - cli package manager
              built-in support for http, net, dns




Saturday, October 6, 12
Node.js - Server Installation
         1. Regular Installation

         2. Make it a service
              Windows - NSSM, srvany, etc.
              Unix - Distro dependent

         3. Front-end WS Integration
              IIS 7+ Integration - iisnode
              Apache - mod_proxy or mod_rewrite
              Nginx - rewrite or proxy
              HAProxy, stunnel


Saturday, October 6, 12
Node.js -                  Considerations

         Lowest privileges
              Unix: drop to non-root via setuid / setguid
              Front with a secure Proxy


         Enable safeguards
              “use strict”




Saturday, October 6, 12
Node.js - Hello World
         CLI Version - helloworld.js
              console.log(“Hello world”);
              $ node helloworld.js
              Hello World

         Web Version




Saturday, October 6, 12
Node.js - Hello World
         Web - Router Version




Saturday, October 6, 12
Node.js - I will call you back




Saturday, October 6, 12
Node.js - When, then




Saturday, October 6, 12
Node.js - Flow libraries
         Serial independent
              Runs a series of functions one after the previous function completed

         Serial dependent
              Runs a series of functions passing previous results into next function

         Parallel fashion
              Runs a series of function in parallel

         Queue
              Runs a series of function in parallel up to desired concurrency

         Library Choices
              Async, Groupie, Step, Q, etc.


Saturday, October 6, 12
Node.js - Modules
         Module - mymodule.js




         Client mymodule_client.js




Saturday, October 6, 12
Node.js - Modules

        package.json




        require(‘mylib’) - Lookup order

               1. package.json -> ./lib/mylib.js

               2. index.js

               3. index.node




Saturday, October 6, 12
Node.js - Logging
              •     console
              •     log4js
              •     Winston
              •     GELF - Graylog Extended Log Format
              •     Windows Event Log
              ...




Saturday, October 6, 12
Node.js - Debugging
         $ npm install node-inspector
         $ node --debug-brk myapp.js
         $ node --debug myapp.js
         debugger listening on port 5858
         $ node-inspector
         visit http://0.0.0.0:8080/debug?port=5858 to start debugging


         Debuggers
              WebKit based: Chrome
              Eclipse V8 Debugger Plugin, JetBrains WebStorm


         Other Tools
              v8-profiler, node-profiler
              nodetime.com



Saturday, October 6, 12
Node.js - Inspector




Saturday, October 6, 12
Node.js - Debugging




Saturday, October 6, 12
Node.js - DB / ORM
         Database Drivers
              MS SQL, MongoDB, PostgreSQL, MySQL, Oracle, SQLite,
              Redis, CouchDB, Hive, Riak, Cassandra


         ORMs
              sequelize, persist, LazyBoy, Model, jugglingdb, node-orm


                Transactions, Connection Pooling
              node-mysql-queues




Saturday, October 6, 12
Node.js - Web frameworks
              •      Derby
              •      Express
              •      Flatiron
              •      Meteor
              •      Mojito
              •      Tower
               ...
         Browserify - Node to Browser conversion




Saturday, October 6, 12
Node.js - Testing frameworks
              •      assert - built in
              •      API Easy
              •      Cucumber
              •      httpmock, nock, mockery
              •      NodeUnit
              •      Soda
               ...




Saturday, October 6, 12
Node.js - Scaling out




Saturday, October 6, 12
Node.js - Scaling out




     *Credit: blog.evantahler.com



Saturday, October 6, 12
Node.js - Wrapping up
         • Reuse existing JavaScript skill and code
         • Low resource usage
         • Performant VM (Google’s V8)
         • Active Community, Lots of resources
         • Package Manager
         • Enforces Async across
         • Quick Prototyping
         • Growing Industry support




Saturday, October 6, 12
Q &A




Saturday, October 6, 12

Mais conteúdo relacionado

Mais procurados

vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMjbandi
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...Edureka!
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...Edureka!
 
Understanding the Single Thread Event Loop
Understanding the Single Thread Event LoopUnderstanding the Single Thread Event Loop
Understanding the Single Thread Event LoopTorontoNodeJS
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Ganesh Kondal
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS drupalcampest
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?Maciej Lasyk
 
Real World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xReal World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xSascha Möllering
 
Development with Vert.x: an event-driven application framework for the JVM
Development with Vert.x: an event-driven application framework for the JVMDevelopment with Vert.x: an event-driven application framework for the JVM
Development with Vert.x: an event-driven application framework for the JVMDavid Wu
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Tomer Gabel
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsDinesh U
 

Mais procurados (20)

vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVM
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Understanding the Single Thread Event Loop
Understanding the Single Thread Event LoopUnderstanding the Single Thread Event Loop
Understanding the Single Thread Event Loop
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
 
Real World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xReal World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.x
 
Development with Vert.x: an event-driven application framework for the JVM
Development with Vert.x: an event-driven application framework for the JVMDevelopment with Vert.x: an event-driven application framework for the JVM
Development with Vert.x: an event-driven application framework for the JVM
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Node js internal
Node js internalNode js internal
Node js internal
 
Vert.x
Vert.xVert.x
Vert.x
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 

Semelhante a Node.js, toy or power tool?

Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcasecloud4le
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.jsKhalid Farhan
 
OpenSky Infrastructure
OpenSky InfrastructureOpenSky Infrastructure
OpenSky InfrastructureJonathan Wage
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.jsRichard Rodger
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionPhil Cryer
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...Alexandre Morgaut
 
Node js实践
Node js实践Node js实践
Node js实践jay li
 
Introduction to Napa.js
Introduction to Napa.jsIntroduction to Napa.js
Introduction to Napa.jsDaiyi Peng
 
NDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityNDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityMatthieu Bouthors
 
Distributed Fuzzing Framework Design
Distributed Fuzzing Framework DesignDistributed Fuzzing Framework Design
Distributed Fuzzing Framework Designbannedit
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby ConferenceJohn Woodell
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsasync_io
 
Openstack In Real Life
Openstack In Real LifeOpenstack In Real Life
Openstack In Real LifePaul Guth
 
Cloud Camp Chicago Dec 2012 Slides
Cloud Camp Chicago Dec 2012 SlidesCloud Camp Chicago Dec 2012 Slides
Cloud Camp Chicago Dec 2012 SlidesRyan Koop
 
Cloud Camp Chicago Dec 2012 - All presentations
Cloud Camp Chicago Dec 2012 - All presentationsCloud Camp Chicago Dec 2012 - All presentations
Cloud Camp Chicago Dec 2012 - All presentationsCloudCamp Chicago
 
Apereo OAE - Architectural overview
Apereo OAE - Architectural overviewApereo OAE - Architectural overview
Apereo OAE - Architectural overviewNicolaas Matthijs
 
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
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.jsJames Carr
 

Semelhante a Node.js, toy or power tool? (20)

Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcase
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.js
 
Mini-Training: Node.js
Mini-Training: Node.jsMini-Training: Node.js
Mini-Training: Node.js
 
OpenSky Infrastructure
OpenSky InfrastructureOpenSky Infrastructure
OpenSky Infrastructure
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage Solution
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
HTML5, are we there yet?
HTML5, are we there yet?HTML5, are we there yet?
HTML5, are we there yet?
 
Node js实践
Node js实践Node js实践
Node js实践
 
Introduction to Napa.js
Introduction to Napa.jsIntroduction to Napa.js
Introduction to Napa.js
 
NDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityNDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing Security
 
Distributed Fuzzing Framework Design
Distributed Fuzzing Framework DesignDistributed Fuzzing Framework Design
Distributed Fuzzing Framework Design
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Openstack In Real Life
Openstack In Real LifeOpenstack In Real Life
Openstack In Real Life
 
Cloud Camp Chicago Dec 2012 Slides
Cloud Camp Chicago Dec 2012 SlidesCloud Camp Chicago Dec 2012 Slides
Cloud Camp Chicago Dec 2012 Slides
 
Cloud Camp Chicago Dec 2012 - All presentations
Cloud Camp Chicago Dec 2012 - All presentationsCloud Camp Chicago Dec 2012 - All presentations
Cloud Camp Chicago Dec 2012 - All presentations
 
Apereo OAE - Architectural overview
Apereo OAE - Architectural overviewApereo OAE - Architectural overview
Apereo OAE - Architectural overview
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 

Mais de Ovidiu Dimulescu

Mais de Ovidiu Dimulescu (9)

Microservices - Yet another buzzword
Microservices - Yet another buzzwordMicroservices - Yet another buzzword
Microservices - Yet another buzzword
 
Journeyman to Master
Journeyman to MasterJourneyman to Master
Journeyman to Master
 
The Rise of DevOps
The Rise of DevOpsThe Rise of DevOps
The Rise of DevOps
 
Hadoop on Azure, Blue elephants
Hadoop on Azure,  Blue elephantsHadoop on Azure,  Blue elephants
Hadoop on Azure, Blue elephants
 
Git for Windows
Git for WindowsGit for Windows
Git for Windows
 
Hadoop, Taming Elephants
Hadoop, Taming ElephantsHadoop, Taming Elephants
Hadoop, Taming Elephants
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
Git SVN Migrate Reasons
Git SVN Migrate ReasonsGit SVN Migrate Reasons
Git SVN Migrate Reasons
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 

Último

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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Node.js, toy or power tool?

  • 1. Node.js, toy or power tool? Jax CodeCamp, Oct 2012 Ovidiu Dimulescu Saturday, October 6, 12
  • 2. Agenda • What problem? • How’s Node.js helping? • Use cases • Industry support • Coding in Node.js • Ecosystem • Q &A Saturday, October 6, 12
  • 3. About @odimulescu • Working on the Web since 1997 • Into startup and engineering cultures • Speaker at user groups • Organizer for JaxMUG.com • Co-Organizer for Jax Big Data meetup Saturday, October 6, 12
  • 4. Node.js - What’s the problem? Fast CPUs Spinning wheels How do we saturate the CPU doing useful work? Saturday, October 6, 12
  • 5. Node.js - How’s it helping? • Uses event-driven, non-blocking IO • Enforces async throughout* Saturday, October 6, 12
  • 6. Multi-Threaded Servers *Credit: blog.cloudfoundry.com Saturday, October 6, 12
  • 7. Node.js - Single Thread, Event-ed *Credit: blog.cloudfoundry.com Saturday, October 6, 12
  • 8. Node.js - Concurrency Node.js Event Loop Rq1 Rq1 Rq2 Rq2 Green - Request Executing Red - IO wait Saturday, October 6, 12
  • 9. Node.js - Concurrency Thread Node.js Higher Concurrency Same Latency Saturday, October 6, 12
  • 10. Node.js - Been there, done that Event Machines • - Twisted • - EventMachine • - Mina, Netty, Atmosphere, vertx.io • - POE Others • Erlang • Scala / Akka Saturday, October 6, 12
  • 11. Node.js - But ... They mix async with sync and the mentality is towards sync in libraries, drivers etc. Saturday, October 6, 12
  • 12. Node.js - Use Cases • Proxy between different data layers • Soft real-time apps • Crawlers • CLI tools • Quick prototyping • Lower HW and Operational cost* Saturday, October 6, 12
  • 13. Node.js - Not best fit • Culture mismatch • Uses Javascript • Requests are CPU intensive • Apps relies on specific libraries / functionality • Transactional systems Saturday, October 6, 12
  • 14. Node.js - Industry Support Saturday, October 6, 12
  • 15. Node.js - Industry Usage Saturday, October 6, 12
  • 16. Node.js - Installation 1. Go to nodejs.org 2. Download and run installer Saturday, October 6, 12
  • 17. Node.js - Installation 1. Go to nodejs.org 2. Download and run installer What’s included? node - binary npm - cli package manager built-in support for http, net, dns Saturday, October 6, 12
  • 18. Node.js - Server Installation 1. Regular Installation 2. Make it a service Windows - NSSM, srvany, etc. Unix - Distro dependent 3. Front-end WS Integration IIS 7+ Integration - iisnode Apache - mod_proxy or mod_rewrite Nginx - rewrite or proxy HAProxy, stunnel Saturday, October 6, 12
  • 19. Node.js - Considerations Lowest privileges Unix: drop to non-root via setuid / setguid Front with a secure Proxy Enable safeguards “use strict” Saturday, October 6, 12
  • 20. Node.js - Hello World CLI Version - helloworld.js console.log(“Hello world”); $ node helloworld.js Hello World Web Version Saturday, October 6, 12
  • 21. Node.js - Hello World Web - Router Version Saturday, October 6, 12
  • 22. Node.js - I will call you back Saturday, October 6, 12
  • 23. Node.js - When, then Saturday, October 6, 12
  • 24. Node.js - Flow libraries Serial independent Runs a series of functions one after the previous function completed Serial dependent Runs a series of functions passing previous results into next function Parallel fashion Runs a series of function in parallel Queue Runs a series of function in parallel up to desired concurrency Library Choices Async, Groupie, Step, Q, etc. Saturday, October 6, 12
  • 25. Node.js - Modules Module - mymodule.js Client mymodule_client.js Saturday, October 6, 12
  • 26. Node.js - Modules package.json require(‘mylib’) - Lookup order 1. package.json -> ./lib/mylib.js 2. index.js 3. index.node Saturday, October 6, 12
  • 27. Node.js - Logging • console • log4js • Winston • GELF - Graylog Extended Log Format • Windows Event Log ... Saturday, October 6, 12
  • 28. Node.js - Debugging $ npm install node-inspector $ node --debug-brk myapp.js $ node --debug myapp.js debugger listening on port 5858 $ node-inspector visit http://0.0.0.0:8080/debug?port=5858 to start debugging Debuggers WebKit based: Chrome Eclipse V8 Debugger Plugin, JetBrains WebStorm Other Tools v8-profiler, node-profiler nodetime.com Saturday, October 6, 12
  • 31. Node.js - DB / ORM Database Drivers MS SQL, MongoDB, PostgreSQL, MySQL, Oracle, SQLite, Redis, CouchDB, Hive, Riak, Cassandra ORMs sequelize, persist, LazyBoy, Model, jugglingdb, node-orm Transactions, Connection Pooling node-mysql-queues Saturday, October 6, 12
  • 32. Node.js - Web frameworks • Derby • Express • Flatiron • Meteor • Mojito • Tower ... Browserify - Node to Browser conversion Saturday, October 6, 12
  • 33. Node.js - Testing frameworks • assert - built in • API Easy • Cucumber • httpmock, nock, mockery • NodeUnit • Soda ... Saturday, October 6, 12
  • 34. Node.js - Scaling out Saturday, October 6, 12
  • 35. Node.js - Scaling out *Credit: blog.evantahler.com Saturday, October 6, 12
  • 36. Node.js - Wrapping up • Reuse existing JavaScript skill and code • Low resource usage • Performant VM (Google’s V8) • Active Community, Lots of resources • Package Manager • Enforces Async across • Quick Prototyping • Growing Industry support Saturday, October 6, 12