SlideShare une entreprise Scribd logo
1  sur  26
20 TIPS FOR BUILDING A
SCALABLE AND ROBUST NODE.JS
STACK THAT DEVELOPERS LOVE
@
Patrick Steele-Idem
@psteeleidem
psteeleidem@ebay.com
github.com/patrick-steele-idem
Senior Platform Architect @
These tips are based on lessons I learned from
building and supporting web development stacks
for both the JVM and Node.js in companies big
and small.
AVOID “MAGIC”
If developers cannot reason about a system then
they will not be happy or productive
MORE ON MAGIC…
• What is Magic?
• Runtime code that changes how other
code runs
• Non-obvious and overly clever tricks
• Abstractions and indirections
• Avoiding Magic:
• Prefer explicit over implicit
• Code comments and clear documentation
KEEP DOCUMENTATION WITH THE CODE
The documentation you are reading is
out-of-date and confusing.
Would you like to like to continue?
README files for the win. Learn Markdown.
Branch docs with code.
DON’T FORK THE COMMUNITY
How many package managers do you really need?
(I’m looking at you Bower, Component, Ender, Jam, etc.)
GIVE DEVELOPERS CHOICES
Don’t build a restrictive framework!
KEEP AN EYE ON THE FUTURE
Do not become too attached to today’s
technologies and practices
THINK MODULAR, NOT MONOLITHIC!
Image Source: http://www.flickr.com/photos/albatros/
Much easier to digest small, bite-sized modules
compared to a monolithic framework
MULTI-VERSION WITHOUT CONFLICTS
Image Source: http://www.flickr.com/photos/albatros/
Do not force everyone to agree on the same version of
a module! Dependencies are your friends.
FOLLOW SEMANTIC VERSIONING
• Increment MAJOR version when you make incompatible
API changes,
• Increment MINOR version when you add functionality in a
backwards-compatible manner, and
• Increment PATCH version when you make backwards-
compatible bug fixes.
• Notes:
• 0.x.y – Anything goes
• Pre-release labels to indicate “beta” versions
• More info:
• http://semver.org/
ENCOURAGE A MODULAR DIRECTORY STRUCTURE
Organized
by Modules:
Organized by MVC
and Resource Type:
ENABLE AUTO RESTART AND LIVE CODING
Minimize time spent bouncing between windows and waiting.
Make sure server startup time never exceeds 2s.
http://www.flickr.com/photos/mbiebusch/
AVOID THE BUILD STEP
In development, do as much at runtime
as possible.
http://xkcd.com/303/
INTERNAL OPEN SOURCE
Cultivate a culture of collaboration within a
company and break down cross-team boundaries
PROVIDE AN INTERNAL SUPPORT FORUM
Empower and encourage users to help each other.
Redirect emails to the support forum. Redirect
open source questions to public support forums.
Image Source: http://www.flickr.com/photos/31065898@N08/
DON’T BUILD A STACK IN ISOLATION
Work in conjunction with an application
team to build a new stack.
Image source: http://www.flickr.com/photos/epublicist/
BE HELPFUL WITH ERROR MESSAGES
MY APPLICATION STOPPED WORKING AND
WE LOST A TON OF MONEY
BUT I FOUND A VERY HELPFUL MESSAGE IN
THE SERVER LOGS, SO I’VE GOT THAT
GOING FOR ME, WHICH IS NICE.
Expect services to go down. Expect bad input.
Catch errors early. Log the full stack trace.
GO REACTIVE
React to events. React to load. React to failure. React to users.
Which is worse, a service that fails
fast or an unresponsive service?
Write tests and find out.
http://www.reactivemanifesto.org/
http://www.flickr.com/photos/dougww/
MANAGE WORKER STATE
Start
Warm-up
Put into
Traffic
Unhealthy
Take out
of Traffic
Kill
Proactively handle garbage collection, errors and
high CPU and memory usage
Do not forget
this step!
Be proactive
Be able to detect
AVOID “BLOCKING” MIDDLEWARE
Middleware should not add significant
overhead to every request.
20ms 40ms 60ms 80ms 100ms
Page Controller
Middleware Your Code
SUPPORT ASYNCHRONOUS RENDERING
HTMLTemplate
SynchronousAsynchronous
View Model
No Delay
Data Providers
1. Setup data providers
2. Go straight to the
template!
ControllerInput
HTMLTemplateView Model
Long Delay
ControllerInput
1. Make service calls
2. Wait for all data to come
back
3. Prepare view model
PROVIDE A COMMAND LINE TOOL
Easily support environment setup, app creation,
deployment, scaffolding, upgrades, etc.
QUESTIONS?
psteeleidem@ebay.com
@psteeleidem
EVALUATE THIS SESSION
Sign-in: www.eclipsecon.org
Select session from schedule
Evaluate:
1
2
3

