SlideShare a Scribd company logo
BRINGING THE
JAMSTACK TO
THE ENTERPRISE
JAMUND FERGUSON
➡ Been at PayPal for 5.5yrs
➡ Brought in during Java to Node transition
➡ Currently leading consumer web platform team
➡ Focused on improving developer experience
➡ Do a lot of training and talking about JavaScript

internally and externally
Bringing the JAMstack to the Enterprise
LACK OF STABILITY INCREDIBLY SLOW DEPLOY TIMES CLIENT-SIDE PERF
Bringing the JAMstack to the Enterprise
WE HAVE A LOT OF SERVERS
AND DATA CENTERS
AND AVAILABILITY ZONES
AND STABILITY CHECKS
DEPLOYS CAN TAKE HOURS
DEPLOYS CAN TAKE HOURS
DEPLOYS CAN TAKE HOURS
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
WHAT IF DOING THE RIGHT
THING IS TOO HARD?
WE NEED TO RE-THINK
THE ARCHITECTURE
GOLANG MACHINE LEARNINGCLOUD FUNCTIONS
TECHNOLOGY ENVY
UI
Application

Servers
Java JavaJava C++
Backend

Services
Node.jsJSX REST API
ReactHTML CSS CDN
Bringing the JAMstack to the Enterprise
UI
Application

Servers
Java JavaJava C++
Backend

Services
Node.jsJSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
Node.jsJSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
Node.jsJSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
JSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
JSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
JSX REST API
ReactHTML CSS CDN
UI
Application

Servers
Java JavaJava C++
Backend

Services
JSX REST API
ReactHTML CSS CDN
GRAPHQL
UI
Application

Servers
Java JavaJava C++
Backend

Services
JSX
ReactHTML CSS CDN
GRAPHQL
PROXY
SHARED GRAPHQL
Frontend

Services
ReactHTMLCSS
Backend

Services
CDN
C++Java JavaJava
HELLO JAMSTACK,
MY OLD FRIEND
Bringing the JAMstack to the Enterprise
JAVASCRIPT
MARKUP
JAMSTACK APIs
Bringing the JAMstack to the Enterprise
APPLICATION
SERVER
DB
SERVICE
JAMSTACK
JS
HTMLHTML
JSHTML
JS
HTML
JS
HTML
HTML
JS
JS
HTML
JS
HTML
JS
HTML
JS
HTML
JS
JAMSTACK
THEIR DEVICEGEOGRAPHICAL NEAR (CDN)
CLOUD
KEEP CONTENT CLOSER TO
THE CUSTOMER
FEW MOVING PARTS
NO DATABASE NO APP SERVER NO PROGRAMMING

LANGUAGE
GREAT TOOLING & DX
DEPLOY IN SECONDS REACT & GATSBY SINGLE STACK
JAMSTACK IS
GREAT FOR
STATIC SITES
YOU CAN ALSO
MAKE FULLY
INTERACTIVE
WEB APPS


STATIC APPS ARE FULLY
INTERACTIVE WEB APPS,
POWERED BY STATIC
ASSETS* * and some APIs too
LOAD THE DYNAMIC BITS
LOAD THE STATIC PART <300MS
CDN /
EDGE
BROWSER
300ms
TTFB IS SUPER FAST. MOST OF
PAGE READY TO GO RIGHT AWAY!
300ms 30ms 400ms500ms
CDN /
EDGE
LOAD

BALANCER
GRAPHQLBROWSER
SERVICES
OR
DATABASE
~1000MS
WAITING TIME IS LOWER THAN
SSR BECAUSE I’M ONLY DOING
API PROCESSING
CDN /
EDGE
LOAD

BALANCER
NODE.JSNGINXBROWSER
SERVICES
OR
DATABASE
SERVER-SIDE RENDERED JAVASCRIPT
300ms 30ms 800ms10ms 1000ms
2140MS
PRE-RENDERED HTML AT THE CDN 300MS
CDN /
EDGE
BROWSER
300ms
PPME: PARTIALLY SERVER-RENDERED VERSION
3 SECONDS OF WHITE SCREEN
1000MS OF JS & IMAGES
TOTAL LOAD TIME (THROTTLED): ~4000MS
PPME: STATIC APP VERSION
INITIAL PAGE LOAD
IS UNDER 1S
1500MS PARSING JS &
WAITING ON CONTENT
500MS RECEIVE CONTENT
TOTAL LOAD TIME (THROTTLED): ~3000MS
ENTERPRISE JAMSTACK
WHEN BUILDING STATIC APPS
‣ Think files not routes
‣ Pre-render as much as possible (how frequently?)
‣ Load additional content with APIs
‣ Cache / optimize aggressively
PayPal.me Settings Page
- How much of this page can be static?
- Load it up with an API
- Optimize using SessionStorage

