SlideShare a Scribd company logo
1 of 48
Download to read offline
Dive into the details of our Node.js applications
Level: Intermediate - Advanced
All slides are available @
slideshare.net/heka1
Andrew Maxwell
About Me:
● GoPro, Inc.
● Frontend Software Technical Lead
● 10+ years in the industry
● I manage the Web-App team
Contact Info:
● Google+: Andrew Maxwell
● LinkedIn: Andrew Maxwell
● Twitter: @amaxwell02
● Github: amaxwell01
● Instagram: amaxwell01
● andrewcmaxwell.com
Gopro Web Applications
GoPro: Case Study
● Goals of our applications
● Development setup
● Coding process
● Problems & solutions
● What’s next?
Goals for our applications
Goals for our applications
1. Follow the Unix philosophy
“Do one thing and do it well”
2. All apps are isolated from each other and are
only connected through the login application
Goals for our applications
3. All Node applications are based off of
our web-base framework
Goals for our applications
4. All apps must run in docker
● Single docker image for all environments (local, QA, staging and production)
● Every deploy gets its own tagged image with code
Goals for our applications
5. All apps MUST be deployed independently
● No app should block one another from being deployed
● Move Fast
Goals for our applications
6. Easy roll backs thanks to every deploy getting its own tagged version
of a docker image
● Send an update notice to our cluster to roll back to the previous tag
● Removing the impact on our customers
Goals for our applications
Goals for our applications
7. Follow rolling release train to ship consistently, but only what’s ready
Development setup
Development setup
Isomorphic App Setup
Start from SCRATCH
● Start a new project
● Clone from web-base to the name of your new project
$git clone [gopro-web-base].git gopro-web-login
Development setup
● Hello World
Development setup
Development setup
Update our configuration files
● app-config.js
● gopro.json
● package.json
● docker-compose.yml
One command to run them all
Development setup
$MAKE
We can get you coding in 10 minutes:
$git clone gopro-web-login
$cd gopro-web-login
$make
Development setup
● $make install
○ Mapped to NPM install
● $make build
○ mapped to gulp build
■ runs webpack with node
● $make lint
○ gulp eslint
● $make test
○ Mapped to gulp test
■ runs Jest / Jasmine unit tests
● $make server
○ node babel.server.js
● $make dev
○ runs make install, make build, make
watch
● $make
○ make dev
All apps run with 7 simple commands:
Development setup
Build Process with Node and Gulp
Development setup
&
Quality and standards in our builds
Development setup
Watch files for changes
Development setup
Coding process
All components are react components
Lint our code
Coding process
Check docker
● Every time we make a change to our server setup, we make sure
that we run our changes locally in docker
$docker-compose run
Coding process
Push the changes up to Github and fires off our build
1. All features get their own branch
2. Circle CI automatically kicks off our build process for the new branch
3. Circle CI creates a tags a new docker image with the built code
4. Each branch can be tested in isolation with a unique sub-domain
Coding process
Create pull requests
1. Create a new PR for the changes
a. Must be a single commit or as little of commits as possible
b. Must include the ticket number as the first part of the commit title
2. Circle CI run’s our build process and adds badges to the Github PR
3. Code is reviewed by team
4. Original developer merges their own code and close the PR
Coding process
Pro’s & Con’s
Pro’s of isomorphic applications:
● One language (JavaScript)
● Shared components
● Faster rendering time
● Less moving parts
● Easy deployments
● Fast development
● Better S.E.O
● Running similar, but not identical, API requests on the server/client
● Unit tests require some HTML to be tested (blurs the line of unit vs E2E test)
● Some routes set in Hapi, some in React Router
● Debugging API requests can be tricky depending on if it is done on the client,
the server, or both
● 2 forms of logging
Con’s of isomorphic applications:
Problems & Solutions
Memory leak on health checks
Node-debugger
Sever metric monitoring
Problems & Solutions:
Problems & Solutions:
Debugging API requests on the client / server
Set up better logging using Bunyan
Problems & Solutions:
Lib-sass not staying up to date with Node changes
Node.js foundation - All is well again
Problems & Solutions:
Moving fast and staying up to date with Node versions
NVM
Problems & Solutions:
30+ second startup times because Babel6 doesn’t play nice with NPM 2
Changed to a new version of Node.js with NPM 3
Problems & Solutions:
Building multiple apps at once and keeping them in sync
Set up Web-base, our internal “desired” collection of frameworks and configuration
Problems & Solutions:
100+ feature based deployments a day, leaving around unused docker images on server
A bi-hourly cleaner to remove unused docker images
What’s next?
1. Continue improving our web-base framework.
2. Improve feature-base branch development to work better with our API’s
3. Create a CLI-tool to help start new projects, add tests, etc.
4. More tests!
Let’s dive into code
Questions?
Thank You!
● https://gopro.com
● https://www.docker.com
● https://nodejs.org/en
● http://hapijs.com
● http://gulpjs.com
● https://github.com/dlmanning/gulp-sass
● http://eslint.org
● https://babeljs.io
● https://facebook.github.io/react
● https://webpack.github.io
● https://github.com/trentm/node-bunyan
Links:

More Related Content

What's hot

Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development PipelineIzzet Mustafaiev
 
Jenkins users meetup plugins overview
Jenkins users meetup plugins overviewJenkins users meetup plugins overview
Jenkins users meetup plugins overviewCamblor Frédéric
 
"The Story of Declarative React at Grammarly: From two-way data binding with ...
"The Story of Declarative React at Grammarly: From two-way data binding with ..."The Story of Declarative React at Grammarly: From two-way data binding with ...
"The Story of Declarative React at Grammarly: From two-way data binding with ...Fwdays
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeBrian Dawson
 
JUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyJUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyCloudBees
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2Mayank Patel
 
At Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in OperationsAt Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in OperationsMandi Walls
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
 
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingPipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingSwapnil Jadhav
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkinsFred Lin
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?CloudBees
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)CloudBees
 
Gradle Show and Tell
Gradle Show and TellGradle Show and Tell
Gradle Show and TellSteve Pember
 
Continuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.orgContinuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.orgMarcinStachniuk
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again COMAQA.BY
 
LinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using GradleLinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using GradleDrew Hannay
 

What's hot (20)

Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development Pipeline
 
Jenkins users meetup plugins overview
Jenkins users meetup plugins overviewJenkins users meetup plugins overview
Jenkins users meetup plugins overview
 
"The Story of Declarative React at Grammarly: From two-way data binding with ...
"The Story of Declarative React at Grammarly: From two-way data binding with ..."The Story of Declarative React at Grammarly: From two-way data binding with ...
"The Story of Declarative React at Grammarly: From two-way data binding with ...
 
Gdg makurdi
Gdg makurdiGdg makurdi
Gdg makurdi
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
JUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyJUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made Easy
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2
 
At Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in OperationsAt Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in Operations
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingPipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of Testing
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkins
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
Gradle Show and Tell
Gradle Show and TellGradle Show and Tell
Gradle Show and Tell
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Continuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.orgContinuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.org
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
 
LinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using GradleLinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using Gradle
 

Viewers also liked

BDI 1/13/10 Social Integration Conference - Harvard Business School Case Study
BDI 1/13/10 Social Integration Conference - Harvard Business School Case StudyBDI 1/13/10 Social Integration Conference - Harvard Business School Case Study
BDI 1/13/10 Social Integration Conference - Harvard Business School Case StudyBusiness Development Institute
 
Case study research 14 aug2013
Case study research 14 aug2013Case study research 14 aug2013
Case study research 14 aug2013Thira Woratanarat
 
Metode Studi Kasus-Teaching Case
Metode Studi Kasus-Teaching CaseMetode Studi Kasus-Teaching Case
Metode Studi Kasus-Teaching CaseAsropi, Dr.
 
Case study power point
Case study power pointCase study power point
Case study power pointatoone
 
Case study/ Literature of a School
Case study/ Literature of a SchoolCase study/ Literature of a School
Case study/ Literature of a SchoolSarthak Kaura
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 

Viewers also liked (9)

BDI 1/13/10 Social Integration Conference - Harvard Business School Case Study
BDI 1/13/10 Social Integration Conference - Harvard Business School Case StudyBDI 1/13/10 Social Integration Conference - Harvard Business School Case Study
BDI 1/13/10 Social Integration Conference - Harvard Business School Case Study
 