Contenu connexe

Tendances

Introduction to WordPress Class 5
Introduction to WordPress Class 5Introduction to WordPress Class 5
Introduction to WordPress Class 5Adrian Mikeliunas
 
Librarians learn web day 3
Librarians learn web day 3Librarians learn web day 3
Librarians learn web day 3Robin Hastings
 
How To Choose A Theme
How To Choose A ThemeHow To Choose A Theme
How To Choose A ThemeNicky Pink
 
Weaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & PluginsWeaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & PluginsVizRED
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentEd Burns
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design WorkflowIntergen
 
How to win a hackathon - Penn APps 2015
How to win a hackathon - Penn APps 2015How to win a hackathon - Penn APps 2015
How to win a hackathon - Penn APps 2015David Voyles
 
Making WordPress More Social
Making WordPress More SocialMaking WordPress More Social
Making WordPress More SocialYahya Ayob
 
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 201340 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013Bastian Grimm
 
Choosing WordPress Plugins (WordCamp Raleigh 2016)
Choosing WordPress Plugins (WordCamp Raleigh 2016)Choosing WordPress Plugins (WordCamp Raleigh 2016)
Choosing WordPress Plugins (WordCamp Raleigh 2016)andisites
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionOtto Kekäläinen
 
How to embed a TitanPad into Twispace page
How to embed a TitanPad into Twispace pageHow to embed a TitanPad into Twispace page
How to embed a TitanPad into Twispace pagePetros Michailidis
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.WP Engine
 
Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013David Bisset
 
Staying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteStaying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteRaymund Mitchell
 
Word camp 2014 So Obvious You Miss It
Word camp 2014 So Obvious You Miss ItWord camp 2014 So Obvious You Miss It
Word camp 2014 So Obvious You Miss ItVizRED
 
A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012Kathryn Presner
 

Tendances (20)

Introduction to WordPress Class 5
Introduction to WordPress Class 5Introduction to WordPress Class 5
Introduction to WordPress Class 5
 
Librarians learn web day 3
Librarians learn web day 3Librarians learn web day 3
Librarians learn web day 3
 
How To Choose A Theme
How To Choose A ThemeHow To Choose A Theme
How To Choose A Theme
 
Weaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & PluginsWeaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & Plugins
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java Development
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design Workflow
 
How to win a hackathon - Penn APps 2015
How to win a hackathon - Penn APps 2015How to win a hackathon - Penn APps 2015
How to win a hackathon - Penn APps 2015
 
Making WordPress More Social
Making WordPress More SocialMaking WordPress More Social
Making WordPress More Social
 
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 201340 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
 
Set up your Corporate Blo
Set up your Corporate BloSet up your Corporate Blo
Set up your Corporate Blo
 
Choosing WordPress Plugins (WordCamp Raleigh 2016)
Choosing WordPress Plugins (WordCamp Raleigh 2016)Choosing WordPress Plugins (WordCamp Raleigh 2016)
Choosing WordPress Plugins (WordCamp Raleigh 2016)
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
 
How to embed a TitanPad into Twispace page
How to embed a TitanPad into Twispace pageHow to embed a TitanPad into Twispace page
How to embed a TitanPad into Twispace page
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
 
WORDPRESS
WORDPRESSWORDPRESS
WORDPRESS
 
Azure web sites
Azure web sitesAzure web sites
Azure web sites
 
Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013
 
Staying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteStaying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress Website
 
Word camp 2014 So Obvious You Miss It
Word camp 2014 So Obvious You Miss ItWord camp 2014 So Obvious You Miss It
Word camp 2014 So Obvious You Miss It
 
