SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Node.js
Shael Joon & Matt Simonis
Background
• Server Side JavaScript
• Developed by Ryan Dhal (2009)
• Currently owned by Joyent
• Based off Google’s V8 JavaScript Engine
  (which is written in C and C++)
• Open Source
It’s Asynchronous
•   Non-blocking due to system event notifications
•   Not having to deal with common multithreading
    problems such as deadlocks, resource sharing
    and etc. (See [6] for more details)
•   Scalability (930k[tested] to 1500k[claimed]
    connections) [4]
•   Most of the server and client side work can be
    done in JavaScript
Usage domain areas/users
Microsoft
Node gives Azure users the first end-to-end JavaScript experience for the
development of a whole new class of real-time applications.

eBay
Node’s evented I/O model freed us from worrying about locking and
concurrency issues that are common with multithreaded async I/O.

Linkedin
On the server side, our entire mobile software stack is completely built in Node.
One reason was scale. The second is Node showed us huge performance gains.

Yahoo
Node.js is the execution core of Manhattan. Allowing developers to build one
code base using one language – that is the nirvana for developers.

                                                                            http://nodejs.org/
Google Trends – “node.js”




                 http://www.google.com/trends/?q=node.js
Ample Resources
• Free e-Books
• Code Samples including 3rd party sources
• Modules usage guides/samples
• Benchmarking and comparisons to other
  technologies
• However, it is missing scholarly papers and
  research.
Modules
• Modules are plugins/add-ons/extensions for
  Node to help with development process.
• Often code examples are included
  alongside the module.
• Several categories of modules.
• Modules are plugins/add-ons/extensions for
  Node to help with development process.
3000+ modules in the areas below
• Web frameworks                • Templating                            • Parsers
      • Routers                 • CSS Engines                                  • JSON
      • Static file servers      • Content Management Systems                   • XML
      • Microframeworks         • Build and Deployment                         • Command Line Option
      • Frameworks              • Package Management Systems                     Parsers
      • Middleware              • Module Loader                                • Parser Generators
           • JSGI               • OpenSSL / Crypto / Hashing                   • Other Parsers
           • Connect            • SMTP                                  • Debugging / Console Utilities
           • Other middleware   • TCP / IP                              • Compression
      • Other                          • Multiple protocols             • Graphics
• Database                             • HTTP                           • Sound
      • MS SQL Server                  • FTP                            • Payment Gateways
      • PostgreSQL                     • E-mail                         • API clients
      • MySQL                          • XMPP                           • Control flow / Async goodies
      • SQLite                         • Other networking               • I18n and L10n modules
      • Oracle                  • RPC                                   • Boilerplates
      • NoSQL and Key/Value     • Web Sockets & Ajax                    • Continuous Integration Tools
           • Mongo              • Message Queues                        • DDD, CQRS, EventSourcing
           • Hive               • Class systems                         • Desktop application related
           • Redis              • Testing / Spec Frameworks             • JavaScript threads
           • CouchDB            • Wrappers                              • Other
                                                               https://github.com/joyent/node/wiki/modules
Benchmarks [1]
Benchmarks [1]
Benchmarks [1]
Benchmarks [1]
Benchmarks [1 , 4 ]
• Analysis
  • Conducted by the owner of Erwin
  • Comparison of all event based languages
  • Tested on a single core

• Recognized by Tom Hughes-Croucher (representing Node)
  • Node is fairly new and yet it can compete with other mature technologies
  • Performance is not everything. Other factors (Usability, stability, etc)
     should be considered as well.
  • THEY ARE ALL AVERAGES BEING PLOTTED. Concern about exceptional
     cases (unusually long calls) may bring down the overall performance down.
Benchmarks [2]
Benchmarks
Analysis
• Conducted by 3rd party
• Comparing Node against Apache + PHP is
  an unfair experiment but is a realistic case.
• Benchmarking tool was sharing resources
  while the tests were run.
