SlideShare una empresa de Scribd logo
1 de 60
Using Node.js to improve
               the performance of
           Mobile apps and Mobile web
                   Tom Hughes-Croucher



@sh1mmer
Watch the video with slide
                         synchronization on InfoQ.com!
                      http://www.infoq.com/presentations
                           /Nodejs-Performance-Web

       InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
  Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Presented at QCon San Francisco
                          www.qconsf.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
 - practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Scalable Server-Side Code with JavaScript



           Who is Tom?
     •   Wrote W3C Standards

     •
     •
         10+ years in the web industry

         Worked on projects for: Tesco,
         NASA, Walmart, MySpace, etc
                                             Node                     Up and Running



     •   ~5 years at Yahoo! including .com
                                                                     Tom Hughes-Croucher

     •   Node team at Joyent

@sh1mmer
This is a talk about why
              cell phones suck.


@sh1mmer
@sh1mmer
Radio waves suck
           (at least compared to fibre or copper)




@sh1mmer
http://developer.yahoo.com/blogs/ydn/posts/2009/10/a_engineers_gui/




@sh1mmer
Radio vs. buildings



@sh1mmer
@sh1mmer
@sh1mmer
@sh1mmer
@sh1mmer
@sh1mmer
Desktop                                     Mobile




           http://www.webperformancetoday.com/2012/04/02/mobile-versus-desktop-latency/

@sh1mmer
Ookla/speedtest.net
           via http://www.slideshare.net/patrickmeenan/velocity-2012-taming-the-mobile-beast/22
@sh1mmer
Effect of latency on servers



@sh1mmer
Shielding Frontends



@sh1mmer
nginx
           haproxy               web services
                     frontends
             ATS                    / data
           varnish




@sh1mmer
var client = net.connect(80, domain, function() {
             client.write("GET / HTTP/1.1rn");
             t1 = (new Date()).getTime();
           });

           client.on('end', function() {
             t2 = (new Date()).getTime();
             output.write(domain + ' ' + ((t2-t1)/1000) + 'sn');
           });




@sh1mmer
Sample of Alexa 5000
           macupdate.com       442.3
           uzai.com            403.658
           wired.jp            238.848
           facilisimo.com      205.159
           mycokerewards.com   202.757
           rbc.cn              192.354
           moviesmobile.net    183.157
           stop55.com          145.927
           dir.bg              137.982
           carrefour.fr        112.789
           sifyitest.com       111.171




@sh1mmer
Event-driven Frontends



@sh1mmer
Client → Server   Server → DB




                    Computation     Computation
@sh1mmer
Not an event frontend



@sh1mmer
@sh1mmer
Server




@sh1mmer
Request




@sh1mmer
@sh1mmer
Event-driven frontend



@sh1mmer
Place-holder




@sh1mmer
@sh1mmer
Shared
    Work
  Resources




@sh1mmer
Memory operations


@sh1mmer
var x = "I am a string"

           ~1ns Running 1 instruction
           2ns Data from l1 cpu cache
           5ns Data from l2 cpu cache
           80ns Data from ram




@sh1mmer
@sh1mmer
Mobile latency


@sh1mmer
@sh1mmer
100 Blue Whales

                         Cat
@sh1mmer
"They went from running 15 servers with 15
           instances (virtual servers) on each physical machine,
           to just four instances that can handle double the
           traffic."




                                                   http://venturebeat.com/2011/08/16/linkedin-node/
@sh1mmer
Not just simple applications



@sh1mmer
@sh1mmer
@sh1mmer
First page load vs. Client MVC



@sh1mmer
@sh1mmer
http://www.belshe.com/2010/05/24/more-bandwidth-doesnt-matter-much/
@sh1mmer
Bandwidth




           Latency               Device capability




@sh1mmer
Barfing data at 3G



@sh1mmer
                                                                                                
                        
                                                    
                                                                             
                                                                                                         




                                                                                                                      
                                                                                                         
                                                                        
                                                   
                          
                                
                                      
                                                          
                                                            
                                                                                  
                                                                                 
                                                                                                          
                                                                                                         




                                                                                                            
                                                                                     
                                                                                                                               
                                                             
                                      




                                                                                                                          
                                                                                   
                                                                                                 
                                                             
                                                                                                                   
                                        
                                                  
                                                                                                          
                                                           
                                       
           
                                
                                      
                                      
                                                                    
                                                                                  
                                                                                                            
                                                                      
                                                                          
                                                                                                                
                                                 
                                        
                                                           
                                                                                      
                               
                                       
                                      
                                      
                                      
                                                                  
                                                                    
                                                            
                                                                             
                                                                                           
                                                                                                             




                                                                                                                          
                                                                                    
                                                                                             
                                                             
                                                                       
                                       
                                       
                                                                                                     
                                                             
           
                                                                       
                                                                                    
                                                                                                                               
                                                 
                                       
                                                     
                                                     
                                       
                                       
                               
                                      
                                      
                                                        
                                                            
                                                                                             
                                                                                                   
                                                                                            
                                                                                                          
                                                                                                           
                                                                                    
                                                                  
                                                                                                                              

                                                                    
                                            
                                                                                             
                                                                                                                               
                                       
                                       
                                       
                                
                                       
                                       
                                                                  
                                                                
                                                                                                                               
                                                                                    
                                                             
                                      
                                                                          
                                       
           

                                                   
                                                                                                      
                                                                                           
                                                                                    
                                                                                                                               
                                                                                    
                                                                                             
                                                             
                                                                                              
                                       
                                       
                                                                                             
                                                                                                                               
                                      
                                                            
           
                                                           
                                                                        
                               
                                                            
                                                                                   
                                                                                                          




