SlideShare una empresa de Scribd logo
Introduction to serverless
computing on Google Cloud
Wesley Chun
Developer Advocate, Google
Contribute
questions at:
goo.gl/Rq6ABI
G Suite Dev Show
goo.gl/JpBQ40
About the speaker
Developer Advocate, Google Cloud
● Mission: enable current and future
developers everywhere to be
successful using Google Cloud and
other Google developer tools & APIs
● Videos: host of the G Suite Dev Show
on YouTube
● Blogs: developers.googleblog.com &
gsuite-developers.googleblog.com
● Twitters: @wescpy, @GoogleDevs,
@GSuiteDevs
Previous experience / background
● Software engineer & architect for 20+ years
● One of the original Yahoo!Mail engineers
● Author of bestselling "Core Python" books
(corepython.com)
● Technical trainer, teacher, instructor since
1983 (Computer Science, C, Linux, Python)
● Fellow of the Python Software Foundation
● AB (Math/CS) & CMP (Music/Piano), UC
Berkeley and MSCS, UC Santa Barbara
● Adjunct Computer Science Faculty, Foothill
College (Silicon Valley)
Serverless: what & why
● What is serverless?
○ Misnomer: of course there's a server somewhere
○ You just don't have to worry about it!
○ Forbes (May 2018): Serverless... [helps] developers focus on writing code without having to
worry about infrastructure... servers (physical & virtual) completely abstracted away from the
user. [Developers] ... focused on solving business problems (e.g., faster app deployment)
● Why serverless?
○ Fastest growing segment of cloud... per 2 analysts*:
■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021) and $14.93B (2023)
○ Unless focused on DevOps... VMs, networking, load balancing, web servers,
database servers, frontends/proxies, etc. less relevant for app-builders
○ What if you go viral? Autoscaling: your new best friend
○ What if you don't? Code not running? You're not paying. (No VMs to shutdown.)
* in USD; source: MarketsandMarkets™ & CB Insights (Aug 2018)
Google Compute Engine, Google Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
G Suite (Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google BigQuery, Cloud SQL,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL Database
Serverless: PaaS-y compute/processing
Google Apps Script, App Maker
Salesforce1/force.com
Google App Engine
App-hosting in the cloud
Why does App Engine exist?
App Engine to the rescue!!
●Easy to build
●Easy to manage
●Easy to scale
● Enables greater developer productivity!
● Focus on building your app, not sys admin
● Let us wear the pagers!
● BUT don't confuse App Engine w/IaaS services!
Not all apps user-facing or web-based!!
● Need backend server processing? Want to build your own?
● No UI needed for app to talk to App Engine, just need HTTP
● Great place for user info e.g., high scores, contacts, levels/badges, etc.
● Better UI: move user data off phone & make universally available
Hello World (3 files)
app.yaml
runtime: python37
main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'
requirements.txt
Flask==1.0.2
App hosting plus a domain name!
$ gcloud app deploy
browser URL:
https://APP_ID.appspot.com
Ex: https://wescpy-apitest.appspot.com
How to deploy and where to run it
$ gcloud app deploy
● Browser
● cURL
● Mobile apps (backend, no UI needed!)
● etc.
browser URL:
https://APP_ID.appspot.com
Ex: https://wescpy-apitest.appspot.com
Languages supported
Languages
● Python 2.7 & 3.6
● Node.js
● Ruby
● Java 8 / Servlet 3.1
● Jetty 9
● PHP 5.6, 7
● Go 1.8, 1.9, 1.10
● C#/.NET
● custom
Open Capabilities
Flexible Runtime
Languages
● Python 2.7, 3.7
● Java 7, 8
● PHP 5.5, 7.2
● Go 1.6, 1.8, 1.11
● Node.js 8
"Constrained" Capabilities
Incredibly rapid scale
Bold == 2nd generation
Standard Runtime
Google Cloud Functions
Function-hosting in the cloud
"Hello World" Python Cloud Function
main.py
def hello_world(request):
return 'Hello World!'
$ gcloud functions deploy hello --runtime python37 --trigger-http
curl:
curl -X POST https://[GCP_REGION]-[PROJECT_ID].cloudfunctions.net/hello 
-H "Content-Type:application/json" --data '{"value": "123"}'
browser:
http://[GCP_REGION]-[PROJECT_ID].cloudfunctions.net/hello?value=123
Ex: https://us-central1-myproject-ccsc.cloudfunctions.net/hello
Google Cloud Functions
Languages Supported
● Node.js 6, 8 (JavaScript)
● Python 3.7
Deploying Cloud Functions
● Create locally then deploy on cmd-line OR
● Edit and deploy from developer web console
Triggering Cloud Functions (response to events)
● HTTP — via HTTP request
● Cloud Storage — bucket object/metadata CRUD
● Cloud Pub/Sub — new message
● Firebase (DB, Storage, Analytics, Auth)
Test tool
Google Apps Script (and App Maker)
Customized JS runtime for G Suite automation, extension, and integration
Sheets-bound “Hello World!”
Apps Script intro
goo.gl/1sXeuD
Sheets-bound “Hello World!”
What can you do with this?
Accessing maps from
spreadsheets?!?
goo.gl/oAzBN9
This… with help from Google Maps & Gmail
function sendMap() {
var sheet = SpreadsheetApp.getActiveSheet();
var address = sheet.getRange("A2").getValue();
var map = Maps.newStaticMap().addMarker(address);
MailApp.sendEmail(EMAIL, "Map", map.getMapUrl());
}
JS
Session Summary
● Why go cloud?
○ Cloud computing has taken the world by storm
○ You're behind if you're not already using it… it's not too late!
○ Help train the next generation cloud-ready workforce!
● Google Cloud and why serverless?
○ Many features: compute, storage, AI/ML, NW, data processing, etc.
○ Serverless lets users focus on just their logic (apps or functions)
○ Interesting possibilities using both platforms (GCP + G Suite)
References
● G Suite and Google Apps Script documentation
○ developers.google.com/gsuite
○ developers.google.com/apps-script
● GCP docs source code (i.e., App Engine & Cloud Functions quickstarts)
○ github.com/GoogleCloudPlatform/python-docs-samples
○ github.com/GoogleCloudPlatform/nodejs-docs-samples
● Inspirational demo apps' resources
○ cloud.withgoogle.com/next18/sf/sessions/session/156878
■ cloud.google.com/blog/products/application-development/
adding-custom-intelligence-to-gmail-with-serverless-on-gcp
■ bit.ly/2OcptaG
○ NEXT '19: cloud.withgoogle.com/next/sf/sessions?session=DEV212
Learning resources
● Codelabs: self-paced hands-on tutorials
○ Google codelabs: need a Gmail account, always free
■ g.co/codelabs/cloud
○ Qwiklabs codelabs: don't need a Gmail acct; typically not free
■ google.qwiklabs.com
■ Individuals can request 200 more credits; 5000 credits for use in courses
● Official GCP docs: cloud.google.com
○ Recommended: Getting Started, Cloud Console, Cloud Shell, Cloud SDK, GCP
Free Tier (need a credit card), Community
● YouTube video series: youtube.com/GoogleCloud
○ Recommended: Cloud Minute shorts & Cloud NEXT videos
○ G Suite Dev Show: goo.gl/JpBQ40
Resources for Higher Education
● Education grant program
○ Teaching grants (per-course basis)
■ $50USD for students
■ $100USD for faculty & TAs
■ You'll barely use any of it… key: no need to give Google a credit card
○ Research grants
■ Larger amounts, granted for longer period of time
○ Turnaround time: 3-4 business days
● Teacher center
○ teachercenter.withgoogle.com/gcp
○ Apply here for education grants
○ Apply here for Qwiklabs credits
Thank you! Questions?
Wesley Chun
@wescpy

Más contenido relacionado

La actualidad más candente

Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
wesley chun
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)
wesley chun
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloud
wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
wesley chun
 
Code driven development in drupal
Code driven development in drupalCode driven development in drupal
Code driven development in drupal
Andriy Yun
 
Drupal contributor HOWTO
Drupal contributor HOWTODrupal contributor HOWTO
Drupal contributor HOWTO
Andriy Yun
 
Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)
wesley chun
 
Google App Engine Overview and Update
Google App Engine Overview and UpdateGoogle App Engine Overview and Update
Google App Engine Overview and Update
Chris Schalk
 
JHipster Code 2020 keynote
JHipster Code 2020 keynoteJHipster Code 2020 keynote
JHipster Code 2020 keynote
Julien Dubois
 
World is changed. i feel it in the front end
World is changed. i feel it in the front endWorld is changed. i feel it in the front end
World is changed. i feel it in the front end
Andriy Yun
 
Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the Cloud
Chris Schalk
 
How to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudHow to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the Cloud
Chris Schalk
 
Drupal core indeas - Andy Postnikov
Drupal core indeas  - Andy PostnikovDrupal core indeas  - Andy Postnikov
Drupal core indeas - Andy Postnikov
DrupalCamp Kyiv
 
Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIs
wesley chun
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
rtCamp
 
Google App Engine Developer - Day1
Google App Engine Developer - Day1Google App Engine Developer - Day1
Google App Engine Developer - Day1
Simon Su
 
Rapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for JavaRapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for Java
Kunal Dabir
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud Technologies
Chris Schalk
 
JHipster overview
JHipster overviewJHipster overview
JHipster overview
Julien Dubois
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud Technologies
Chris Schalk
 

La actualidad más candente (20)

Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloud
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Code driven development in drupal
Code driven development in drupalCode driven development in drupal
Code driven development in drupal
 
Drupal contributor HOWTO
Drupal contributor HOWTODrupal contributor HOWTO
Drupal contributor HOWTO
 
Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)
 
Google App Engine Overview and Update
Google App Engine Overview and UpdateGoogle App Engine Overview and Update
Google App Engine Overview and Update
 
JHipster Code 2020 keynote
JHipster Code 2020 keynoteJHipster Code 2020 keynote
JHipster Code 2020 keynote
 
World is changed. i feel it in the front end
World is changed. i feel it in the front endWorld is changed. i feel it in the front end
World is changed. i feel it in the front end
 
Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the Cloud
 
How to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudHow to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the Cloud
 
Drupal core indeas - Andy Postnikov
Drupal core indeas  - Andy PostnikovDrupal core indeas  - Andy Postnikov
Drupal core indeas - Andy Postnikov
 
Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIs
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
 
Google App Engine Developer - Day1
Google App Engine Developer - Day1Google App Engine Developer - Day1
Google App Engine Developer - Day1
 
Rapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for JavaRapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for Java
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud Technologies
 
JHipster overview
JHipster overviewJHipster overview
JHipster overview
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud Technologies
 

Similar a Introduction to serverless computing on Google Cloud

Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to present
wesley chun
 
G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshop
wesley chun
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overview
wesley chun
 
How Google Cloud Platform can help in the classroom/lab
How Google Cloud Platform can help in the classroom/labHow Google Cloud Platform can help in the classroom/lab
How Google Cloud Platform can help in the classroom/lab
wesley chun
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
wesley chun
 
Cloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google CloudCloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google Cloud
wesley chun
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
wesley chun
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
wesley chun
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
Ido Green
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScript
wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloud
wesley chun
 
Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)
wesley chun
 
Intro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google CloudIntro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google Cloud
wesley chun
 
Build with all of Google Cloud
Build with all of Google CloudBuild with all of Google Cloud
Build with all of Google Cloud
wesley chun
 
Cloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google CloudCloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google Cloud
wesley chun
 
Google Developers Overview Deck 2015
Google Developers Overview Deck 2015Google Developers Overview Deck 2015
Google Developers Overview Deck 2015
Houssem Eddine LASSOUED
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SAP PartnerEdge program for Application Development
 

Similar a Introduction to serverless computing on Google Cloud (20)

Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to present
 
G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshop
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overview
 
How Google Cloud Platform can help in the classroom/lab
How Google Cloud Platform can help in the classroom/labHow Google Cloud Platform can help in the classroom/lab
How Google Cloud Platform can help in the classroom/lab
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
Cloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google CloudCloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google Cloud
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScript
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloud
 
Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)
 
Intro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google CloudIntro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google Cloud
 
Build with all of Google Cloud
Build with all of Google CloudBuild with all of Google Cloud
Build with all of Google Cloud
 
Cloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google CloudCloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google Cloud
 
Google Developers Overview Deck 2015
Google Developers Overview Deck 2015Google Developers Overview Deck 2015
Google Developers Overview Deck 2015
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
 

Más de wesley chun

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)
wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)
wesley chun
 
Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
wesley chun
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
wesley chun
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
wesley chun
 
Easy path to machine learning (2022)
Easy path to machine learning (2022)Easy path to machine learning (2022)
Easy path to machine learning (2022)
wesley chun
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
wesley chun
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)
wesley chun
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
wesley chun
 

Más de wesley chun (11)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)
 
Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)
 
Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 
Easy path to machine learning (2022)
Easy path to machine learning (2022)Easy path to machine learning (2022)
Easy path to machine learning (2022)
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
 

Último

Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
ramrag33
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 

Último (20)

Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 

Introduction to serverless computing on Google Cloud

  • 1. Introduction to serverless computing on Google Cloud Wesley Chun Developer Advocate, Google Contribute questions at: goo.gl/Rq6ABI G Suite Dev Show goo.gl/JpBQ40 About the speaker Developer Advocate, Google Cloud ● Mission: enable current and future developers everywhere to be successful using Google Cloud and other Google developer tools & APIs ● Videos: host of the G Suite Dev Show on YouTube ● Blogs: developers.googleblog.com & gsuite-developers.googleblog.com ● Twitters: @wescpy, @GoogleDevs, @GSuiteDevs Previous experience / background ● Software engineer & architect for 20+ years ● One of the original Yahoo!Mail engineers ● Author of bestselling "Core Python" books (corepython.com) ● Technical trainer, teacher, instructor since 1983 (Computer Science, C, Linux, Python) ● Fellow of the Python Software Foundation ● AB (Math/CS) & CMP (Music/Piano), UC Berkeley and MSCS, UC Santa Barbara ● Adjunct Computer Science Faculty, Foothill College (Silicon Valley)
  • 2. Serverless: what & why ● What is serverless? ○ Misnomer: of course there's a server somewhere ○ You just don't have to worry about it! ○ Forbes (May 2018): Serverless... [helps] developers focus on writing code without having to worry about infrastructure... servers (physical & virtual) completely abstracted away from the user. [Developers] ... focused on solving business problems (e.g., faster app deployment) ● Why serverless? ○ Fastest growing segment of cloud... per 2 analysts*: ■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021) and $14.93B (2023) ○ Unless focused on DevOps... VMs, networking, load balancing, web servers, database servers, frontends/proxies, etc. less relevant for app-builders ○ What if you go viral? Autoscaling: your new best friend ○ What if you don't? Code not running? You're not paying. (No VMs to shutdown.) * in USD; source: MarketsandMarkets™ & CB Insights (Aug 2018) Google Compute Engine, Google Cloud Storage AWS EC2 & S3; Rackspace; Joyent SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service G Suite (Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda Google BigQuery, Cloud SQL, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL Database Serverless: PaaS-y compute/processing Google Apps Script, App Maker Salesforce1/force.com
  • 3. Google App Engine App-hosting in the cloud Why does App Engine exist?
  • 4. App Engine to the rescue!! ●Easy to build ●Easy to manage ●Easy to scale ● Enables greater developer productivity! ● Focus on building your app, not sys admin ● Let us wear the pagers! ● BUT don't confuse App Engine w/IaaS services! Not all apps user-facing or web-based!! ● Need backend server processing? Want to build your own? ● No UI needed for app to talk to App Engine, just need HTTP ● Great place for user info e.g., high scores, contacts, levels/badges, etc. ● Better UI: move user data off phone & make universally available
  • 5. Hello World (3 files) app.yaml runtime: python37 main.py from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World!' requirements.txt Flask==1.0.2 App hosting plus a domain name! $ gcloud app deploy browser URL: https://APP_ID.appspot.com Ex: https://wescpy-apitest.appspot.com How to deploy and where to run it $ gcloud app deploy ● Browser ● cURL ● Mobile apps (backend, no UI needed!) ● etc. browser URL: https://APP_ID.appspot.com Ex: https://wescpy-apitest.appspot.com
  • 6. Languages supported Languages ● Python 2.7 & 3.6 ● Node.js ● Ruby ● Java 8 / Servlet 3.1 ● Jetty 9 ● PHP 5.6, 7 ● Go 1.8, 1.9, 1.10 ● C#/.NET ● custom Open Capabilities Flexible Runtime Languages ● Python 2.7, 3.7 ● Java 7, 8 ● PHP 5.5, 7.2 ● Go 1.6, 1.8, 1.11 ● Node.js 8 "Constrained" Capabilities Incredibly rapid scale Bold == 2nd generation Standard Runtime Google Cloud Functions Function-hosting in the cloud
  • 7. "Hello World" Python Cloud Function main.py def hello_world(request): return 'Hello World!' $ gcloud functions deploy hello --runtime python37 --trigger-http curl: curl -X POST https://[GCP_REGION]-[PROJECT_ID].cloudfunctions.net/hello -H "Content-Type:application/json" --data '{"value": "123"}' browser: http://[GCP_REGION]-[PROJECT_ID].cloudfunctions.net/hello?value=123 Ex: https://us-central1-myproject-ccsc.cloudfunctions.net/hello Google Cloud Functions Languages Supported ● Node.js 6, 8 (JavaScript) ● Python 3.7 Deploying Cloud Functions ● Create locally then deploy on cmd-line OR ● Edit and deploy from developer web console Triggering Cloud Functions (response to events) ● HTTP — via HTTP request ● Cloud Storage — bucket object/metadata CRUD ● Cloud Pub/Sub — new message ● Firebase (DB, Storage, Analytics, Auth)
  • 8. Test tool Google Apps Script (and App Maker) Customized JS runtime for G Suite automation, extension, and integration
  • 9. Sheets-bound “Hello World!” Apps Script intro goo.gl/1sXeuD Sheets-bound “Hello World!”
  • 10. What can you do with this? Accessing maps from spreadsheets?!? goo.gl/oAzBN9 This… with help from Google Maps & Gmail function sendMap() { var sheet = SpreadsheetApp.getActiveSheet(); var address = sheet.getRange("A2").getValue(); var map = Maps.newStaticMap().addMarker(address); MailApp.sendEmail(EMAIL, "Map", map.getMapUrl()); } JS
  • 11. Session Summary ● Why go cloud? ○ Cloud computing has taken the world by storm ○ You're behind if you're not already using it… it's not too late! ○ Help train the next generation cloud-ready workforce! ● Google Cloud and why serverless? ○ Many features: compute, storage, AI/ML, NW, data processing, etc. ○ Serverless lets users focus on just their logic (apps or functions) ○ Interesting possibilities using both platforms (GCP + G Suite)
  • 12. References ● G Suite and Google Apps Script documentation ○ developers.google.com/gsuite ○ developers.google.com/apps-script ● GCP docs source code (i.e., App Engine & Cloud Functions quickstarts) ○ github.com/GoogleCloudPlatform/python-docs-samples ○ github.com/GoogleCloudPlatform/nodejs-docs-samples ● Inspirational demo apps' resources ○ cloud.withgoogle.com/next18/sf/sessions/session/156878 ■ cloud.google.com/blog/products/application-development/ adding-custom-intelligence-to-gmail-with-serverless-on-gcp ■ bit.ly/2OcptaG ○ NEXT '19: cloud.withgoogle.com/next/sf/sessions?session=DEV212 Learning resources ● Codelabs: self-paced hands-on tutorials ○ Google codelabs: need a Gmail account, always free ■ g.co/codelabs/cloud ○ Qwiklabs codelabs: don't need a Gmail acct; typically not free ■ google.qwiklabs.com ■ Individuals can request 200 more credits; 5000 credits for use in courses ● Official GCP docs: cloud.google.com ○ Recommended: Getting Started, Cloud Console, Cloud Shell, Cloud SDK, GCP Free Tier (need a credit card), Community ● YouTube video series: youtube.com/GoogleCloud ○ Recommended: Cloud Minute shorts & Cloud NEXT videos ○ G Suite Dev Show: goo.gl/JpBQ40
  • 13. Resources for Higher Education ● Education grant program ○ Teaching grants (per-course basis) ■ $50USD for students ■ $100USD for faculty & TAs ■ You'll barely use any of it… key: no need to give Google a credit card ○ Research grants ■ Larger amounts, granted for longer period of time ○ Turnaround time: 3-4 business days ● Teacher center ○ teachercenter.withgoogle.com/gcp ○ Apply here for education grants ○ Apply here for Qwiklabs credits Thank you! Questions? Wesley Chun @wescpy