SlideShare a Scribd company logo
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

More Related Content

What's hot

Introduction to WordPress Class 5
Introduction to WordPress Class 5Introduction to WordPress Class 5
Introduction to WordPress Class 5
Adrian Mikeliunas
 
Librarians learn web day 3
Librarians learn web day 3Librarians learn web day 3
Librarians learn web day 3
Robin Hastings
 
How To Choose A Theme
How To Choose A ThemeHow To Choose A Theme
How To Choose A Theme
Nicky Pink
 
Weaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & PluginsWeaving Your Way With Widgets & Plugins
Weaving Your Way With Widgets & Plugins
VizRED
 
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
Ed Burns
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design Workflow
Intergen
 
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
David Voyles
 
Making WordPress More Social
Making WordPress More SocialMaking WordPress More Social
Making WordPress More Social
Yahya 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 2013
Bastian Grimm
 
Set up your Corporate Blo
Set up your Corporate BloSet up your Corporate Blo
Set up your Corporate Blo
MarketingatBahrain
 
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 edition
Otto 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 page
Petros 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
 
WORDPRESS
WORDPRESSWORDPRESS
WORDPRESS
Akhil Kumar
 
Azure web sites
Azure web sitesAzure web sites
Azure web sites
Aymeric Weinbach
 
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
David Bisset
 
Staying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteStaying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress Website
Raymund 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 It
VizRED
 
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
Kathryn Presner
 

What's hot (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
 

Similar to 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.pptx
Ilesh 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 Kitchensurfing
MongoDB
 
ShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean StartupShoelaceMVC and the Lean Startup
ShoelaceMVC and the Lean Startup
Ryan 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
 
1_Intro_toHTML.ppt
1_Intro_toHTML.ppt1_Intro_toHTML.ppt
1_Intro_toHTML.ppt
benjaminonum1
 
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.com
Jeremy Thake
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX Evolution
Anne Grundhoefer
 
Continuous Deployment at Kitchensurfing
Continuous Deployment at KitchensurfingContinuous Deployment at Kitchensurfing
Continuous Deployment at Kitchensurfing
Lars 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 build
DanHeidinga
 
Professional web development with libraries
Professional web development with librariesProfessional web development with libraries
Professional web development with libraries
Christian Heilmann
 
RWD - Bootstrap
RWD - BootstrapRWD - Bootstrap
RWD - Bootstrap
Jasvinder Singh
 
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 presentation
Enterprise PHP Center
 
Cisco webex zend con2010 presentation
Cisco webex zend con2010 presentationCisco webex zend con2010 presentation
Cisco webex zend con2010 presentation
Enterprise 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 Matrix
Fré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 Preview
Roberto Stefanetti
 
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
Elad Elrom
 
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
guest5639fa9
 

Similar to 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) 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
 
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
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

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

Editor's Notes

  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