A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012
 

Similaire à 20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love

Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxGetting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxIlesh Mistry
 
Webinar: Continuous Deployment with MongoDB at Kitchensurfing
Webinar: Continuous Deployment with MongoDB at KitchensurfingWebinar: Continuous Deployment with MongoDB at Kitchensurfing
Webinar: Continuous Deployment with MongoDB at KitchensurfingMongoDB
 
ShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean StartupShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean StartupRyan Hayes
 
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...AOE
 
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...Carlo Longino
 
AUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comAUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comJeremy Thake
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionAnne Grundhoefer
 
Continuous Deployment at Kitchensurfing
Continuous Deployment at KitchensurfingContinuous Deployment at Kitchensurfing
Continuous Deployment at KitchensurfingLars Kluge
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to buildDanHeidinga
 
Professional web development with libraries
Professional web development with librariesProfessional web development with libraries
Professional web development with librariesChristian Heilmann
 
Step away from that knife!
Step away from that knife!Step away from that knife!
Step away from that knife!Michael Goetz
 
Cisco webex zend con2010 presentation
Cisco webex zend con2010 presentationCisco webex zend con2010 presentation
Cisco webex zend con2010 presentationEnterprise PHP Center
 
Cisco webex zend con2010 presentation
Cisco webex zend con2010 presentationCisco webex zend con2010 presentation
Cisco webex zend con2010 presentationEnterprise PHP Center
 
FSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFrédéric Harper
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?Kasra Khosravi
 
VS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewVS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewRoberto Stefanetti
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoElad Elrom
 

Similaire à 20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love (20)

Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxGetting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
 
Webinar: Continuous Deployment with MongoDB at Kitchensurfing
Webinar: Continuous Deployment with MongoDB at KitchensurfingWebinar: Continuous Deployment with MongoDB at Kitchensurfing
Webinar: Continuous Deployment with MongoDB at Kitchensurfing
 
ShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean StartupShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean Startup
 
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
 
1_Intro_toHTML.ppt
1_Intro_toHTML.ppt1_Intro_toHTML.ppt
1_Intro_toHTML.ppt
 
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
 
AUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comAUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.com
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX Evolution
 
Continuous Deployment at Kitchensurfing
Continuous Deployment at KitchensurfingContinuous Deployment at Kitchensurfing
Continuous Deployment at Kitchensurfing
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to build
 
Professional web development with libraries
Professional web development with librariesProfessional web development with libraries
Professional web development with libraries
 
RWD - Bootstrap
RWD - BootstrapRWD - Bootstrap
RWD - Bootstrap
 
Step away from that knife!
Step away from that knife!Step away from that knife!
Step away from that knife!
 
Cisco webex zend con2010 presentation
Cisco webex zend con2010 presentationCisco webex zend con2010 presentation
Cisco webex zend con2010 presentation
 
Cisco webex zend con2010 presentation
Cisco webex zend con2010 presentationCisco webex zend con2010 presentation
Cisco webex zend con2010 presentation
 
FSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the Matrix
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
 
