SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
Join www.ServerlessToronto.org
Home of “Less IT Mess”
Manning Publications 2019 giveaways:
1. www.manning.com/books/serverless-applications-with-nodejs
2. www.manning.com/livevideo/production-ready-serverless
3. www.manning.com/livevideo/production-ready-serverless
4. www.manning.com/livevideo/serverless-applications-with-AWS
5. www.manning.com/livevideo/serverless-applications-with-AWS
6. www.manning.com/books/serverless-architectures-on-aws
7. www.manning.com/books/http2-in-action
8. www.manning.com/books/event-streams-in-action
9. www.manning.com/books/the-design-of-everyday-apis
10. www.manning.com/livevideo/graphql-in-motion
11. www.manning.com/books/voice-applications-for-alexa-and-google-assistant
12. www.manning.com/livevideo/machine-learning-for-mere-mortals
2
Tuesday, Jan 29, 2019
1. Introduction
2. Community Open Mic
3. Presentation: Peter Dyer
GraphQL, AWS AppSync
and AWS Serverless
4. Networking
3
Serverless Toronto Meetup Agenda
Community Open Mic
4
10 seconds of freedom
to pitch yourself, or
your company
GraphQL, AWS AppSync
and AWS Serverless
Who am I
Peter
Twenty years working in software
● Majority for small software companies
● Majority as a technical product manager
Currently focused on fullstack development (opinionated about the stack)
Backend-as-a-Service / Serverless
I want interactive software in the hands of users ASAP
I want to take advantage of the code that others have written (services or libraries)
Humans are almost always the most expensive part of development
(At scale, things are different)
My view of Serverless
Authentication
Database
Storage
Hosting
Functions
APIs
Analytics
Machine Learning
Notifications
PubSub
Etc
Intro to GraphQL
What is GraphQL?
“A query language for your API”
Originated in Facebook (2012)
Open-source specification (2015)
“Competitor” to REST
Source: https://graphql.org/
Why GraphQL?
Ask for what you want, and get only that
Get many resources in a single request
Discoverability (documentation) is built in
Avoid API versioning
It’s just the API
Who is using GraphQL
● Netflix
● New York Times
● AirBnB
● Telus
● Etc
Source: https://graphql.org/
vs REST
In common
● HTTP
● JSON
● Just API
● Good tooling
GraphQL Improvements
● No over-fetching
● No under-fetching
● No (limited) need for versioning
● Documentation is built in
Star Wars
REST
https://swapi.co/
GraphQL
https://graphql.github.io/swapi-graphql/
Star Wars - list people (just names)
REST
https://swapi.co/api/
people
Result: 7,447 characters (for page 1, 10 of 87
people)
GraphQL
https://graphql.github.io/swapi-graphql/
query {
allPeople {
people {
name
}
}
}
Result: 4,916 characters
Star Wars - name of Luke’s films
REST
https://swapi.co/api/
people/1
films/1/
films/2/
films/3/
films/6/
films/7/
Result: ~2,500 characters per request (6
requests)
GraphQL
https://graphql.github.io/swapi-graphql/
query {
person(id: "cGVvcGxlOjE=") {
name
filmConnection {
films {
title
}
}
}
}
Result: 492 characters
Star Wars - add shoe_size field to people
REST
Every ‘good’
implementation breaks, or
new API version
Someone needs to update
the documentation
GraphQL
Nothing breaks, anyone
who wants to can start
using the new field
Documentation has been
automatically updated
GraphQL terminology
● Type system
● Schema
● Queries
● Mutations
● Subscriptions
● Resolver
● Client & Server
The GraphQL challenge
● Bad queries
○ Depth problems
○ Too much data
AWS AppSync
AWS AppSync
Amazon’s GraphQL service
https://aws.amazon.com/appsync/
“AWS AppSync is a serverless back-end for mobile, web and enterprise
applications”
Architecture
Source: https://docs.aws.amazon.com/appsync/latest/devguide/system-overview-and-architecture.html
How it works
Resolvers "translate" GraphQL to do something with a "Data Source"
Data Sources = DynamoDB, Lambda, ElasticSearch, Aurora, HTTP
Translation via VTL (Apache Velocity Template Language)
AWS AppSync Walk-through
Steps
1. Create Lambda function(s) that will “resolve” API request
a. Use Events to pass in arguments
2. Create AppSync API
3. Add Lambda function(s) as Data Sources to AppSync API
4. Create API schema (GraphQL schema)
5. Attach Resolvers and edit mappings
6. Test API
7. Use API
AWS AppSync and the AWS landscape
Where does AppSync fit in AWS Serverless
Short answer
Nowhere (it is not part of the documented reference architecture)
The real answer
Wherever you see API Gateway
Wherever an application needs to call an AWS back-end for something
AppSync is an API Proxy that leverages GraphQL instead of REST
Amazon API Gateway
Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html
Examples (from AWS Serverless)
Source: https://aws.amazon.com/serverless/
Wrap up
AWS AppSync (hosted GraphQL) Alternatives
AWS is the only big 3 cloud vendor with a GraphQL service
GraphQL servers are easily deployed to a server or a PaaS
Google Firebase - deploy as a Function (performance?)
Prisma Cloud
For development (these are not managed services)
● https://codesandbox.io/s/apollo-server
● https://glitch.com/~apollo-launchpad
AWS Amplify Framework
Evolution of AWS Mobile Hub
Amazon's answer to Google Firebase
Goal - make it easy for application (front-end) developers to use (consume) back-
end resources
“The foundation for your cloud-powered mobile & web apps”
Resources
https://graphql.org
https://www.graphqlweekly.com/
https://www.howtographql.com/
https://www.meetup.com/GraphQL-Toronto/
https://github.com/aws-samples (for developers)
Thank you!
@peter_dyer
fullsapps.com

