SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
Serverless === Painless ?
Creating a Serverless GraphQL endpoint in 60 minutes or less
Who am I?
Assaf Gannon
Full Stack Developer since 2000
Work @ Tikal
assaf@tikalk.com
https://github.com/assafg/graphql-shopping-cart
What is Serverless?
BL
BL
BL
DB
Auth
PubSub
Queue
Cache
Logs
API
Storage
What is Serverless?
Small pieces of Business Logic deployed independently
Using Services for non-Business Logic stuff:
Persistance (DB / Cache / Static)
Messaging
Authentication / Authorisation
Logging / Monitoring
What are the Pros
Seamless horizontal scaling
Fast and cheap ramp up
Pay as you go
High-end tech widely available
What’s the catch?
Vendor lock-in
Different development paradigms
On-premise solutions can be difficult to set up and
maintain (see ‘Vendor Lock-in’)
Popular Vendors
AWS
GCP
Azure
Kubless
Our Project: GraphQL Endpoint for
a Shopping-Cart
Using AWS
Some Architecture
GraphQL Mutate
DynamoDB
GraphQL Query
GraphQL
Query language for APIs
Typed
Access multiple resources in single query
Query only what you need
Play: https://launchpad.graphql.com/new
DynamoDB
NoSQL DB Service by AWS
Fast, Flexible & Scalable
Document & key-value support
Lambda
AWS Functions Service
Deploy your code as a function
Highly scalable
Multiple languages supported
Auth0
Commercial Authentication service
Easy to integrate
Supports most SSO providers
serverless.com
A toolkit for developing & deploying server less
architecture
Supports: AWS, Google Cloud Platform, Azure,
OpenWhisk
Apollo
A set of frameworks to make GraphQL more accessible
Apollo Server
Apollo Client
Apollo Engine
https://www.apollographql.com
“Audentes fortuna juvat”
–Virgil
Ingredients
2 Lambda functions
DynamoDB store
Auth0 authentication
Getting started:
1. Install serverless CLI 