VS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewVS Code and Modern Development Environment Preview
VS Code and Modern Development Environment Preview
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
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
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
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
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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...
 
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
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love

  • 1. 20 TIPS FOR BUILDING A SCALABLE AND ROBUST NODE.JS STACK THAT DEVELOPERS LOVE @
  • 3. These tips are based on lessons I learned from building and supporting web development stacks for both the JVM and Node.js in companies big and small.
  • 4. AVOID “MAGIC” If developers cannot reason about a system then they will not be happy or productive
  • 5. MORE ON MAGIC… • What is Magic? • Runtime code that changes how other code runs • Non-obvious and overly clever tricks • Abstractions and indirections • Avoiding Magic: • Prefer explicit over implicit • Code comments and clear documentation
  • 6. KEEP DOCUMENTATION WITH THE CODE The documentation you are reading is out-of-date and confusing. Would you like to like to continue? README files for the win. Learn Markdown. Branch docs with code.
  • 7. DON’T FORK THE COMMUNITY How many package managers do you really need? (I’m looking at you Bower, Component, Ender, Jam, etc.)
  • 8. GIVE DEVELOPERS CHOICES Don’t build a restrictive framework!
  • 9. KEEP AN EYE ON THE FUTURE Do not become too attached to today’s technologies and practices
  • 10. THINK MODULAR, NOT MONOLITHIC! Image Source: http://www.flickr.com/photos/albatros/ Much easier to digest small, bite-sized modules compared to a monolithic framework
  • 11. MULTI-VERSION WITHOUT CONFLICTS Image Source: http://www.flickr.com/photos/albatros/ Do not force everyone to agree on the same version of a module! Dependencies are your friends.
  • 12. FOLLOW SEMANTIC VERSIONING • Increment MAJOR version when you make incompatible API changes, • Increment MINOR version when you add functionality in a backwards-compatible manner, and • Increment PATCH version when you make backwards- compatible bug fixes. • Notes: • 0.x.y – Anything goes • Pre-release labels to indicate “beta” versions • More info: • http://semver.org/
  • 13. ENCOURAGE A MODULAR DIRECTORY STRUCTURE Organized by Modules: Organized by MVC and Resource Type:
  • 14. ENABLE AUTO RESTART AND LIVE CODING Minimize time spent bouncing between windows and waiting. Make sure server startup time never exceeds 2s. http://www.flickr.com/photos/mbiebusch/
  • 15. AVOID THE BUILD STEP In development, do as much at runtime as possible. http://xkcd.com/303/
  • 16. INTERNAL OPEN SOURCE Cultivate a culture of collaboration within a company and break down cross-team boundaries
  • 17. PROVIDE AN INTERNAL SUPPORT FORUM Empower and encourage users to help each other. Redirect emails to the support forum. Redirect open source questions to public support forums. Image Source: http://www.flickr.com/photos/31065898@N08/
  • 18. DON’T BUILD A STACK IN ISOLATION Work in conjunction with an application team to build a new stack. Image source: http://www.flickr.com/photos/epublicist/
  • 19. BE HELPFUL WITH ERROR MESSAGES MY APPLICATION STOPPED WORKING AND WE LOST A TON OF MONEY BUT I FOUND A VERY HELPFUL MESSAGE IN THE SERVER LOGS, SO I’VE GOT THAT GOING FOR ME, WHICH IS NICE. Expect services to go down. Expect bad input. Catch errors early. Log the full stack trace.
  • 20. GO REACTIVE React to events. React to load. React to failure. React to users. Which is worse, a service that fails fast or an unresponsive service? Write tests and find out. http://www.reactivemanifesto.org/ http://www.flickr.com/photos/dougww/
  • 21. MANAGE WORKER STATE Start Warm-up Put into Traffic Unhealthy Take out of Traffic Kill Proactively handle garbage collection, errors and high CPU and memory usage Do not forget this step! Be proactive Be able to detect
  • 22. AVOID “BLOCKING” MIDDLEWARE Middleware should not add significant overhead to every request. 20ms 40ms 60ms 80ms 100ms Page Controller Middleware Your Code
  • 23. SUPPORT ASYNCHRONOUS RENDERING HTMLTemplate SynchronousAsynchronous View Model No Delay Data Providers 1. Setup data providers 2. Go straight to the template! ControllerInput HTMLTemplateView Model Long Delay ControllerInput 1. Make service calls 2. Wait for all data to come back 3. Prepare view model
  • 24. PROVIDE A COMMAND LINE TOOL Easily support environment setup, app creation, deployment, scaffolding, upgrades, etc.
  • 26. EVALUATE THIS SESSION Sign-in: www.eclipsecon.org Select session from schedule Evaluate: 1 2 3

Notes de l'éditeur

  1. Explicit over implicit Do not introduce tools to hide complexity Start without conventions and introduce them later Don’t be too clever Describe your cleverness in great detail Be consistent Be less forgiving
  2. AMD versus CommonJS Avoid silos
  3. One module per Git repo
  4. One module per Git repo
  5. One module per Git repo
  6. Explicit over implicit Do not introduce tools to hide complexity Start without conventions and introduce them later Don’t be too clever Describe your cleverness in great detail Be consistent Be less forgiving