Mais conteúdo relacionado

Mais de Daniel Zivkovic

What's new in Serverless at AWS?
What's new in Serverless at AWS?What's new in Serverless at AWS?
What's new in Serverless at AWS?Daniel Zivkovic
 
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML EngineersIntro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML EngineersDaniel Zivkovic
 
Empowering Developers to be Healthcare Heroes
Empowering Developers to be Healthcare HeroesEmpowering Developers to be Healthcare Heroes
Empowering Developers to be Healthcare HeroesDaniel Zivkovic
 
Get started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google CloudGet started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google CloudDaniel Zivkovic
 
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...Daniel Zivkovic
 
Smart Cities of Italy: Integrating the Cyber World with the IoT
Smart Cities of Italy: Integrating the Cyber World with the IoTSmart Cities of Italy: Integrating the Cyber World with the IoT
Smart Cities of Italy: Integrating the Cyber World with the IoTDaniel Zivkovic
 
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...Daniel Zivkovic
 
This is my Architecture to prevent Cloud Bill Shock
This is my Architecture to prevent Cloud Bill ShockThis is my Architecture to prevent Cloud Bill Shock
This is my Architecture to prevent Cloud Bill ShockDaniel Zivkovic
 
Lunch & Learn BigQuery & Firebase from other Google Cloud customers
Lunch & Learn BigQuery & Firebase from other Google Cloud customersLunch & Learn BigQuery & Firebase from other Google Cloud customers
Lunch & Learn BigQuery & Firebase from other Google Cloud customersDaniel Zivkovic
 
Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Daniel Zivkovic
 
Serverless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoServerless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoDaniel Zivkovic
 
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPSimpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPDaniel Zivkovic
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapDaniel Zivkovic
 
SRE Topics with Charity Majors and Liz Fong-Jones of Honeycomb
SRE Topics with Charity Majors and Liz Fong-Jones of HoneycombSRE Topics with Charity Majors and Liz Fong-Jones of Honeycomb
SRE Topics with Charity Majors and Liz Fong-Jones of HoneycombDaniel Zivkovic
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDaniel Zivkovic
 
What’s the big deal with Graph Databases?
What’s the big deal with Graph Databases?What’s the big deal with Graph Databases?
What’s the big deal with Graph Databases?Daniel Zivkovic
 
How to augment On-premise Call Centers to Scale-out to the Cloud
How to augment On-premise Call Centers to Scale-out to the CloudHow to augment On-premise Call Centers to Scale-out to the Cloud
How to augment On-premise Call Centers to Scale-out to the CloudDaniel Zivkovic
 
Intro to PySpark: Python Data Analysis at scale in the Cloud
Intro to PySpark: Python Data Analysis at scale in the CloudIntro to PySpark: Python Data Analysis at scale in the Cloud
Intro to PySpark: Python Data Analysis at scale in the CloudDaniel Zivkovic
 