(https://serverless.com/framework/docs/getting-started/)
2. Make sure AWS credentials are in place
3. Choose you language (Javascript, Java, Python, Go, C#
are supported)
4. Create a new Service via ‘serverless create`
Now what?!
1. Deploy your empty service
2. Add your functions and resources to serverless.yml
3. Start implementing your functions
1.Deploy your empty service
2. Add your functions and resources to serverless.yml
3. Start implementing your functions
> sls deploy:
Success…
“… and yada yada yada, I'm really tired today”
–Marcy, George’s girlfriend
The GraphQL implementation
Adding a DB
Let’s make this interesting…
Enter Event Sourcing
Osiris https://github.com/assafg/osiris
Add DynamoDB resources
x 2
Mutations Query
Adding Auth0
Serverless and GraphQL
Serverless and GraphQL
Serverless and GraphQL
Serverless and GraphQL

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Intro to the Google Cloud for Developers
Intro to the Google Cloud for DevelopersIntro to the Google Cloud for Developers
Intro to the Google Cloud for Developers
 
Ohio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCPOhio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCP
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
Azure functions
Azure functionsAzure functions
Azure functions
 
The Journey To Serverless At Home24 - reflections and insights
The Journey To Serverless At Home24 - reflections and insights The Journey To Serverless At Home24 - reflections and insights
The Journey To Serverless At Home24 - reflections and insights
 
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless StartupSam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
 
Tracing Java Applications on Azure
Tracing Java Applications on AzureTracing Java Applications on Azure
Tracing Java Applications on Azure
 
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
 
From AIX to Zero-ops by Pierre Baillet
From AIX to Zero-ops by Pierre BailletFrom AIX to Zero-ops by Pierre Baillet
From AIX to Zero-ops by Pierre Baillet
 
DevFest Forged in Firebase
DevFest Forged in FirebaseDevFest Forged in Firebase
DevFest Forged in Firebase
 
Serverless Architecture GCP In Production
Serverless Architecture GCP In ProductionServerless Architecture GCP In Production
Serverless Architecture GCP In Production
 
Industrial Light & Magic
Industrial Light & MagicIndustrial Light & Magic
Industrial Light & Magic
 
Total cloud immersion
Total cloud immersionTotal cloud immersion
Total cloud immersion
 
Serverless in-action
Serverless in-actionServerless in-action
Serverless in-action
 
Infrastructure as code (iac) - Terraform for AWS
Infrastructure as code (iac) - Terraform for AWSInfrastructure as code (iac) - Terraform for AWS
Infrastructure as code (iac) - Terraform for AWS
 
Trying out the Go language with Google App Engine
Trying out the Go language with Google App EngineTrying out the Go language with Google App Engine
Trying out the Go language with Google App Engine
 
Fury road to a worldwide API - API Days - December 2015
Fury road to a worldwide API - API Days - December 2015Fury road to a worldwide API - API Days - December 2015
Fury road to a worldwide API - API Days - December 2015
 
Our journey to aws - Maylin Leal
Our journey to aws - Maylin LealOur journey to aws - Maylin Leal
Our journey to aws - Maylin Leal
 
CloudDesignPatterns
CloudDesignPatternsCloudDesignPatterns
CloudDesignPatterns
 
Infrastructure as Code (IaC): Introduction to scripted infrastructure
Infrastructure as Code (IaC): Introduction to scripted infrastructureInfrastructure as Code (IaC): Introduction to scripted infrastructure
Infrastructure as Code (IaC): Introduction to scripted infrastructure
 

Similar a Serverless and GraphQL

AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 

Similar a Serverless and GraphQL (20)

Your API on Steroids
Your API on Steroids Your API on Steroids
Your API on Steroids
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortener
 
Whizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS ServerlessWhizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS Serverless
 
Google cloud platform
Google cloud platform   Google cloud platform
Google cloud platform
 
Hybrid integrationwithsap (Glenn Colpaert @ Integration Monday)
Hybrid integrationwithsap (Glenn Colpaert @ Integration Monday)Hybrid integrationwithsap (Glenn Colpaert @ Integration Monday)
Hybrid integrationwithsap (Glenn Colpaert @ Integration Monday)
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
Build DynamoDB-Compatible Apps with Python
Build DynamoDB-Compatible Apps with PythonBuild DynamoDB-Compatible Apps with Python
Build DynamoDB-Compatible Apps with Python
 
Serverless Meetup - 12 gennaio 2017
Serverless Meetup - 12 gennaio 2017Serverless Meetup - 12 gennaio 2017
Serverless Meetup - 12 gennaio 2017
 
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
 
Beyond Relational
Beyond RelationalBeyond Relational
Beyond Relational
 
Services Over Servers - Innovate VA 2016
Services Over Servers - Innovate VA 2016Services Over Servers - Innovate VA 2016
Services Over Servers - Innovate VA 2016
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
Serverless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture ConferenceServerless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture Conference
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
 
GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0
 

Más de Assaf Gannon

From server generated pages to client app in a micro-services world
From server generated pages to client app in a micro-services worldFrom server generated pages to client app in a micro-services world
From server generated pages to client app in a micro-services world
Assaf Gannon
 

Más de Assaf Gannon (9)

React hooks
React hooksReact hooks
React hooks
 
Micro frontends
Micro frontendsMicro frontends
Micro frontends
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 
Reactive Architecture
Reactive ArchitectureReactive Architecture
Reactive Architecture
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
 
Fullstack workshop
Fullstack workshopFullstack workshop
Fullstack workshop
 
TabTale Architecture Overview
TabTale Architecture OverviewTabTale Architecture Overview
TabTale Architecture Overview
 
From server generated pages to client app in a micro-services world
From server generated pages to client app in a micro-services worldFrom server generated pages to client app in a micro-services world
From server generated pages to client app in a micro-services world
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Último (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

Serverless and GraphQL