@sh1mmer
@sh1mmer
Clientside templating



@sh1mmer
@sh1mmer
Node.js allows you to tune
           rendering between client and
           server based on the network.

@sh1mmer
HTML                                         JSON




       More bandwidth                  Less bandwidth
     Less client processing         More client processing
        Battery friendly      Cheaper for you bandwidth/server
                                 Cheaper for them bandwidth

@sh1mmer
http://engineering.linkedin.com/frontend/leaving-jsps-dust-moving-linkedin-dustjs-client-side-templates

http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more
Challenges

     •   JSON - fast object / slow render

     •   HTML - fast render / slow objects

     •   If we use HTML where do we manage our model?

     •   If we use JSON does rendering matter?


@sh1mmer
Identifying use cases


     •   "Client-side apps" - read/write data on client

     •   "Render-only apps" - mostly read data on client




@sh1mmer
Summary

     •   Node.js allows you to:

         •   Manage resources with unreliable mobile data connections

         •   Choose where to apply rendering

         •   Pick the right rendering solution for the right scenario


@sh1mmer
Demo time.



@sh1mmer
Questions
  @sh1mmer

Más contenido relacionado

Más de C4Media

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaC4Media
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?C4Media
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseC4Media
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinC4Media
 

Más de C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
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
 
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
 
[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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
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...
 
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
 
[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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Using Node.js to Improve the Performance of Mobile Apps and Mobile Web

  • 1. Using Node.js to improve the performance of Mobile apps and Mobile web Tom Hughes-Croucher @sh1mmer
  • 2. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /Nodejs-Performance-Web InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month
  • 3. Presented at QCon San Francisco www.qconsf.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. Scalable Server-Side Code with JavaScript Who is Tom? • Wrote W3C Standards • • 10+ years in the web industry Worked on projects for: Tesco, NASA, Walmart, MySpace, etc Node Up and Running • ~5 years at Yahoo! including .com Tom Hughes-Croucher • Node team at Joyent @sh1mmer
  • 5. This is a talk about why cell phones suck. @sh1mmer
  • 7. Radio waves suck (at least compared to fibre or copper) @sh1mmer
  • 15. Desktop Mobile http://www.webperformancetoday.com/2012/04/02/mobile-versus-desktop-latency/ @sh1mmer
  • 16. Ookla/speedtest.net via http://www.slideshare.net/patrickmeenan/velocity-2012-taming-the-mobile-beast/22 @sh1mmer
  • 17. Effect of latency on servers @sh1mmer
  • 19. nginx haproxy web services frontends ATS / data varnish @sh1mmer
  • 20. var client = net.connect(80, domain, function() { client.write("GET / HTTP/1.1rn"); t1 = (new Date()).getTime(); }); client.on('end', function() { t2 = (new Date()).getTime(); output.write(domain + ' ' + ((t2-t1)/1000) + 'sn'); }); @sh1mmer
  • 21. Sample of Alexa 5000 macupdate.com 442.3 uzai.com 403.658 wired.jp 238.848 facilisimo.com 205.159 mycokerewards.com 202.757 rbc.cn 192.354 moviesmobile.net 183.157 stop55.com 145.927 dir.bg 137.982 carrefour.fr 112.789 sifyitest.com 111.171 @sh1mmer
  • 23. Client → Server Server → DB Computation Computation @sh1mmer
  • 24. Not an event frontend @sh1mmer
  • 32. Shared Work Resources @sh1mmer
  • 34. var x = "I am a string" ~1ns Running 1 instruction 2ns Data from l1 cpu cache 5ns Data from l2 cpu cache 80ns Data from ram @sh1mmer
  • 38. 100 Blue Whales Cat @sh1mmer
  • 39. "They went from running 15 servers with 15 instances (virtual servers) on each physical machine, to just four instances that can handle double the traffic." http://venturebeat.com/2011/08/16/linkedin-node/ @sh1mmer
  • 40. Not just simple applications @sh1mmer
  • 43. First page load vs. Client MVC @sh1mmer
  • 44.
  • 47. Bandwidth Latency Device capability @sh1mmer
  • 48. Barfing data at 3G @sh1mmer
  • 49.                                                                                                                                                                                  @sh1mmer
  • 53. Node.js allows you to tune rendering between client and server based on the network. @sh1mmer
  • 54. HTML JSON More bandwidth Less bandwidth Less client processing More client processing Battery friendly Cheaper for you bandwidth/server Cheaper for them bandwidth @sh1mmer
  • 56. Challenges • JSON - fast object / slow render • HTML - fast render / slow objects • If we use HTML where do we manage our model? • If we use JSON does rendering matter? @sh1mmer
  • 57. Identifying use cases • "Client-side apps" - read/write data on client • "Render-only apps" - mostly read data on client @sh1mmer
  • 58. Summary • Node.js allows you to: • Manage resources with unreliable mobile data connections • Choose where to apply rendering • Pick the right rendering solution for the right scenario @sh1mmer