by pre-loading the users basic

settings at log-in
TO



300MS +

200MS =



500MS
FROM



300MS +

1200MS = 



1500MS
2
3
4
/PAYPALME/SETTINGS SETTINGS.HTML1
My PayPal.me Profile
PAYPAL.ME/JAMUND JAMUND.HTML
PAYPAL.ME/* PROFILE.HTML
1
2 How much we we pre-render?
Make an API call for more data3
Optimizations:
• Cache user info / API request
• We can also load things like
the URL directly from memory
• <img src=“/images/:slug” />
4
EVEN IN WORST CASE
SCENARIOS, WHERE MOST
OF THE PAGE IS DYNAMIC,
STATIC APPS ARE FAST
BRINGING IT TO THE
ENTERPRISE
ADOPTION AND BUY-IN
Hold Workshops / Build Hype
WE DECIDED
TO BUILD A
PROTOTYPE
VERSION OF
PAYPAL.ME
BUILD OUT
TOOLING SO
THAT ANY TEAM
COULD MAKE A
STATIC APP
A TOOL TO
GENERATE OUR
STATIC ASSETS
A PLACE TO
HOST THEM
Bringing the JAMstack to the Enterprise
https://www.gatsbyjs.org
> gatsby new qcon2019
info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.g
Cloning into 'qcon2019'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 1077 (delta 0), reused 2 (delta 0), pack-reused 1072
Receiving objects: 100% (1077/1077), 1.93 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (610/610), done.
success Created starter directory layout
info Installing packages...
✔ cwebp pre-build test passed successfully
✔ mozjpeg pre-build test passed successfully
✔ pngquant pre-build test passed successfully
added 1884 packages from 1136 contributors in 53.286s
> gatsby develop
success open and validate gatsby-configs — 0.006 s
success load plugins — 0.144 s
success onPreInit — 0.797 s
success delete html and css files from previous builds — 0.004 s
success initialize cache — 0.006 s
success copy gatsby files — 0.074 s
success onPreBootstrap — 0.005 s
success source and transform nodes — 0.047 s
success building schema — 0.262 s
success update schema — 0.100 s

Generating image thumbnails [==============================] 6/6 0.2 secs 100%
info bootstrap finished - 7.107 s


DONE Compiled successfully in 3592ms 

You can now view qcon2019 in the browser.
http://localhost:8000/
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
Pages Folder
src/pages/qcon.js
GATSBY IS MAGIC
{ PORTING AN EXISTING
REACT SITE TO GATSBY
ISN’T VERY HARD }
Bringing the JAMstack to the Enterprise
> gatsby build
success open and validate gatsby-configs — 0.063 s
success load plugins — 0.130 s
success onPreInit — 0.741 s
success onPreBootstrap — 0.004 s
success source and transform nodes — 0.035 s
success building schema — 0.211 s
success createPages — 0.000 s
success update schema — 0.096 s
success extract queries from components — 0.096 s
success run graphql queries — 0.046 s — 8/8 177.64 queries/second
success write out page data — 0.003 s
success write out redirect data — 0.001 s
success onPostBootstrap — 0.284 s
info bootstrap finished - 4.976 s
success Building production JavaScript and CSS bundles — 8.634 s
success Building static HTML for pages — 0.604 s — 5/5 22.57 pages/second
info Done building in 14.22 sec
> ls public
index.html
404.html

0-9bd0c85834a3a93b1f79.js
app-04084b8a557f707b6868.js
pages-manifest-e4b2639aaf09a35adca0.js
component---src-pages-404-js-d2285ef859a157145c5f.js
component---src-pages-index-js-fb8583164602255204fc.js
component---src-pages-page-2-js-32e895d1268581b61c23.js
component—src-pages-qcon-js-7f23b1bc9d18fc3f2d1e.js
component---src-pages-404-js.fc0360e935268c0b4b8c.css
component---src-pages-index-js.fc0360e935268c0b4b8c.css
component---src-pages-page-2-js.fc0360e935268c0b4b8c.css
component---src-pages-qcon-js.fc0360e935268c0b4b8c.css
chunk-map.json
manifest.webmanifest
page-2/
icons/
404/
Bringing the JAMstack to the Enterprise
LET’S BUILD THE JAMSTACK DX
INSIDE OUR OWN PRIVATE CLOUD
Bringing the JAMstack to the Enterprise
{
"hosting": {
"redirects": [{
"source": "/beta",
"destination": "/",
"type": 301
}],
"rewrites": [{
"source": "/profiles/*",
"destination": "/profiles.html"
}],
"headers": [{
"source": “**/*.js”,
"headers": [{
"key": “Access-Control-Allow-Origin“,
"value": “*"
}]
}]
}
EASILY APPLY
CORS HEADERS
REDIRECTS FOR
OUTDATED URLS
REWRITES FOR
WILDCARD URLS
GRAPHQL
Java JavaJava ASF
CDN GatsbyHTMLCSS
Backend

Services
Frontend

Services
STATIC APP SERVER
GRAPHQL
Java JavaJava ASF
Frontend

Services
GatsbyHTMLCSS
Backend

Services
Application

Servers
PRODUCTION STAGING
EACH APP SERVER CONTAINS ITS OWN ASSETS
▸ Developer can completely ignore app server
▸ “1-minute deploy” to production
▸ Infra team on the hook now if anything stops working
▸ Add static app capabilities to our current build & deploy pipeline
▸ Allow app devs to mostly focus on UI server piece
▸ “1-minute deploy” to staging
PHASE 1: STATIC APP SUPPORT
PHASE 2: STATIC APPS AS A SERVICE
STATIC APPS ADOPTION PLAN
STATIC
APP
SERVICE
APP MAPPINGS 

CLOUD STORAGE
ALL TEAMS SHARE A
SINGLE SERVICE TO
SERVE THEIR APPS
/paypalme
/summary
/home
STATIC
APP
SERVICE
APP MAPPINGS 

CLOUD STORAGE
1. Generates Files 2. Push them to Cloud
3. Update Mappings
ROLLBACK
/paypalme
/summary
/home
RETRACING OUR STEPS
WHEN DOING THE RIGHT
THING IS POSSIBLE, BUT
NOT EASY, CONSIDER
CHANGING YOUR
ARCHITECTURE
JAMSTACK PROVIDES A
STABLE & PERFORMANT
ARCHITECTURE BY
DEFAULT
INSTEAD OF SIMPLE

STATIC SITES WE ARE
CHOOSING TO TO BUILD
FULLY INTERACTIVE

STATIC APPS
THESE APPS ARE VERY
STABLE AND VERY FAST
AND THE DEVELOPER
EXPERIENCE IS AWESOME
EVEN AFTER HAVING TO
BUILD A LOT OF OUR OWN
INFRASTRUCTURE WE
THINK ITS GOING TO BE
WORTH THE INVESTMENT
OUR DEVELOPERS ARE
GOING TO LOVE IT

AND WE THINK

YOU WILL TOO
JAMSTACK
IS GOING TO
BE HUGE
THANK YOU

More Related Content

PPTX
How webpage loading takes place?
PPTX
Measuring web performance
PPTX
WordPress Performance 101
PDF
WebPagetest Power Users - Velocity 2014
PPTX
How to Install Magento on Google Cloud Engine (GCE)
PDF
Pagespeed what, why, and how it works
PPTX
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
PDF
Workflow para desenvolvimento Web & Mobile usando grunt.js
How webpage loading takes place?
Measuring web performance
WordPress Performance 101
WebPagetest Power Users - Velocity 2014
How to Install Magento on Google Cloud Engine (GCE)
Pagespeed what, why, and how it works
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Workflow para desenvolvimento Web & Mobile usando grunt.js

What's hot (20)

PPTX
Front-End Single Point of Failure - Velocity 2016 Training
PDF
Magento 2 performance - a benchmark
PPT
Velocity EU 2012 - Third party scripts and you
PPT
Service Workers for Performance
PDF
Profilling client performance
PPT
Client Side Performance @ Xero
KEY
Video.js - How to build and HTML5 Video Player
PDF
Velocity 2014 nyc WebPagetest private instances
PPTX
Speed up Your Joomla Site for Ultimate Performance
PDF
Meta Refresh 2014
PDF
Making the web faster
PDF
Use Xdebug to profile PHP
PDF
DrupalCon Barcelona 2015
PDF
Metarefresh
PDF
implement lighthouse-ci with your web development workflow
PDF
20 tips for website performance
PDF
How to Speed Up Your Joomla! Site
PDF
Search in WordPress - how it works and howto customize it
PPTX
Browser Wars Episode 1: The Phantom Menace
PDF
Odoo - Open Source CMS: A performance comparision
Front-End Single Point of Failure - Velocity 2016 Training
Magento 2 performance - a benchmark
Velocity EU 2012 - Third party scripts and you
Service Workers for Performance
Profilling client performance
Client Side Performance @ Xero
Video.js - How to build and HTML5 Video Player
Velocity 2014 nyc WebPagetest private instances
Speed up Your Joomla Site for Ultimate Performance
Meta Refresh 2014
Making the web faster
Use Xdebug to profile PHP
DrupalCon Barcelona 2015
Metarefresh
implement lighthouse-ci with your web development workflow
20 tips for website performance
How to Speed Up Your Joomla! Site
Search in WordPress - how it works and howto customize it
Browser Wars Episode 1: The Phantom Menace
Odoo - Open Source CMS: A performance comparision
Ad

Similar to Bringing the JAMstack to the Enterprise (20)

PDF
Bringing JAMStack to the Enterprise
PPTX
Node.js Web Apps @ ebay scale
PDF
Progressive web apps
PDF
The Hitchhiker's Guide to Building a Progressive Web App
PDF
A year with progressive web apps! #DevConMU
PDF
Progressive Web Apps are here!
PDF
20181023 progressive web_apps_are_here_sfcampua
PDF
Lessons Learned from Using Next.js in Production
PDF
Performance and Scalability Art of Isomorphic React Applications
PPTX
The PRPL Pattern
PPTX
Building assets on the fly with Node.js
PDF
devoxx pwa presentation
PDF
East bay full stack developers meetup August 2019
PDF
Pump up the JAM with Gatsby
PDF
Creating a full stack web app with python, npm, webpack and react
PPTX
Mobile gotcha
PDF
Service workers are your best friends
PDF
Pwa, separating the features from the solutions
PDF
A year with progressive web apps! #webinale
PDF
The Art and Science of Shipping Ember Apps
Bringing JAMStack to the Enterprise
Node.js Web Apps @ ebay scale
Progressive web apps
The Hitchhiker's Guide to Building a Progressive Web App
A year with progressive web apps! #DevConMU
Progressive Web Apps are here!
20181023 progressive web_apps_are_here_sfcampua
Lessons Learned from Using Next.js in Production
Performance and Scalability Art of Isomorphic React Applications
The PRPL Pattern
Building assets on the fly with Node.js
devoxx pwa presentation
East bay full stack developers meetup August 2019
Pump up the JAM with Gatsby
Creating a full stack web app with python, npm, webpack and react
Mobile gotcha
Service workers are your best friends
Pwa, separating the features from the solutions
A year with progressive web apps! #webinale
The Art and Science of Shipping Ember Apps
Ad

Recently uploaded (20)

PPT
Project quality management in manufacturing
PPTX
Sustainable Sites - Green Building Construction
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
Construction Project Organization Group 2.pptx
PDF
PPT on Performance Review to get promotions
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
web development for engineering and engineering
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Welding lecture in detail for understanding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
Project quality management in manufacturing
Sustainable Sites - Green Building Construction
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
Construction Project Organization Group 2.pptx
PPT on Performance Review to get promotions
CH1 Production IntroductoryConcepts.pptx
Internet of Things (IOT) - A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Mechanical Engineering MATERIALS Selection
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
UNIT 4 Total Quality Management .pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
web development for engineering and engineering
CYBER-CRIMES AND SECURITY A guide to understanding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Welding lecture in detail for understanding
Foundation to blockchain - A guide to Blockchain Tech

Bringing the JAMstack to the Enterprise