Case Study Research Methods
Case Study Research MethodsCase Study Research Methods
Case Study Research Methods
 
Case study research 14 aug2013
Case study research 14 aug2013Case study research 14 aug2013
Case study research 14 aug2013
 
Metode Studi Kasus-Teaching Case
Metode Studi Kasus-Teaching CaseMetode Studi Kasus-Teaching Case
Metode Studi Kasus-Teaching Case
 
Case study power point
Case study power pointCase study power point
Case study power point
 
School Case Study
School Case StudySchool Case Study
School Case Study
 
Case study-research-method
Case study-research-methodCase study-research-method
Case study-research-method
 
Case study/ Literature of a School
Case study/ Literature of a SchoolCase study/ Literature of a School
Case study/ Literature of a School
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 

Similar to Go Pro, Inc. Case Study: Dive into the details of our node.js applications

GoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applicationsGoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applicationsAndrew Maxwell
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Unit Rebooted – Real World Use Cases and Success Stories
Unit Rebooted – Real World Use Cases and Success StoriesUnit Rebooted – Real World Use Cases and Success Stories
Unit Rebooted – Real World Use Cases and Success StoriesNGINX, Inc.
 
Continuous integration for androids
Continuous integration for androidsContinuous integration for androids
Continuous integration for androidsKirill Zotin
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Android development at mercari 2015
Android development at mercari 2015Android development at mercari 2015
Android development at mercari 2015Tomoaki Imai
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachGiovanni Toraldo
 
PhoneGap Day EU 2017: Hybrid Ember Apps
PhoneGap Day EU 2017: Hybrid Ember AppsPhoneGap Day EU 2017: Hybrid Ember Apps
PhoneGap Day EU 2017: Hybrid Ember AppsAlex Blom
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Bruce Pentreath
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitWittawas Wisarnkanchana
 
SFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranSFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranGergely Kis
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development WorkflowVũ Nguyễn
 
High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014Oliver N
 
Building CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxBuilding CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxGurzuInc
 
Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Milindu Sanoj Kumarage
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with CodeceptionJeremy Coates
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentÖzcan Zafer AYAN
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular elementHimanshu Tamrakar
 

Similar to Go Pro, Inc. Case Study: Dive into the details of our node.js applications (20)

GoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applicationsGoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applications
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Unit Rebooted – Real World Use Cases and Success Stories
Unit Rebooted – Real World Use Cases and Success StoriesUnit Rebooted – Real World Use Cases and Success Stories
Unit Rebooted – Real World Use Cases and Success Stories
 
Dockerizing react app
Dockerizing react appDockerizing react app
Dockerizing react app
 
Continuous integration for androids
Continuous integration for androidsContinuous integration for androids
Continuous integration for androids
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Android development at mercari 2015
Android development at mercari 2015Android development at mercari 2015
Android development at mercari 2015
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery Approach
 
PhoneGap Day EU 2017: Hybrid Ember Apps
PhoneGap Day EU 2017: Hybrid Ember AppsPhoneGap Day EU 2017: Hybrid Ember Apps
PhoneGap Day EU 2017: Hybrid Ember Apps
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
 
SFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranSFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with Migeran
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
 
High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014
 