Google Associate Cloud Engineer Certification Tips
Google Associate Cloud Engineer Certification TipsGoogle Associate Cloud Engineer Certification Tips
Google Associate Cloud Engineer Certification TipsDaniel Zivkovic
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoDaniel Zivkovic
 

Mais de Daniel Zivkovic (20)

What's new in Serverless at AWS?
What's new in Serverless at AWS?What's new in Serverless at AWS?
What's new in Serverless at AWS?
 
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML EngineersIntro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
 
Empowering Developers to be Healthcare Heroes
Empowering Developers to be Healthcare HeroesEmpowering Developers to be Healthcare Heroes
Empowering Developers to be Healthcare Heroes
 
Get started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google CloudGet started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google Cloud
 
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...
Building a Data Cloud to enable Analytics & AI-Driven Innovation - Lak Lakshm...
 
Smart Cities of Italy: Integrating the Cyber World with the IoT
Smart Cities of Italy: Integrating the Cyber World with the IoTSmart Cities of Italy: Integrating the Cyber World with the IoT
Smart Cities of Italy: Integrating the Cyber World with the IoT
 
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...
Running Business Analytics for a Serverless Insurance Company - Joe Emison & ...
 
This is my Architecture to prevent Cloud Bill Shock
This is my Architecture to prevent Cloud Bill ShockThis is my Architecture to prevent Cloud Bill Shock
This is my Architecture to prevent Cloud Bill Shock
 
Lunch & Learn BigQuery & Firebase from other Google Cloud customers
Lunch & Learn BigQuery & Firebase from other Google Cloud customersLunch & Learn BigQuery & Firebase from other Google Cloud customers
Lunch & Learn BigQuery & Firebase from other Google Cloud customers
 
Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?Azure for AWS & GCP Pros: Which Azure services to use?
Azure for AWS & GCP Pros: Which Azure services to use?
 
Serverless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoServerless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless Toronto
 
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPSimpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 
SRE Topics with Charity Majors and Liz Fong-Jones of Honeycomb
SRE Topics with Charity Majors and Liz Fong-Jones of HoneycombSRE Topics with Charity Majors and Liz Fong-Jones of Honeycomb
SRE Topics with Charity Majors and Liz Fong-Jones of Honeycomb
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step Functions
 
What’s the big deal with Graph Databases?
What’s the big deal with Graph Databases?What’s the big deal with Graph Databases?
What’s the big deal with Graph Databases?
 
How to augment On-premise Call Centers to Scale-out to the Cloud
How to augment On-premise Call Centers to Scale-out to the CloudHow to augment On-premise Call Centers to Scale-out to the Cloud
How to augment On-premise Call Centers to Scale-out to the Cloud
 
Intro to PySpark: Python Data Analysis at scale in the Cloud
Intro to PySpark: Python Data Analysis at scale in the CloudIntro to PySpark: Python Data Analysis at scale in the Cloud
Intro to PySpark: Python Data Analysis at scale in the Cloud
 
Google Associate Cloud Engineer Certification Tips
Google Associate Cloud Engineer Certification TipsGoogle Associate Cloud Engineer Certification Tips
Google Associate Cloud Engineer Certification Tips
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in Toronto
 

Último

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Último (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

GraphQL and AWS AppSync (Serverless GraphQL service)

  • 2. Manning Publications 2019 giveaways: 1. www.manning.com/books/serverless-applications-with-nodejs 2. www.manning.com/livevideo/production-ready-serverless 3. www.manning.com/livevideo/production-ready-serverless 4. www.manning.com/livevideo/serverless-applications-with-AWS 5. www.manning.com/livevideo/serverless-applications-with-AWS 6. www.manning.com/books/serverless-architectures-on-aws 7. www.manning.com/books/http2-in-action 8. www.manning.com/books/event-streams-in-action 9. www.manning.com/books/the-design-of-everyday-apis 10. www.manning.com/livevideo/graphql-in-motion 11. www.manning.com/books/voice-applications-for-alexa-and-google-assistant 12. www.manning.com/livevideo/machine-learning-for-mere-mortals 2
  • 3. Tuesday, Jan 29, 2019 1. Introduction 2. Community Open Mic 3. Presentation: Peter Dyer GraphQL, AWS AppSync and AWS Serverless 4. Networking 3 Serverless Toronto Meetup Agenda
  • 4. Community Open Mic 4 10 seconds of freedom to pitch yourself, or your company
  • 5. GraphQL, AWS AppSync and AWS Serverless
  • 6. Who am I Peter Twenty years working in software ● Majority for small software companies ● Majority as a technical product manager Currently focused on fullstack development (opinionated about the stack)
  • 7. Backend-as-a-Service / Serverless I want interactive software in the hands of users ASAP I want to take advantage of the code that others have written (services or libraries) Humans are almost always the most expensive part of development (At scale, things are different)
  • 8. My view of Serverless Authentication Database Storage Hosting Functions APIs Analytics Machine Learning Notifications PubSub Etc
  • 10. What is GraphQL? “A query language for your API” Originated in Facebook (2012) Open-source specification (2015) “Competitor” to REST Source: https://graphql.org/
  • 11. Why GraphQL? Ask for what you want, and get only that Get many resources in a single request Discoverability (documentation) is built in Avoid API versioning It’s just the API
  • 12. Who is using GraphQL ● Netflix ● New York Times ● AirBnB ● Telus ● Etc Source: https://graphql.org/
  • 13. vs REST In common ● HTTP ● JSON ● Just API ● Good tooling GraphQL Improvements ● No over-fetching ● No under-fetching ● No (limited) need for versioning ● Documentation is built in
  • 15. Star Wars - list people (just names) REST https://swapi.co/api/ people Result: 7,447 characters (for page 1, 10 of 87 people) GraphQL https://graphql.github.io/swapi-graphql/ query { allPeople { people { name } } } Result: 4,916 characters
  • 16. Star Wars - name of Luke’s films REST https://swapi.co/api/ people/1 films/1/ films/2/ films/3/ films/6/ films/7/ Result: ~2,500 characters per request (6 requests) GraphQL https://graphql.github.io/swapi-graphql/ query { person(id: "cGVvcGxlOjE=") { name filmConnection { films { title } } } } Result: 492 characters
  • 17. Star Wars - add shoe_size field to people REST Every ‘good’ implementation breaks, or new API version Someone needs to update the documentation GraphQL Nothing breaks, anyone who wants to can start using the new field Documentation has been automatically updated
  • 18. GraphQL terminology ● Type system ● Schema ● Queries ● Mutations ● Subscriptions ● Resolver ● Client & Server
  • 19. The GraphQL challenge ● Bad queries ○ Depth problems ○ Too much data
  • 21. AWS AppSync Amazon’s GraphQL service https://aws.amazon.com/appsync/ “AWS AppSync is a serverless back-end for mobile, web and enterprise applications”
  • 23. How it works Resolvers "translate" GraphQL to do something with a "Data Source" Data Sources = DynamoDB, Lambda, ElasticSearch, Aurora, HTTP Translation via VTL (Apache Velocity Template Language)
  • 25. Steps 1. Create Lambda function(s) that will “resolve” API request a. Use Events to pass in arguments 2. Create AppSync API 3. Add Lambda function(s) as Data Sources to AppSync API 4. Create API schema (GraphQL schema) 5. Attach Resolvers and edit mappings 6. Test API 7. Use API
  • 26. AWS AppSync and the AWS landscape
  • 27. Where does AppSync fit in AWS Serverless Short answer Nowhere (it is not part of the documented reference architecture) The real answer Wherever you see API Gateway Wherever an application needs to call an AWS back-end for something AppSync is an API Proxy that leverages GraphQL instead of REST
  • 28. Amazon API Gateway Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html
  • 29. Examples (from AWS Serverless) Source: https://aws.amazon.com/serverless/
  • 31. AWS AppSync (hosted GraphQL) Alternatives AWS is the only big 3 cloud vendor with a GraphQL service GraphQL servers are easily deployed to a server or a PaaS Google Firebase - deploy as a Function (performance?) Prisma Cloud For development (these are not managed services) ● https://codesandbox.io/s/apollo-server ● https://glitch.com/~apollo-launchpad
  • 32. AWS Amplify Framework Evolution of AWS Mobile Hub Amazon's answer to Google Firebase Goal - make it easy for application (front-end) developers to use (consume) back- end resources “The foundation for your cloud-powered mobile & web apps”