Benchmarks[5]
Benchmarks
Analysis
• Conducted by 3rd party
• Heavier work loads being tested – DB
  access was involved.
• Run on a single machine and was not
  distributed.
Benchmarks [3]

Analysis
• Conducted by 3rd party
• Simple random number generation / return
  test.
• Missing physical hardware set information.
Benchmarks – Final thoughts

• Node is worth investigating as it shows
  rapid growth in 3 years of existence.
• Needs higher quality benchmarking tests
  conducted in real life scenarios.
• Scholarly research is still scarce.
• Recommended domain areas – scalable
  web services, non critical software.
Usage [4]
Chat server – client may
 connect via telnet [4]
Sources
Web Posts:
[1] Ostinelli , Roberto. "A comparison between Misultin, Mochiweb, Cowboy, NodeJS and
Tornadoweb."www.ostinelli.net. Oostinelli, May 2011. Web. 19 Mar 2012. <http://www.ostinelli.net/a-comparison-
between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/>.
[2] Zgadzaj, Maciej. "Benchmarking Node.js - basic performance tests against Apache PHP."http://zgadzaj.com. N.p.,
August 19, 2010. Web. 19 Mar 2012. <http://zgadzaj.com/benchmarking-nodejs-basic-performance-tests-against-
apache-php>.
 [3] B, K. "Benchmarking nodejs : comparing nodejs and tomcat - random generator." http://fl-ex.blogspot.com. N.p.,
13 December 2011. Web. 19 Mar 2012. <http://fl-ex.blogspot.com/2011/12/comparing-random-generator-nodejs-
and.html>.
  [4] Hughes-Croucher, Tom, dir. Tech Talk: Tom Hughes-Croucher (Joyent) — “Node.js at Scale”. Joyent, 2011. Web. 19
Mar 2012. <http://sna-projects.com/blog/2011/08/nodejs/>. <http://sna-projects.com/blog/2011/08/nodejs/>.
[5] SUBBU, ALLAMARAJU. "Nodejs vs Play for Front-End Apps." subbu.org. N.p., MARCH 26, 2011. Web. 19 Mar
2012. <http://www.subbu.org/blog/2011/03/nodejs-vs-play-for-front-end-apps>.
IEEE Paper:
[6] Tilkov, S.;Vinoski, S.; , "Node.js: Using JavaScript to Build High-Performance Network Programs," Internet
Computing, IEEE , vol.14, no.6, pp.80-83, Nov.-Dec. 2010
doi: 10.1109/MIC.2010.145
URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5617064&isnumber=5617049
Why Node.js?
Why Node.js?

• Fast and scalable
• Transferrable knowledge
Why Node.js?

• Fast and scalable
• Transferrable knowledge
• Event driven with non-blocking I/O
Why Node.js?

• Fast and scalable
• Transferrable knowledge
• Event driven with non-blocking I/O
• Hundreds of modules
Modules
Modules
                        Socket.io
    http
                                    ejs
                                              Jade
Express       node-crypto

                                node-imap
   mongoose
                                          node-ftp
              node.bcrypt.js
Modules Used
Modules Used

• Express
• bcrypt
• mongoose
• Socket.io
• child_process
Express
var app = express.createServer();

app.get('/', function(req, res){
    res.send('Hello World');
});

app.listen(3000);
Express & REST
app.get('/user/playlist', function(req, res) {
    if (req.session.user) {
        Playlist.findOne({userid: req.session.user._id},
function(err, playlist) {
             if (playlist) {
                 res.json(playlist.songs);
             } else {
                 res.redirect('/404');
             }
        });
    } else {
        res.redirect('/404');
    }
});
Express & REST
app.post('/register', function(req, res) {
    var newUser = new User();

      newUser.username = req.body.username;
      newUser.password = req.body.password;
      newUser.display_name = req.body.displayname;
      newUser.date_created = new Date();

      newUser.save(function(err) {
          if (err) {
              res.redirect('error');
          } else {
              res.redirect('home');
          }
      });
});
Mongoose
var UserSchema = new Schema({
    username: {
        type: String,
        index: { unique: true }
    },
    password: String,
    salt: String,
    display_name: String
    date_created: Date
});

var User = mongoose.model('User', UserSchema);
socket.io

socket.on('disconnect', function() {
    if (socket.handshake.session.user) {
         var user =
socket.handshake.session.user.username;
         io.sockets.in(user).emit('exit', { user:
user });
    }
});
YouTube API
YouTube API

• Very well documented
• Tons of information available from player
• Easy to integrate
Problems
Problems

• mongoose schemas
• Socket.io access to sessions
• Handling groups of sockets
• Passing server-side data to front-end
• YouTube API and HTML5
What I Learned
What I Learned

• Easy to get an app up and running
• MongoDB is incredibly simple
• YouTube API is great to work with
Contact
Shael Joon                                              Matt Simonis

Rochester Institute of Technology   Rochester Institute of Technology

website: www.shaeljoon.com            website: www.mattsimonis.com

email: shaeljoon@gmail.com             email: matts12290@gmail.com

                                              twitter: @mattsimonis

Weitere ähnliche Inhalte

Was ist angesagt?

Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experienceIgor Anishchenko
 
Introducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoIntroducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoDaniele Vistalli
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBMelbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBYuval Ararat
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
 
OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionPaul Withers
 
Mobile developement
Mobile developementMobile developement
Mobile developementLilia Sfaxi
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUGPaul Withers
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Ryan Cuprak
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile appsIvano Malavolta
 
Grand Central Dispatch and multi-threading [iCONdev 2014]
Grand Central Dispatch and multi-threading [iCONdev 2014]Grand Central Dispatch and multi-threading [iCONdev 2014]
Grand Central Dispatch and multi-threading [iCONdev 2014]Kuba Břečka
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryAlek Davis
 
Webservices
WebservicesWebservices
Webservicess4al_com
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 

Was ist angesagt? (20)

Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
 
Introducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoIntroducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM Domino
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
 
Migrate all the things!
Migrate all the things!Migrate all the things!
Migrate all the things!
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBMelbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview Introduction
 
Mobile developement
Mobile developementMobile developement
Mobile developement
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUG
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
 
Grand Central Dispatch and multi-threading [iCONdev 2014]
Grand Central Dispatch and multi-threading [iCONdev 2014]Grand Central Dispatch and multi-threading [iCONdev 2014]
Grand Central Dispatch and multi-threading [iCONdev 2014]
 
Working with GIT
Working with GITWorking with GIT
Working with GIT
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 
Webservices
WebservicesWebservices
Webservices
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 

Ähnlich wie 1 (585) 555-1234 Assistant: +1 (585) 555-5678

After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANJeff Fox
 
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
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...Javier García Magna
 
Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0Dinis Cruz
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Pierre Joye
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The WhenFITC
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 
End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012Alexandre Morgaut
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1Mohammad Qureshi
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014Damian Beresford
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularMark Leusink
 

Ähnlich wie 1 (585) 555-1234 Assistant: +1 (585) 555-5678 (20)

After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
 
David buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharpDavid buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharp
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 

Kürzlich hochgeladen

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
 
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
 
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
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
🐬 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
 
[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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
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...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 

1 (585) 555-1234 Assistant: +1 (585) 555-5678

  • 1.
  • 2. Node.js Shael Joon & Matt Simonis
  • 3. Background • Server Side JavaScript • Developed by Ryan Dhal (2009) • Currently owned by Joyent • Based off Google’s V8 JavaScript Engine (which is written in C and C++) • Open Source
  • 4. It’s Asynchronous • Non-blocking due to system event notifications • Not having to deal with common multithreading problems such as deadlocks, resource sharing and etc. (See [6] for more details) • Scalability (930k[tested] to 1500k[claimed] connections) [4] • Most of the server and client side work can be done in JavaScript
  • 5. Usage domain areas/users Microsoft Node gives Azure users the first end-to-end JavaScript experience for the development of a whole new class of real-time applications. eBay Node’s evented I/O model freed us from worrying about locking and concurrency issues that are common with multithreaded async I/O. Linkedin On the server side, our entire mobile software stack is completely built in Node. One reason was scale. The second is Node showed us huge performance gains. Yahoo Node.js is the execution core of Manhattan. Allowing developers to build one code base using one language – that is the nirvana for developers. http://nodejs.org/
  • 6. Google Trends – “node.js” http://www.google.com/trends/?q=node.js
  • 7. Ample Resources • Free e-Books • Code Samples including 3rd party sources • Modules usage guides/samples • Benchmarking and comparisons to other technologies • However, it is missing scholarly papers and research.
  • 8. Modules • Modules are plugins/add-ons/extensions for Node to help with development process. • Often code examples are included alongside the module. • Several categories of modules. • Modules are plugins/add-ons/extensions for Node to help with development process.
  • 9. 3000+ modules in the areas below • Web frameworks • Templating • Parsers • Routers • CSS Engines • JSON • Static file servers • Content Management Systems • XML • Microframeworks • Build and Deployment • Command Line Option • Frameworks • Package Management Systems Parsers • Middleware • Module Loader • Parser Generators • JSGI • OpenSSL / Crypto / Hashing • Other Parsers • Connect • SMTP • Debugging / Console Utilities • Other middleware • TCP / IP • Compression • Other • Multiple protocols • Graphics • Database • HTTP • Sound • MS SQL Server • FTP • Payment Gateways • PostgreSQL • E-mail • API clients • MySQL • XMPP • Control flow / Async goodies • SQLite • Other networking • I18n and L10n modules • Oracle • RPC • Boilerplates • NoSQL and Key/Value • Web Sockets & Ajax • Continuous Integration Tools • Mongo • Message Queues • DDD, CQRS, EventSourcing • Hive • Class systems • Desktop application related • Redis • Testing / Spec Frameworks • JavaScript threads • CouchDB • Wrappers • Other https://github.com/joyent/node/wiki/modules
  • 14. Benchmarks [1 , 4 ] • Analysis • Conducted by the owner of Erwin • Comparison of all event based languages • Tested on a single core • Recognized by Tom Hughes-Croucher (representing Node) • Node is fairly new and yet it can compete with other mature technologies • Performance is not everything. Other factors (Usability, stability, etc) should be considered as well. • THEY ARE ALL AVERAGES BEING PLOTTED. Concern about exceptional cases (unusually long calls) may bring down the overall performance down.
  • 16. Benchmarks Analysis • Conducted by 3rd party • Comparing Node against Apache + PHP is an unfair experiment but is a realistic case. • Benchmarking tool was sharing resources while the tests were run.
  • 18. Benchmarks Analysis • Conducted by 3rd party • Heavier work loads being tested – DB access was involved. • Run on a single machine and was not distributed.
  • 19. Benchmarks [3] Analysis • Conducted by 3rd party • Simple random number generation / return test. • Missing physical hardware set information.
  • 20. Benchmarks – Final thoughts • Node is worth investigating as it shows rapid growth in 3 years of existence. • Needs higher quality benchmarking tests conducted in real life scenarios. • Scholarly research is still scarce. • Recommended domain areas – scalable web services, non critical software.
  • 22. Chat server – client may connect via telnet [4]
  • 23. Sources Web Posts: [1] Ostinelli , Roberto. "A comparison between Misultin, Mochiweb, Cowboy, NodeJS and Tornadoweb."www.ostinelli.net. Oostinelli, May 2011. Web. 19 Mar 2012. <http://www.ostinelli.net/a-comparison- between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/>. [2] Zgadzaj, Maciej. "Benchmarking Node.js - basic performance tests against Apache PHP."http://zgadzaj.com. N.p., August 19, 2010. Web. 19 Mar 2012. <http://zgadzaj.com/benchmarking-nodejs-basic-performance-tests-against- apache-php>.  [3] B, K. "Benchmarking nodejs : comparing nodejs and tomcat - random generator." http://fl-ex.blogspot.com. N.p., 13 December 2011. Web. 19 Mar 2012. <http://fl-ex.blogspot.com/2011/12/comparing-random-generator-nodejs- and.html>.   [4] Hughes-Croucher, Tom, dir. Tech Talk: Tom Hughes-Croucher (Joyent) — “Node.js at Scale”. Joyent, 2011. Web. 19 Mar 2012. <http://sna-projects.com/blog/2011/08/nodejs/>. <http://sna-projects.com/blog/2011/08/nodejs/>. [5] SUBBU, ALLAMARAJU. "Nodejs vs Play for Front-End Apps." subbu.org. N.p., MARCH 26, 2011. Web. 19 Mar 2012. <http://www.subbu.org/blog/2011/03/nodejs-vs-play-for-front-end-apps>. IEEE Paper: [6] Tilkov, S.;Vinoski, S.; , "Node.js: Using JavaScript to Build High-Performance Network Programs," Internet Computing, IEEE , vol.14, no.6, pp.80-83, Nov.-Dec. 2010 doi: 10.1109/MIC.2010.145 URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5617064&isnumber=5617049
  • 25. Why Node.js? • Fast and scalable • Transferrable knowledge
  • 26. Why Node.js? • Fast and scalable • Transferrable knowledge • Event driven with non-blocking I/O
  • 27. Why Node.js? • Fast and scalable • Transferrable knowledge • Event driven with non-blocking I/O • Hundreds of modules
  • 29. Modules Socket.io http ejs Jade Express node-crypto node-imap mongoose node-ftp node.bcrypt.js
  • 31. Modules Used • Express • bcrypt • mongoose • Socket.io • child_process
  • 32. Express var app = express.createServer(); app.get('/', function(req, res){ res.send('Hello World'); }); app.listen(3000);
  • 33. Express & REST app.get('/user/playlist', function(req, res) { if (req.session.user) { Playlist.findOne({userid: req.session.user._id}, function(err, playlist) { if (playlist) { res.json(playlist.songs); } else { res.redirect('/404'); } }); } else { res.redirect('/404'); } });
  • 34. Express & REST app.post('/register', function(req, res) { var newUser = new User(); newUser.username = req.body.username; newUser.password = req.body.password; newUser.display_name = req.body.displayname; newUser.date_created = new Date(); newUser.save(function(err) { if (err) { res.redirect('error'); } else { res.redirect('home'); } }); });
  • 35. Mongoose var UserSchema = new Schema({ username: { type: String, index: { unique: true } }, password: String, salt: String, display_name: String date_created: Date }); var User = mongoose.model('User', UserSchema);
  • 36. socket.io socket.on('disconnect', function() { if (socket.handshake.session.user) { var user = socket.handshake.session.user.username; io.sockets.in(user).emit('exit', { user: user }); } });
  • 38. YouTube API • Very well documented • Tons of information available from player • Easy to integrate
  • 40. Problems • mongoose schemas • Socket.io access to sessions • Handling groups of sockets • Passing server-side data to front-end • YouTube API and HTML5
  • 42. What I Learned • Easy to get an app up and running • MongoDB is incredibly simple • YouTube API is great to work with
  • 43. Contact Shael Joon Matt Simonis Rochester Institute of Technology Rochester Institute of Technology website: www.shaeljoon.com website: www.mattsimonis.com email: shaeljoon@gmail.com email: matts12290@gmail.com twitter: @mattsimonis