Building CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxBuilding CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptx
 
Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular element
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Recently uploaded (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Go Pro, Inc. Case Study: Dive into the details of our node.js applications

  • 1. Dive into the details of our Node.js applications Level: Intermediate - Advanced
  • 2. All slides are available @ slideshare.net/heka1
  • 3. Andrew Maxwell About Me: ● GoPro, Inc. ● Frontend Software Technical Lead ● 10+ years in the industry ● I manage the Web-App team Contact Info: ● Google+: Andrew Maxwell ● LinkedIn: Andrew Maxwell ● Twitter: @amaxwell02 ● Github: amaxwell01 ● Instagram: amaxwell01 ● andrewcmaxwell.com
  • 5. GoPro: Case Study ● Goals of our applications ● Development setup ● Coding process ● Problems & solutions ● What’s next?
  • 6. Goals for our applications
  • 7. Goals for our applications 1. Follow the Unix philosophy
  • 8. “Do one thing and do it well”
  • 9. 2. All apps are isolated from each other and are only connected through the login application Goals for our applications
  • 10. 3. All Node applications are based off of our web-base framework Goals for our applications
  • 11. 4. All apps must run in docker ● Single docker image for all environments (local, QA, staging and production) ● Every deploy gets its own tagged image with code Goals for our applications
  • 12. 5. All apps MUST be deployed independently ● No app should block one another from being deployed ● Move Fast Goals for our applications
  • 13. 6. Easy roll backs thanks to every deploy getting its own tagged version of a docker image ● Send an update notice to our cluster to roll back to the previous tag ● Removing the impact on our customers Goals for our applications
  • 14. Goals for our applications 7. Follow rolling release train to ship consistently, but only what’s ready
  • 18. ● Start a new project ● Clone from web-base to the name of your new project $git clone [gopro-web-base].git gopro-web-login Development setup
  • 20. Development setup Update our configuration files ● app-config.js ● gopro.json ● package.json ● docker-compose.yml
  • 21. One command to run them all Development setup $MAKE
  • 22. We can get you coding in 10 minutes: $git clone gopro-web-login $cd gopro-web-login $make Development setup
  • 23. ● $make install ○ Mapped to NPM install ● $make build ○ mapped to gulp build ■ runs webpack with node ● $make lint ○ gulp eslint ● $make test ○ Mapped to gulp test ■ runs Jest / Jasmine unit tests ● $make server ○ node babel.server.js ● $make dev ○ runs make install, make build, make watch ● $make ○ make dev All apps run with 7 simple commands: Development setup
  • 24. Build Process with Node and Gulp Development setup &
  • 25. Quality and standards in our builds Development setup
  • 26. Watch files for changes Development setup
  • 28. All components are react components
  • 30. Check docker ● Every time we make a change to our server setup, we make sure that we run our changes locally in docker $docker-compose run Coding process
  • 31. Push the changes up to Github and fires off our build 1. All features get their own branch 2. Circle CI automatically kicks off our build process for the new branch 3. Circle CI creates a tags a new docker image with the built code 4. Each branch can be tested in isolation with a unique sub-domain Coding process
  • 32. Create pull requests 1. Create a new PR for the changes a. Must be a single commit or as little of commits as possible b. Must include the ticket number as the first part of the commit title 2. Circle CI run’s our build process and adds badges to the Github PR 3. Code is reviewed by team 4. Original developer merges their own code and close the PR Coding process
  • 33.
  • 35. Pro’s of isomorphic applications: ● One language (JavaScript) ● Shared components ● Faster rendering time ● Less moving parts ● Easy deployments ● Fast development ● Better S.E.O
  • 36. ● Running similar, but not identical, API requests on the server/client ● Unit tests require some HTML to be tested (blurs the line of unit vs E2E test) ● Some routes set in Hapi, some in React Router ● Debugging API requests can be tricky depending on if it is done on the client, the server, or both ● 2 forms of logging Con’s of isomorphic applications:
  • 38. Memory leak on health checks Node-debugger Sever metric monitoring Problems & Solutions:
  • 39. Problems & Solutions: Debugging API requests on the client / server Set up better logging using Bunyan
  • 40. Problems & Solutions: Lib-sass not staying up to date with Node changes Node.js foundation - All is well again
  • 41. Problems & Solutions: Moving fast and staying up to date with Node versions NVM
  • 42. Problems & Solutions: 30+ second startup times because Babel6 doesn’t play nice with NPM 2 Changed to a new version of Node.js with NPM 3
  • 43. Problems & Solutions: Building multiple apps at once and keeping them in sync Set up Web-base, our internal “desired” collection of frameworks and configuration
  • 44. Problems & Solutions: 100+ feature based deployments a day, leaving around unused docker images on server A bi-hourly cleaner to remove unused docker images
  • 45. What’s next? 1. Continue improving our web-base framework. 2. Improve feature-base branch development to work better with our API’s 3. Create a CLI-tool to help start new projects, add tests, etc. 4. More tests!
  • 48. ● https://gopro.com ● https://www.docker.com ● https://nodejs.org/en ● http://hapijs.com ● http://gulpjs.com ● https://github.com/dlmanning/gulp-sass ● http://eslint.org ● https://babeljs.io ● https://facebook.github.io/react ● https://webpack.github.io ● https://github.com/trentm/node-bunyan Links: