SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. or its Affiliates.© 2019, Amazon Web Services, Inc. or its Affiliates.
Rich Alberth, AWS
Engaging apps with
GraphQL and
AWS AppSync
September 13, 2019
© 2019, Amazon Web Services, Inc. or its Affiliates.
What makes a
website engaging?
© 2019, Amazon Web Services, Inc. or its Affiliates.
Curated, accurate content
presented cleanly.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Curated, accurate content
presented cleanly.
No! That’s clearly important, but not
what makes a website engaging.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Chat
Responsive
Update automatically
Push notifications
Think of a favorite website that is
engaging, like your email web client.
Things happen automatically, data is
updated as it happens, and there are
“app-like” fetures built-in.
© 2019, Amazon Web Services, Inc. or its Affiliates.
website
Maybe we should stop thinking about
them as “websites”. This limits us to
thinking about pages that refresh when
you click buttons.
© 2019, Amazon Web Services, Inc. or its Affiliates.
webapp
How about thinking about them as web
apps: applications running in a browser.
© 2019, Amazon Web Services, Inc. or its Affiliates.
app
Better yet: just call them apps.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Apache Spring (IoC)
Hibernate (ORM)  manage your data in objects
Connection pool (backoff-retry)
Cache (memcached)
API to call you / you call other APIs
If I asked you to build a back-end,
distributed, highly-available, network-
tolerant service, what practices would
you bring out?
© 2019, Amazon Web Services, Inc. or its Affiliates.
$("#report").load("/reports/26?id=89");
<a href="/reports">Reports</a>
await fetch("/reports/26")
We’re hamstrung if we only use
rudimentary technology like links, HTML
fragment fetching, and basicAjax tools.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Need back-end thinking
for front-end coding
© 2019, Amazon Web Services, Inc. or its Affiliates.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Game Board:
My laptop
© 2019, Amazon Web Services, Inc. or its Affiliates.
Emcee:
Kindle Fire
© 2019, Amazon Web Services, Inc. or its Affiliates.
Player:
cell phone
© 2019, Amazon Web Services, Inc. or its Affiliates.
What’d you think?
Did you think of this as a webapp or just
an application? Did you see things
update automatically? Was it engaging?
© 2019, Amazon Web Services, Inc. or its Affiliates.
How’d I do it?
I’ll tell you what I DIDN’T do: didn’t build
a server (there isn't any), didn’t write
boring plumbing (undifferentiated
heavy-lifting). This is an AWS serverless
application service.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Cloud
AWS AppSync Amazon
DynamoDB
Amazon Simple
Storage Service (S3)
Client devices
© 2019, Amazon Web Services, Inc. or its Affiliates.
/ invoices
products
customers
POST
GET
{custId}
GET
{custId}
GET
PUT
POST
GET
{prodId}
Remember
REST?
REST is a way to model your business
data in a common way lots of developers
can relate to. Let’s use this model for
learning about GraphQL andAppSync.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS AppSync
With GraphQL, you model your business data and
relationships in a graph. AWS AppSync houses the
GraphQL model. You attach data sources to points in the
graph. Querying the graph means AppSync uses your
attached data sources to fulfill the query.
© 2019, Amazon Web Services, Inc. or its Affiliates.
type Game {
title: String!
categories: [Category!]
}
type Category {
categoryName: String!
questions: [Question!]
}
type Question {
points: Int!
question: String!
answer: String!
}
game
category
category
question
question
question
question
question
question
GraphQL
Actual GraphQL snippet from the Quiz
Show demo. This is how nodes and
edges in the graph are written in
GraphQL.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
category ?
Client browser requests part of the graph
by callingAWS AppSync.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
category ?
AppSync queries the data sources you
configured to fulfill the query.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
category ?
C
Q
Q
Q
AppSync returns a portion of the graph
you wanted. It’s kept in the browser so
subsequent calls can reference it.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
C
Q
Q
Q
question !
AppSync can also notify a browser when
something on the server changes, so the
browser can stay up-to-date.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
C
Q
Q
Q
question !
Server updates are aware of locally-
cached objects from AppSync. The
server “push” updates the already-
cached version so everything stays in
sync.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
Amazon DynamoDB
table
AWS AppSync
React
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
C
Q
Q
Q
Future queries might be satisfied
completely with locally-stored objects.
No need to talk to AppSync.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify
AWS AppSync
React
AWS Amplify
React
AWS Amplify
React
topic
topic
With AppSync ”PubSub” feature, many
browsers can coordinate work by
sending and receiving messages on a
commonTopic.
© 2019, Amazon Web Services, Inc. or its Affiliates.
AWS AppSync
AWS Amplify
React
AWS Amplify
React
AWS Amplify
React
?
?
?
G
C
C
Q
Q
Q
Q
Q
Q
P
P
P
When the server is unavailable (maybe
network problem?), AppSync continues
to try to send updates until it succeeds.
© 2019, Amazon Web Services, Inc. or its Affiliates.
Strange Network Behavior
Queries
• Read-thru cache
• Read from local cache
Mutations
• Offline mutation
• “Optimistic”
• Conflict resolution
“Delta Query”
• Initial query
• Subscribe to changes
• “Catch-up” re-query
© 2019, Amazon Web Services, Inc. or its Affiliates.
• Query for game questions
• Subscribe to question state
(“open”, “closed”, …)
• PubSub for “Buzz” presses
© 2019, Amazon Web Services, Inc. or its Affiliates.
• Query for game questions
• Mutates question state
• Mutates Contestant score
• Subscribe to “Buzz” presses
© 2019, Amazon Web Services, Inc. or its Affiliates.
• Creates Contestant records
• Query for game
• Subscribe to question updates
• Sends notification when press
“Buzz” button
© 2019, Amazon Web Services, Inc. or its Affiliates.© 2019, Amazon Web Services, Inc. or its Affiliates.
Thank you!
Rich Alberth

More Related Content

What's hot

Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS SummitDriving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
Amazon Web Services
 
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
Amazon Web Services
 
AWS Canberra User Group - September 2019 Intro
AWS Canberra User Group - September 2019 IntroAWS Canberra User Group - September 2019 Intro
AWS Canberra User Group - September 2019 Intro
Brian Farnhill
 
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWSWebinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
Amazon Web Services LATAM
 
Amazon and Region Build Engineering
Amazon and Region Build EngineeringAmazon and Region Build Engineering
Amazon and Region Build Engineering
Rich Alberth
 
AWS Startup Day Santiago - Tools For Building Your Startup
AWS Startup Day Santiago - Tools For Building Your StartupAWS Startup Day Santiago - Tools For Building Your Startup
AWS Startup Day Santiago - Tools For Building Your Startup
Amazon Web Services LATAM
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
Amazon Web Services
 
Customer Keynote: V Air - V Air Cloudified
Customer Keynote: V Air - V Air CloudifiedCustomer Keynote: V Air - V Air Cloudified
Customer Keynote: V Air - V Air Cloudified
Amazon Web Services
 
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
Amazon Web Services
 
Monetize Your Mobile App with Amazon Mobile Ads
Monetize Your Mobile App with Amazon Mobile AdsMonetize Your Mobile App with Amazon Mobile Ads
Monetize Your Mobile App with Amazon Mobile Ads
Amazon Web Services
 
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
Amazon Web Services
 
Aws
AwsAws
State of Mobile and Modern App Development on AWS
State of Mobile and Modern App Development on AWSState of Mobile and Modern App Development on AWS
State of Mobile and Modern App Development on AWS
Amazon Web Services
 
Rock Solid CloudOps with Operational Excellence in 90 Days
Rock Solid CloudOps with Operational Excellence in 90 DaysRock Solid CloudOps with Operational Excellence in 90 Days
Rock Solid CloudOps with Operational Excellence in 90 Days
Amazon Web Services
 
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
Amazon Web Services
 
Nikhil Dabhade - Introduction to AWS Device Farm.pdf
Nikhil Dabhade - Introduction to AWS Device Farm.pdfNikhil Dabhade - Introduction to AWS Device Farm.pdf
Nikhil Dabhade - Introduction to AWS Device Farm.pdf
Amazon Web Services
 
AWS Startup Day Santiago - Taram: Fundraising Essentials
AWS Startup Day Santiago - Taram: Fundraising EssentialsAWS Startup Day Santiago - Taram: Fundraising Essentials
AWS Startup Day Santiago - Taram: Fundraising Essentials
Amazon Web Services LATAM
 
IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018
Boaz Ziniman
 
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
Developers Summit
 

What's hot (19)

Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS SummitDriving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
Driving OEE with AWS IoT SiteWise - SVC204 - Atlanta AWS Summit
 
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
 
AWS Canberra User Group - September 2019 Intro
AWS Canberra User Group - September 2019 IntroAWS Canberra User Group - September 2019 Intro
AWS Canberra User Group - September 2019 Intro
 
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWSWebinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
Webinar AWS: Ciclo de vida e análise de dados na Nuvem AWS
 
Amazon and Region Build Engineering
Amazon and Region Build EngineeringAmazon and Region Build Engineering
Amazon and Region Build Engineering
 
AWS Startup Day Santiago - Tools For Building Your Startup
AWS Startup Day Santiago - Tools For Building Your StartupAWS Startup Day Santiago - Tools For Building Your Startup
AWS Startup Day Santiago - Tools For Building Your Startup
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Customer Keynote: V Air - V Air Cloudified
Customer Keynote: V Air - V Air CloudifiedCustomer Keynote: V Air - V Air Cloudified
Customer Keynote: V Air - V Air Cloudified
 
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
 
Monetize Your Mobile App with Amazon Mobile Ads
Monetize Your Mobile App with Amazon Mobile AdsMonetize Your Mobile App with Amazon Mobile Ads
Monetize Your Mobile App with Amazon Mobile Ads
 
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
[NEW LAUNCH!] Building a Highly Available Service Using Ubiquity (ARC341) - A...
 
Aws
AwsAws
Aws
 
State of Mobile and Modern App Development on AWS
State of Mobile and Modern App Development on AWSState of Mobile and Modern App Development on AWS
State of Mobile and Modern App Development on AWS
 
Rock Solid CloudOps with Operational Excellence in 90 Days
Rock Solid CloudOps with Operational Excellence in 90 DaysRock Solid CloudOps with Operational Excellence in 90 Days
Rock Solid CloudOps with Operational Excellence in 90 Days
 
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
Use AWS RoboMaker to Develop a Robot Application to Track and Find Fido (ROB2...
 
Nikhil Dabhade - Introduction to AWS Device Farm.pdf
Nikhil Dabhade - Introduction to AWS Device Farm.pdfNikhil Dabhade - Introduction to AWS Device Farm.pdf
Nikhil Dabhade - Introduction to AWS Device Farm.pdf
 
AWS Startup Day Santiago - Taram: Fundraising Essentials
AWS Startup Day Santiago - Taram: Fundraising EssentialsAWS Startup Day Santiago - Taram: Fundraising Essentials
AWS Startup Day Santiago - Taram: Fundraising Essentials
 
IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018
 
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
【14-C-8】みんなの暮らしを支えるAmazon S3の裏側、お伝えします
 

Similar to AWS App Sync (DC Startup Week 2019)

Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"
Fwdays
 
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti..."Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
Provectus
 
GraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS LambdaGraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS Lambda
Aleksandr Maklakov
 
Simplify front end apps.pdf
Simplify front end apps.pdfSimplify front end apps.pdf
Simplify front end apps.pdf
Amazon Web Services
 
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Amazon Web Services
 
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
Darko Mesaroš
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
James Beswick
 
Simplify front end apps.pdf
Simplify front end apps.pdfSimplify front end apps.pdf
Simplify front end apps.pdf
Amazon Web Services
 
How to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdfHow to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdf
Amazon Web Services
 
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless BackendsAWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
Patrick Sard
 
Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.
James Beswick
 
Building Modern APIs with GraphQL
Building Modern APIs with GraphQLBuilding Modern APIs with GraphQL
Building Modern APIs with GraphQL
Amazon Web Services
 
Nader Dabit - Intro to AWS AppSync.pdf
Nader Dabit - Intro to AWS AppSync.pdfNader Dabit - Intro to AWS AppSync.pdf
Nader Dabit - Intro to AWS AppSync.pdf
Amazon Web Services
 
Building your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSyncBuilding your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSync
Amazon Web Services
 
Building your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSyncBuilding your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSync
Amazon Web Services
 
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
Amazon Web Services
 
Introduzione a GraphQL
Introduzione a GraphQLIntroduzione a GraphQL
Introduzione a GraphQL
Commit University
 
Cloud Backend for Real-time Applications
Cloud Backend for Real-time ApplicationsCloud Backend for Real-time Applications
Cloud Backend for Real-time Applications
Amazon Web Services
 
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amazon Web Services
 
Serverless Observability Tech Talk
Serverless Observability Tech TalkServerless Observability Tech Talk
Serverless Observability Tech Talk
Amazon Web Services
 

Similar to AWS App Sync (DC Startup Week 2019) (20)

Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"
 
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti..."Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
 
GraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS LambdaGraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS Lambda
 
Simplify front end apps.pdf
Simplify front end apps.pdfSimplify front end apps.pdf
Simplify front end apps.pdf
 
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
 
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
 
Simplify front end apps.pdf
Simplify front end apps.pdfSimplify front end apps.pdf
Simplify front end apps.pdf
 
How to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdfHow to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdf
 
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless BackendsAWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
 
Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.
 
Building Modern APIs with GraphQL
Building Modern APIs with GraphQLBuilding Modern APIs with GraphQL
Building Modern APIs with GraphQL
 
Nader Dabit - Intro to AWS AppSync.pdf
Nader Dabit - Intro to AWS AppSync.pdfNader Dabit - Intro to AWS AppSync.pdf
Nader Dabit - Intro to AWS AppSync.pdf
 
Building your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSyncBuilding your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSync
 
Building your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSyncBuilding your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSync
 
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
 
Introduzione a GraphQL
Introduzione a GraphQLIntroduzione a GraphQL
Introduzione a GraphQL
 
Cloud Backend for Real-time Applications
Cloud Backend for Real-time ApplicationsCloud Backend for Real-time Applications
Cloud Backend for Real-time Applications
 
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
 
Serverless Observability Tech Talk
Serverless Observability Tech TalkServerless Observability Tech Talk
Serverless Observability Tech Talk
 

Recently uploaded

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 

Recently uploaded (20)

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 

AWS App Sync (DC Startup Week 2019)

  • 1. © 2019, Amazon Web Services, Inc. or its Affiliates.© 2019, Amazon Web Services, Inc. or its Affiliates. Rich Alberth, AWS Engaging apps with GraphQL and AWS AppSync September 13, 2019
  • 2. © 2019, Amazon Web Services, Inc. or its Affiliates. What makes a website engaging?
  • 3. © 2019, Amazon Web Services, Inc. or its Affiliates. Curated, accurate content presented cleanly.
  • 4. © 2019, Amazon Web Services, Inc. or its Affiliates. Curated, accurate content presented cleanly. No! That’s clearly important, but not what makes a website engaging.
  • 5. © 2019, Amazon Web Services, Inc. or its Affiliates. Chat Responsive Update automatically Push notifications Think of a favorite website that is engaging, like your email web client. Things happen automatically, data is updated as it happens, and there are “app-like” fetures built-in.
  • 6. © 2019, Amazon Web Services, Inc. or its Affiliates. website Maybe we should stop thinking about them as “websites”. This limits us to thinking about pages that refresh when you click buttons.
  • 7. © 2019, Amazon Web Services, Inc. or its Affiliates. webapp How about thinking about them as web apps: applications running in a browser.
  • 8. © 2019, Amazon Web Services, Inc. or its Affiliates. app Better yet: just call them apps.
  • 9. © 2019, Amazon Web Services, Inc. or its Affiliates. Apache Spring (IoC) Hibernate (ORM)  manage your data in objects Connection pool (backoff-retry) Cache (memcached) API to call you / you call other APIs If I asked you to build a back-end, distributed, highly-available, network- tolerant service, what practices would you bring out?
  • 10. © 2019, Amazon Web Services, Inc. or its Affiliates. $("#report").load("/reports/26?id=89"); <a href="/reports">Reports</a> await fetch("/reports/26") We’re hamstrung if we only use rudimentary technology like links, HTML fragment fetching, and basicAjax tools.
  • 11. © 2019, Amazon Web Services, Inc. or its Affiliates. Need back-end thinking for front-end coding
  • 12. © 2019, Amazon Web Services, Inc. or its Affiliates.
  • 13. © 2019, Amazon Web Services, Inc. or its Affiliates. Game Board: My laptop
  • 14. © 2019, Amazon Web Services, Inc. or its Affiliates. Emcee: Kindle Fire
  • 15. © 2019, Amazon Web Services, Inc. or its Affiliates. Player: cell phone
  • 16. © 2019, Amazon Web Services, Inc. or its Affiliates. What’d you think? Did you think of this as a webapp or just an application? Did you see things update automatically? Was it engaging?
  • 17. © 2019, Amazon Web Services, Inc. or its Affiliates. How’d I do it? I’ll tell you what I DIDN’T do: didn’t build a server (there isn't any), didn’t write boring plumbing (undifferentiated heavy-lifting). This is an AWS serverless application service.
  • 18. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Cloud AWS AppSync Amazon DynamoDB Amazon Simple Storage Service (S3) Client devices
  • 19. © 2019, Amazon Web Services, Inc. or its Affiliates. / invoices products customers POST GET {custId} GET {custId} GET PUT POST GET {prodId} Remember REST? REST is a way to model your business data in a common way lots of developers can relate to. Let’s use this model for learning about GraphQL andAppSync.
  • 20. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS AppSync With GraphQL, you model your business data and relationships in a graph. AWS AppSync houses the GraphQL model. You attach data sources to points in the graph. Querying the graph means AppSync uses your attached data sources to fulfill the query.
  • 21. © 2019, Amazon Web Services, Inc. or its Affiliates. type Game { title: String! categories: [Category!] } type Category { categoryName: String! questions: [Question!] } type Question { points: Int! question: String! answer: String! } game category category question question question question question question GraphQL Actual GraphQL snippet from the Quiz Show demo. This is how nodes and edges in the graph are written in GraphQL.
  • 22. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P category ? Client browser requests part of the graph by callingAWS AppSync.
  • 23. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P category ? AppSync queries the data sources you configured to fulfill the query.
  • 24. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P category ? C Q Q Q AppSync returns a portion of the graph you wanted. It’s kept in the browser so subsequent calls can reference it.
  • 25. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P C Q Q Q question ! AppSync can also notify a browser when something on the server changes, so the browser can stay up-to-date.
  • 26. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P C Q Q Q question ! Server updates are aware of locally- cached objects from AppSync. The server “push” updates the already- cached version so everything stays in sync.
  • 27. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify Amazon DynamoDB table AWS AppSync React G C C Q Q Q Q Q Q P P P C Q Q Q Future queries might be satisfied completely with locally-stored objects. No need to talk to AppSync.
  • 28. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS Amplify AWS AppSync React AWS Amplify React AWS Amplify React topic topic With AppSync ”PubSub” feature, many browsers can coordinate work by sending and receiving messages on a commonTopic.
  • 29. © 2019, Amazon Web Services, Inc. or its Affiliates. AWS AppSync AWS Amplify React AWS Amplify React AWS Amplify React ? ? ? G C C Q Q Q Q Q Q P P P When the server is unavailable (maybe network problem?), AppSync continues to try to send updates until it succeeds.
  • 30. © 2019, Amazon Web Services, Inc. or its Affiliates. Strange Network Behavior Queries • Read-thru cache • Read from local cache Mutations • Offline mutation • “Optimistic” • Conflict resolution “Delta Query” • Initial query • Subscribe to changes • “Catch-up” re-query
  • 31. © 2019, Amazon Web Services, Inc. or its Affiliates. • Query for game questions • Subscribe to question state (“open”, “closed”, …) • PubSub for “Buzz” presses
  • 32. © 2019, Amazon Web Services, Inc. or its Affiliates. • Query for game questions • Mutates question state • Mutates Contestant score • Subscribe to “Buzz” presses
  • 33. © 2019, Amazon Web Services, Inc. or its Affiliates. • Creates Contestant records • Query for game • Subscribe to question updates • Sends notification when press “Buzz” button
  • 34. © 2019, Amazon Web Services, Inc. or its Affiliates.© 2019, Amazon Web Services, Inc. or its Affiliates. Thank you! Rich Alberth

Editor's Notes

  1. https://www.the-qrcode-generator.com/ Check personal appearance Kindle charged? Kindle Silk browser running, everything else stopped Clear desktop icons to temp folder Quit Outlook, etc. Mute speaker Run-thru QuizShow Game, including Kindle Reset QuizShow database with single game
  2. Should feel like an application, not static page.
  3. Let’s get our heads in the right place. Google Mail (suite), Microsoft web mail, Quip, Chime web app, Amazon WorkDocs Feels like an app
  4. If I asked you to build a distributed app in Java, what tools & practices would you bring out?
  5. If I asked you to build a website?
  6. How keep data in sync? If can’t reach the server? AWS AppSync: Cache Manage objects Server push
  7. Ready to play?
  8. Not using this, it reacts solely to push notifications
  9. I “drive” the game from here, updates the servers.
  10. Reacts to what my kindle does. Pushing “Buzz” game board updates.
  11. Was this //application// engaging? Was this an //application// or a //website//? Responsive (low latency) Engaging (sense of community)
  12. I’ll tell you what I DIDN’T do: build a server (there isn't any) boring plumbing (undifferentiated heavy-lifting) Where do you think I spent most of the development time? React
  13. Idea: model your business resources No real relationship to databases “Map” from REST to multiple back-ends! *click*
  14. Like REST, model your data as a graph Multi- backends
  15. This is GraphQL, the language of AppSync. GraphQL is big now: model disparate data sources
  16. Offline mutation: queues the request in the browser Sends when back online