SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
Serverless computing on
Google Cloud with Python
Wesley Chun - @wescpy
Developer Advocate, Google
Developer Advocate, Google Cloud
● Mission: enable current and future
developers everywhere to be
successful using Google Cloud and
other Google developer tools & APIs
● Focus: GCP serverless (App Engine,
Cloud Functions, Cloud Run); higher
education, Google Workspace, GCP
AI/ML APIs; multi-product use cases
● Content: speak to developers globally;
make videos, create code samples,
produce codelabs (free, self-paced,
hands-on tutorials), publish blog posts
About the speaker
Previous experience / background
● Software engineer & architect for 20+ years
○ Yahoo!, Sun, HP, Cisco, EMC, Xilinx
○ Original Yahoo!Mail engineer/SWE
● Technical trainer, teacher, instructor
○ Taught Math, Linux, Python since 1983
○ Private corporate trainer
○ Adjunct CS Faculty at local SV college
● Python community member
○ Popular Core Python series author
○ Python Software Foundation Fellow
● AB (Math/CS) & CMP (Music/Piano), UC
Berkeley and MSCS, UC Santa Barbara
● Adjunct Computer Science Faculty, Foothill
College (Silicon Valley)
Serverless: why & agenda
1
Cloud computing
review
2
Intro to Google's
cloud
3
Serverless
platforms
4
Inspiration
5
Summary
● Cloud computing has taken industry by storm (all?)
● App modernization top priority at many enterprises
○ Containerizing apps, getting them on VMs, moving to the cloud
● We can give you lots of VMs & big disk, but why serverless?
○ Serverless lets you focus on your solutions not what they run on
● Help prep next-generation (cloud-ready) workforce
01
Cloud computing
review
All you need to know about the cloud
What is cloud computing?
spar
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
Cloud service levels/"pillars"
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Apps Script
Salesforce1/force.com
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
Outsourcing of apps (SaaS)
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Apps Script
Salesforce1/force.com
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
Outsourcing of hardware (IaaS)
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Apps Script
Salesforce1/force.com
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
Outsourcing of logic-hosting (PaaS)
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Apps Script
Salesforce1/force.com
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
IaaS/PaaS gray area (DataB/S/P-aaS?)
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google Apps Script
Salesforce1/force.com
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
SaaS/PaaS gray area
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google Apps Script
Salesforce1/force.com
Summary of responsibility
SaaS
Software as a Service
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
IaaS
Infrastructure as a Service
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
PaaS
Platform as a Service
Managed by YOU Managed by cloud vendor
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
on-prem
all you, no cloud
02
Introduction to
Google's cloud
Google Cloud and
Google Workspace
YOUR
NEXT
APP? google.com/datacenter
Nine products with 1B+ (monthly)
users each, all powered by our cloud
● Carbon neutral (since 2007)
● 100% renewable energy match (since 2017)
● Carbon free (by 2030)
*Source: WIRED (Dec 2019)
"Greenest" cloud amongst major vendors*
formerly
( )
Google Workspace
Top-level documentation and comprehensive developers
overview video at developers.google.com/gsuite
(formerly G Suite and Google Apps)
APIs
Google Compute Engine, Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google Apps Script
Salesforce1/force.com
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google BigQuery, Cloud SQL, Vertex AI,
Cloud Firestore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Cloud Platform vs. Google Workspace
GWS
APIs
GCP
APIs
cloud.google.com/hosting-options#hosting-options
GCP compute option spectrum
Compute
Engine
Kubernetes
Engine (GKE)
Cloud Run
on Anthos
Cloud Run
(fully-mgd)
App Engine
(Flexible)
App Engine
(Standard)
Cloud
Functions
03
Run your code
on serverless
Google Cloud and
Google Workspace
> Google Compute Engine configurable
VMs of all shapes & sizes, from
"micro" to 416 vCPUs, 11.776 TB
RAM, 256 TB HDD/SSD plus Google
Cloud Storage for data lake "blobs"
(Debian, CentOS, CoreOS, SUSE, Red Hat Enterprise Linux,
Ubuntu, FreeBSD; Windows Server 2008 R2, 2012 R2, 2016, 1803,
1809, 1903/2019, 1909)
cloud.google.com/compute
cloud.google.com/storage
Yeah, we got VMs & big disk… but why*?
Serverless: what & why
● What is serverless?
○ Misnomer (a "PMM") :-)
○ "No worries"
○ Developers focus on writing code & solving business problems*
○ Servers (physical & virtual) completely abstracted away from the user*
● Why serverless?
○ Fastest growing segment of cloud... per analyst research:
■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021), $14.93B (2023), and $21.1B (2025)^
■ $4.18B (2018) and $6.05B (2020) ⇒ $31.53B (2026) and $53.08B (2028)†
○ What if you go viral? Autoscaling: your new best friend
○ What if you don't? Code not running? You're not paying.
* Forbes (May 2018)
^ (in USD) CB Insights (Sep 2018), MarketsandMarkets™ (Jan 2019)
† (in USD) Reports and Data (Jul 2019 , Jan 2020, and Oct 2021)
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
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365
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, Docker
Serverless: PaaS-y compute/processing
Google Apps Script
Salesforce1/force.com
Google App Engine
App-hosting in the cloud ("Serverless 1.0")
cloud.google.com/appengine
Why does App Engine exist?
● Focus on code not DevOps
○ Web app or mobile backend
● Enhance productivity
● Deploy globally
● Fully-managed
● Auto-scaling
● Pay-per-use
● Familiar languages
● Test w/local dev server
● "Bundled" services like DB,
caching, tasks, storage, etc.
Hello World (Python "MVP")
app.yaml
runtime: python39
main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'
requirements.txt
flask
Deploy:
$ gcloud app deploy
Access globally:
PROJECT_ID.appspot.com
cloud.google.com/appengine/docs/standard/python3/quickstart
Not all apps user-facing or web-based!!
● Need backend processing? Want to build your own?
● No UI required... just need HTTP
● Optimal for user info (high scores, contacts, levels/badges, etc.)
● Better UI: move user data off phone so it's universally available
Popular App Engine Use Cases
● Mobile/Tablet
○ App backends
○ Cloud persistence
● Social/Mobile Games
○ Speed, scale
○ API integrations
○ Personals/dating
● Consumer Web Apps
○ Unpredictable traffic
○ Scale (up or down)
● Apps in Academia
○ Any course where students
build web or mobile apps
○ Research projects
○ IT/Operational apps
● Business Apps
○ Enterprise
○ Java runtime
○ IT/Operational apps
○ Web or Mobile
App Engine: product update
● Original App Engine platform (2008-today)
○ Bundled services: Datastore, Task Queue, Memcache, etc.
○ Runtimes: Python 2.7, Java 8, Go 1.11, PHP 5 (all community-deprecated)
○ Google Cloud committed to supporting them long-term
● 2nd generation service supports newer runtimes (2018-today)
○ No more Many bundled services (returned in 2021)
○ Runtimes: Python 3.7+, Java 11/17, Go 1.12+, PHP 7/8, Node.js 10+, Ruby 2/3
○ Fewer restrictions, more idiomatic developer experience
● Move away from GAE bundled services: apps more portable, less lock-in
● Stay on GAE or "shift" to GCF, GCR; GKE, GCE; on-prem, hybrid/multi cloud
● Get started with serverless modernization/migration content
Google Cloud Functions
Function-hosting in the cloud ("Serverless 2.0")
cloud.google.com/functions
Why does Cloud Functions exist?
● Don't have entire app?
○ No framework "overhead" (LAMP, MEAN...)
○ Deploy short utilities (alerts, ETL...), monoliths →
loosely-coupled microservices, event-driven tasks
● Event-driven
○ Triggered via HTTP or background events
■ Pub/Sub, Cloud Storage, Firebase, etc.
○ Auto-scaling & highly-available; pay per use
● Flexible development environment
○ Cmd-line or developer console (in-browser)
○ Develop/test locally with Functions Framework
● Cloud Functions for Firebase
○ Mobile app use-cases
main.py
def hello_world(request):
return 'Hello World!'
Deploy:
$ gcloud functions deploy hello --runtime python39 --trigger-http
Access globally (curl):
$ curl REGION-PROJECT_ID.cloudfunctions.net/hello
Access globally (browser):
https://REGION-PROJECT_ID.cloudfunctions.net/hello
Hello World (Python "MVP")
cloud.google.com/functions/docs/quickstart-python
No cmd-line
access?
Use in-browser
dev environment!
● setup
● code
● deploy
● test
One user's experience
Google Cloud Run
Container-hosting in the cloud ("Serverless 2.0")
cloud.run
The rise of containers... ● Any language
● Any library
● Any binary
● Ecosystem of base images
● Industry standard
FLEXIBILITY
“We can’t be locked in.”
“How can we use
existing binaries?”
“Why do I have to choose between
containers and serverless?”
“Can you support language _______ ?”
Serverless inaccessible for some...
CONVENIENCE
Cloud Run: code, build, deploy
.js .rb .go
.sh
.py ...
● Any language, library, binary
○ HTTP port, stateless
● Bundle into container
○ Build w/Docker OR
○ Google Cloud Build
○ Image ⇒ Container Registry
● Deploy to Cloud Run (managed or GKE)
● GitOps: (CI/)CD Push-to-deploy from Git
State
HTTP
Hello World (Python "MVP")
main.py
import os
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
cloud.google.com/run/docs/quickstarts/build-and-deploy
requirements.txt
flask
Hello World (Python "MVP")
Dockerfile
FROM python:3-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "main.py"]
.dockerignore
Dockerfile
README.md
*.pyc
*.pyo
.git/
__pycache__
Build (think docker build and docker push) then deploy (think docker run):
$ gcloud builds submit --tag gcr.io/PROJ_ID/IMG_NAME
$ gcloud run deploy SVC_NAME --image gcr.io/PROJ_ID/IMG_NAME
OR… Build and Deploy (1-line combination of above commands):
$ gcloud run deploy SVC_NAME --source .
Access globally:
SVC_NAME-HASH-REG_ABBR.a.run.app
Docker &
Dockerfile
OPTIONAL!!
● Build containers easily & securely without creating/managing Dockerfiles
● Open source, open standard; based on CNCF Buildpacks spec v3
● Used by GCF Functions Framework to deploy locally-developed functions
● Supports most common development tools
○ Go 1.10+
○ Node.js 10+
○ Python 3.7+
○ Java 8 & 11
○ .NET Core 3.1+
● Blog posts
○ See cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks and
cloud.google.com/blog/products/serverless/build-and-deploy-an-app-to-cloud-run-with-a-single-command
Deploy to Cloud Run with Buildpacks
github.com/GoogleCloudPlatform/buildpacks
$ ls
index.js package.json
$ gcloud run deploy myapp --source .
$ ls
main.py requirements.txt
$ gcloud run deploy myapp --source .
Node.js, Go,
Python, etc.?
It's the same
command!
Serverless best practices
● Use the right tool for the job (GAE, GCF, or GCR)
● One top priority: latency
○ SOA demands fast response from components
● Second top priority: architecture
○ Breakup larger computing into components
○ Microservices, each with low latency
○ Uncouple components keeping state
Serverless common use cases App Engine Cloud Run
Cloud
Functions
Web services
Web app hosting/custom domains ✓ ✓
HTTP services ✓ ✓ ✓
Container hosting ✓
APIs
Web & mobile backends ✓ ✓
Internal/intranet apps ✓ ✓
Large-scale data processing ✓ ✓
Automation
Workflow & orchestration ✓ ✓
Event-driven automation ✓ ✓
GitOps: Git push-to-deploy (CD-only) ✓
Common use cases
cloud.google.com/docs/compare/aws
Flexibility in options
Cloud
Functions
App
Engine
Cloud
Run
local
server
Cloud
Translation
My "Google Translate" MVP
goo.gle/2Y0ph5q
● "Nebulous" sample web app
○ Flask/Python 2 or 3
○ Express/Node.js 10+
○ Uses Cloud Translation API
● Deployable to on-prem server
● Also GCP serverless compute
○ App Engine
○ Cloud Functions
○ Cloud Run
● With only config changes
● No changes to app code
DEMO
Google Apps Script
Customized serverless JS runtime for automation, and extension
and integration with Google Workspace (formerly G Suite) and
other Google & external services
“Hello World!” in Apps Script
Sheets-bound “Hello World!”
Apps Script intro
goo.gl/1sXeuD
Know your serverless compute platforms
● Google App Engine — gives users ability to deploy source-based web
applications or mobile backends to the cloud without concerns of servers
or autoscaling (PaaS—app-hosting in the cloud)
● Cloud Functions — for scenarios where you may not have an entire app;
great for microservices, one-off utilities, or event-driven functions
(FaaS/PaaS—function-hosting in the cloud)
● Cloud Run — provides flexibility of containers (any language, library, binary)
along with convenience of serverless; use with Docker or "containerless"
w/Cloud Buildpacks (CaaS—container-hosting in the cloud)
● Google Apps Script — Customized JavaScript runtime for automation, and
extension & integration with Google Workspace (formerly G Suite) and
other Google & external services ("restricted" PaaS)
04
Inspiration
What is possible with
serverless?
Custom intelligence in Gmail
Analyze Google Workspace (formerly G Suite) data with GCP
Gmail message processing with GCP
Gmail
Cloud
Pub/Sub
Cloud
Functions
Cloud
Vision
Workspace
(formerly G Suite)
GCP
Star
message
Message
notification
Trigger
function
Extract
images
Categorize
images
Inbox augmented with Cloud Function
● Gmail API: sets up notification forwarding to Cloud Pub/Sub
● developers.google.com/gmail/api/guides/push
● Pub/Sub: triggers logic hosted by Cloud Functions
● cloud.google.com/functions/docs/calling/pubsub
● Cloud Functions: "orchestrator" accessing GCP (and Google Workspace/G Suite) APIs
● Combine all of the above to add custom intelligence to Gmail
● Deep dive code blog post
● cloud.google.com/blog/products/application-development/
adding-custom-intelligence-to-gmail-with-serverless-on-gcp
● Application source code
● github.com/GoogleCloudPlatform/cloud-functions-gmail-nodejs
App summary
Hangouts Chat Productivity Tracker
Chat bot that's GCP & Google Workspace (formerly G Suite) aware
Productivity tracker Hangouts Chat bot
Google Workspace
(formerly G Suite)
GCP
Sheets Natural Language
START
or LOG
END
Hangouts
Chat
App
Engine
Cloud
SQL
App summary
● Motivation
● Do coding contract jobs during school year
● Needed to track time spent on work (and non-work)
● Who doesn't want to be more productive?
● Hangouts Chat bot framework & API... build bots to:
● Automate workflows
● Query for information
● Other heavy-lifting
● Google Workspace (formerly G Suite) app that leverages app-hosting, NL processing, and storage
tools from GCP
● Application source code
● github.com/gsuitedevs/hangouts-chat-samples/tree/master/python/productivity_tracker
● Presented at GDG Silicon Valley (Aug 2018)
● meetup.com/gdg-silicon-valley/events/252858660
Using Google Docs as an IDE
Running Python code in Docs w/the help of GCP
Google Docs as a Code Editor/IDE
GCP Google Workspace
(formerly G Suite/Google Apps)
Docs
New Roster,
New Editors
Run Code
Edit Roster
Edit Code
Cloud
Functions
Compute
Engine
Drive
Sheets
New Roster,
New Editors
App summary
● Motivation
● Lead TA during school year; manage student coursework
● Needed roster app for non-engineering faculty for student coding
● Use two new products (Docs API and Python Cloud Functions)
● Implementation
● Use Drive & Sheets APIs to create student roster Sheet for professor
● Faculty completes roster in Sheet, calls Cloud Function again
● Autogenerate "Docs IDE" per student via Docs API
● Student edits code in Doc, then calls Cloud Function to run
● Read from Doc, spin-up GCE VM, run code, write results into Doc, bring down VM
● Application source code (to-be-published some day[?])
● github.com/gsuitedevs/python-samples/tree/master/docs/docs_editor
05
Summary
Online resources & wrap-up
Cost of Google Cloud serverless tools
● What is free in Google Cloud overall?
○ Free Trial (credit card required; expires)
■ $300USD credit good for first 90 days
○ Always Free tier (credit card required; no expiration; subject to change)
■ Independent of Free Trial & education grants (more below)
■ Some GCP products free up to usage limits
○ Learn about both programs at cloud.google.com/free
● Serverless Always Free tier (daily or monthly quotas)
○ App Engine (28 [or 9] hours, 1GB storage & 1GB egress) per day
○ Cloud Run (2M reqs, 360k GB-secs, 180k vCPU-secs, 1GB egress) per month
○ Cloud Functions (2M calls, 400k GB-secs, 200k vCPU-secs, 5GB egress) per month
● Higher education (teaching & research) grants
○ cloud.google.com/edu (credit card NOT required; expires)
○ Provides "free" usage for coursework and initial research
$$ FREE $$
Cloud/serverless 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.
○ Modernization more than moving VMs to the cloud
○ Serverless lets users focus on just their logic (apps or functions)
○ Interesting possibilities when using >1 Google product families/APIs
● Documentation (most APIs have "Quickstarts")
○ Google Cloud: cloud.google.com/{docs,appengine,functions,run,vision,automl,translate,language,
speech,texttospeech,video-intelligence,firestore,bigquery,compute,storage,gpu,tpu}
○ Google Workspace: developers.google.com/{gsuite,drive,calendar,gmail,docs,sheets,slides,apps-script}
● Introductory "codelabs" ([free] self-paced, hands-on tutorials)
○ Workspace APIs: g.co/codelabs/gsuite-apis-intro (featuring Drive API)
○ Apps Script: g.co/codelabs/apps-script-intro
○ App Engine: codelabs.developers.google.com/codelabs/cloud-app-engine-python
○ Cloud Functions: codelabs.developers.google.com/codelabs/cloud-starting-cloudfunctions
○ Cloud Run: codelabs.developers.google.com/codelabs/cloud-run-hello-python3
○ Others: g.co/codelabs (all Google codelabs) and gcplab.me (Cloud-only)
● Videos: youtube.com/GoogleCloudPlatform (Cloud) and goo.gl/JpBQ40 (Workspace)
● Code samples: github.com/GoogleCloudPlatform (Cloud) and github.com/googleworkspace (Workspace)
● Cloud Free Trial (new users) and Always Free (daily/monthly tier) programs: cloud.google.com/free
● Know AWS/Azure? Compare with Google Cloud products at cloud.google.com/docs/compare/aws
● Language support: cloud.google.com/{python,java,nodejs,go,php,ruby,dotnet}
Resources (industry)
Other Google APIs & platforms
● Google Workspace (G Suite) (code Gmail, Drive, Docs, Sheets, Slides!)
○ developers.google.com/gsuite
● Firebase (mobile development platform and RT DB plus ML-Kit)
○ firebase.google.com and firebase.google.com/docs/ml-kit
● Google Data Studio (data visualization, dashboards, etc.)
○ datastudio.google.com/overview
○ goo.gle/datastudio-course
● Actions on Google/Assistant/DialogFlow (voice apps)
○ developers.google.com/actions
● YouTube (Data, Analytics, and Livestreaming APIs)
○ developers.google.com/youtube
● Google Maps (Maps, Routes, and Places APIs)
○ developers.google.com/maps
● Flutter (native apps [Android, iOS, web] w/1 code base[!])
○ flutter.dev
Thank you! Questions?
Wesley Chun
@wescpy
Video: youtu.be/nOj8y_gjSWI?t=1170
Progress bars: goo.gl/69EJVw

Contenu connexe

Similaire à Serverless Python on GCP

Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Pythonwesley 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/labwesley chun
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloudwesley chun
 
Build with all of Google Cloud
Build with all of Google CloudBuild with all of Google Cloud
Build with all of Google Cloudwesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley 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 Cloudwesley chun
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloudwesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 
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 presentwesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley 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
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloudwesley 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 overviewwesley chun
 
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...Openbar
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Google Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacksGoogle Cloud lightning talk @MHacks
Google Cloud lightning talk @MHackswesley chun
 
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)Paco de la Cruz
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley chun
 

Similaire à Serverless Python on GCP (20)

Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 
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
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of 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
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 
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
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with 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
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
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...
 
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)
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloud
 
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
 
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...
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Google Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacksGoogle Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacks
 
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 

Plus de 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
 
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 APIswesley 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
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloudwesley chun
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloudwesley 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
 
Run your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudRun your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudwesley chun
 
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 Cloudwesley chun
 
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
 
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 & JavaScriptwesley chun
 
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 JavaScriptwesley chun
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learningwesley chun
 

Plus de wesley chun (14)

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)
 
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
 
Easy path to machine learning (2022)
Easy path to machine learning (2022)Easy path to machine learning (2022)
Easy path to machine learning (2022)
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloud
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation 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)
 
Run your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudRun your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloud
 
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 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)
 
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 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
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
 

Dernier

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Dernier (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Serverless Python on GCP

  • 1. Serverless computing on Google Cloud with Python Wesley Chun - @wescpy Developer Advocate, Google Developer Advocate, Google Cloud ● Mission: enable current and future developers everywhere to be successful using Google Cloud and other Google developer tools & APIs ● Focus: GCP serverless (App Engine, Cloud Functions, Cloud Run); higher education, Google Workspace, GCP AI/ML APIs; multi-product use cases ● Content: speak to developers globally; make videos, create code samples, produce codelabs (free, self-paced, hands-on tutorials), publish blog posts About the speaker Previous experience / background ● Software engineer & architect for 20+ years ○ Yahoo!, Sun, HP, Cisco, EMC, Xilinx ○ Original Yahoo!Mail engineer/SWE ● Technical trainer, teacher, instructor ○ Taught Math, Linux, Python since 1983 ○ Private corporate trainer ○ Adjunct CS Faculty at local SV college ● Python community member ○ Popular Core Python series author ○ Python Software Foundation Fellow ● AB (Math/CS) & CMP (Music/Piano), UC Berkeley and MSCS, UC Santa Barbara ● Adjunct Computer Science Faculty, Foothill College (Silicon Valley)
  • 2. Serverless: why & agenda 1 Cloud computing review 2 Intro to Google's cloud 3 Serverless platforms 4 Inspiration 5 Summary ● Cloud computing has taken industry by storm (all?) ● App modernization top priority at many enterprises ○ Containerizing apps, getting them on VMs, moving to the cloud ● We can give you lots of VMs & big disk, but why serverless? ○ Serverless lets you focus on your solutions not what they run on ● Help prep next-generation (cloud-ready) workforce 01 Cloud computing review All you need to know about the cloud
  • 3. What is cloud computing? spar Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent Cloud service levels/"pillars" SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda
  • 4. Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent Outsourcing of apps (SaaS) SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Apps Script Salesforce1/force.com Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent Outsourcing of hardware (IaaS) SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda
  • 5. Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent Outsourcing of logic-hosting (PaaS) SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent IaaS/PaaS gray area (DataB/S/P-aaS?) SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda
  • 6. Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent SaaS/PaaS gray area SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google BigQuery, Cloud SQL, Vertex AI, Cloud Datastore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda Google Apps Script Salesforce1/force.com Summary of responsibility SaaS Software as a Service Applications Data Runtime Middleware OS Virtualization Servers Storage Networking Applications Data Runtime Middleware OS Virtualization Servers Storage Networking IaaS Infrastructure as a Service Applications Data Runtime Middleware OS Virtualization Servers Storage Networking PaaS Platform as a Service Managed by YOU Managed by cloud vendor Applications Data Runtime Middleware OS Virtualization Servers Storage Networking on-prem all you, no cloud
  • 7. 02 Introduction to Google's cloud Google Cloud and Google Workspace YOUR NEXT APP? google.com/datacenter
  • 8. Nine products with 1B+ (monthly) users each, all powered by our cloud ● Carbon neutral (since 2007) ● 100% renewable energy match (since 2017) ● Carbon free (by 2030) *Source: WIRED (Dec 2019) "Greenest" cloud amongst major vendors* formerly ( )
  • 9. Google Workspace Top-level documentation and comprehensive developers overview video at developers.google.com/gsuite (formerly G Suite and Google Apps) APIs Google Compute Engine, Cloud Storage AWS EC2 & S3; Rackspace; Joyent SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Google Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda Google BigQuery, Cloud SQL, Vertex AI, Cloud Firestore, NL, Vision, Pub/Sub AWS Kinesis, RDS; Windows Azure SQL, Docker Google Cloud Platform vs. Google Workspace GWS APIs GCP APIs
  • 10. cloud.google.com/hosting-options#hosting-options GCP compute option spectrum Compute Engine Kubernetes Engine (GKE) Cloud Run on Anthos Cloud Run (fully-mgd) App Engine (Flexible) App Engine (Standard) Cloud Functions 03 Run your code on serverless Google Cloud and Google Workspace
  • 11. > Google Compute Engine configurable VMs of all shapes & sizes, from "micro" to 416 vCPUs, 11.776 TB RAM, 256 TB HDD/SSD plus Google Cloud Storage for data lake "blobs" (Debian, CentOS, CoreOS, SUSE, Red Hat Enterprise Linux, Ubuntu, FreeBSD; Windows Server 2008 R2, 2012 R2, 2016, 1803, 1809, 1903/2019, 1909) cloud.google.com/compute cloud.google.com/storage Yeah, we got VMs & big disk… but why*? Serverless: what & why ● What is serverless? ○ Misnomer (a "PMM") :-) ○ "No worries" ○ Developers focus on writing code & solving business problems* ○ Servers (physical & virtual) completely abstracted away from the user* ● Why serverless? ○ Fastest growing segment of cloud... per analyst research: ■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021), $14.93B (2023), and $21.1B (2025)^ ■ $4.18B (2018) and $6.05B (2020) ⇒ $31.53B (2026) and $53.08B (2028)† ○ What if you go viral? Autoscaling: your new best friend ○ What if you don't? Code not running? You're not paying. * Forbes (May 2018) ^ (in USD) CB Insights (Sep 2018), MarketsandMarkets™ (Jan 2019) † (in USD) Reports and Data (Jul 2019 , Jan 2020, and Oct 2021)
  • 12. 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 Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, Office 365 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, Docker Serverless: PaaS-y compute/processing Google Apps Script Salesforce1/force.com Google App Engine App-hosting in the cloud ("Serverless 1.0") cloud.google.com/appengine
  • 13. Why does App Engine exist? ● Focus on code not DevOps ○ Web app or mobile backend ● Enhance productivity ● Deploy globally ● Fully-managed ● Auto-scaling ● Pay-per-use ● Familiar languages ● Test w/local dev server ● "Bundled" services like DB, caching, tasks, storage, etc. Hello World (Python "MVP") app.yaml runtime: python39 main.py from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World!' requirements.txt flask Deploy: $ gcloud app deploy Access globally: PROJECT_ID.appspot.com cloud.google.com/appengine/docs/standard/python3/quickstart
  • 14. Not all apps user-facing or web-based!! ● Need backend processing? Want to build your own? ● No UI required... just need HTTP ● Optimal for user info (high scores, contacts, levels/badges, etc.) ● Better UI: move user data off phone so it's universally available Popular App Engine Use Cases ● Mobile/Tablet ○ App backends ○ Cloud persistence ● Social/Mobile Games ○ Speed, scale ○ API integrations ○ Personals/dating ● Consumer Web Apps ○ Unpredictable traffic ○ Scale (up or down) ● Apps in Academia ○ Any course where students build web or mobile apps ○ Research projects ○ IT/Operational apps ● Business Apps ○ Enterprise ○ Java runtime ○ IT/Operational apps ○ Web or Mobile
  • 15. App Engine: product update ● Original App Engine platform (2008-today) ○ Bundled services: Datastore, Task Queue, Memcache, etc. ○ Runtimes: Python 2.7, Java 8, Go 1.11, PHP 5 (all community-deprecated) ○ Google Cloud committed to supporting them long-term ● 2nd generation service supports newer runtimes (2018-today) ○ No more Many bundled services (returned in 2021) ○ Runtimes: Python 3.7+, Java 11/17, Go 1.12+, PHP 7/8, Node.js 10+, Ruby 2/3 ○ Fewer restrictions, more idiomatic developer experience ● Move away from GAE bundled services: apps more portable, less lock-in ● Stay on GAE or "shift" to GCF, GCR; GKE, GCE; on-prem, hybrid/multi cloud ● Get started with serverless modernization/migration content Google Cloud Functions Function-hosting in the cloud ("Serverless 2.0") cloud.google.com/functions
  • 16. Why does Cloud Functions exist? ● Don't have entire app? ○ No framework "overhead" (LAMP, MEAN...) ○ Deploy short utilities (alerts, ETL...), monoliths → loosely-coupled microservices, event-driven tasks ● Event-driven ○ Triggered via HTTP or background events ■ Pub/Sub, Cloud Storage, Firebase, etc. ○ Auto-scaling & highly-available; pay per use ● Flexible development environment ○ Cmd-line or developer console (in-browser) ○ Develop/test locally with Functions Framework ● Cloud Functions for Firebase ○ Mobile app use-cases main.py def hello_world(request): return 'Hello World!' Deploy: $ gcloud functions deploy hello --runtime python39 --trigger-http Access globally (curl): $ curl REGION-PROJECT_ID.cloudfunctions.net/hello Access globally (browser): https://REGION-PROJECT_ID.cloudfunctions.net/hello Hello World (Python "MVP") cloud.google.com/functions/docs/quickstart-python
  • 17. No cmd-line access? Use in-browser dev environment! ● setup ● code ● deploy ● test One user's experience
  • 18. Google Cloud Run Container-hosting in the cloud ("Serverless 2.0") cloud.run The rise of containers... ● Any language ● Any library ● Any binary ● Ecosystem of base images ● Industry standard FLEXIBILITY
  • 19. “We can’t be locked in.” “How can we use existing binaries?” “Why do I have to choose between containers and serverless?” “Can you support language _______ ?” Serverless inaccessible for some... CONVENIENCE Cloud Run: code, build, deploy .js .rb .go .sh .py ... ● Any language, library, binary ○ HTTP port, stateless ● Bundle into container ○ Build w/Docker OR ○ Google Cloud Build ○ Image ⇒ Container Registry ● Deploy to Cloud Run (managed or GKE) ● GitOps: (CI/)CD Push-to-deploy from Git State HTTP
  • 20. Hello World (Python "MVP") main.py import os from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080))) cloud.google.com/run/docs/quickstarts/build-and-deploy requirements.txt flask Hello World (Python "MVP") Dockerfile FROM python:3-slim WORKDIR /app COPY . . RUN pip install -r requirements.txt CMD ["python", "main.py"] .dockerignore Dockerfile README.md *.pyc *.pyo .git/ __pycache__ Build (think docker build and docker push) then deploy (think docker run): $ gcloud builds submit --tag gcr.io/PROJ_ID/IMG_NAME $ gcloud run deploy SVC_NAME --image gcr.io/PROJ_ID/IMG_NAME OR… Build and Deploy (1-line combination of above commands): $ gcloud run deploy SVC_NAME --source . Access globally: SVC_NAME-HASH-REG_ABBR.a.run.app Docker & Dockerfile OPTIONAL!!
  • 21. ● Build containers easily & securely without creating/managing Dockerfiles ● Open source, open standard; based on CNCF Buildpacks spec v3 ● Used by GCF Functions Framework to deploy locally-developed functions ● Supports most common development tools ○ Go 1.10+ ○ Node.js 10+ ○ Python 3.7+ ○ Java 8 & 11 ○ .NET Core 3.1+ ● Blog posts ○ See cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks and cloud.google.com/blog/products/serverless/build-and-deploy-an-app-to-cloud-run-with-a-single-command Deploy to Cloud Run with Buildpacks github.com/GoogleCloudPlatform/buildpacks $ ls index.js package.json $ gcloud run deploy myapp --source . $ ls main.py requirements.txt $ gcloud run deploy myapp --source . Node.js, Go, Python, etc.? It's the same command! Serverless best practices ● Use the right tool for the job (GAE, GCF, or GCR) ● One top priority: latency ○ SOA demands fast response from components ● Second top priority: architecture ○ Breakup larger computing into components ○ Microservices, each with low latency ○ Uncouple components keeping state
  • 22. Serverless common use cases App Engine Cloud Run Cloud Functions Web services Web app hosting/custom domains ✓ ✓ HTTP services ✓ ✓ ✓ Container hosting ✓ APIs Web & mobile backends ✓ ✓ Internal/intranet apps ✓ ✓ Large-scale data processing ✓ ✓ Automation Workflow & orchestration ✓ ✓ Event-driven automation ✓ ✓ GitOps: Git push-to-deploy (CD-only) ✓ Common use cases cloud.google.com/docs/compare/aws
  • 23. Flexibility in options Cloud Functions App Engine Cloud Run local server Cloud Translation My "Google Translate" MVP goo.gle/2Y0ph5q ● "Nebulous" sample web app ○ Flask/Python 2 or 3 ○ Express/Node.js 10+ ○ Uses Cloud Translation API ● Deployable to on-prem server ● Also GCP serverless compute ○ App Engine ○ Cloud Functions ○ Cloud Run ● With only config changes ● No changes to app code DEMO
  • 24. Google Apps Script Customized serverless JS runtime for automation, and extension and integration with Google Workspace (formerly G Suite) and other Google & external services “Hello World!” in Apps Script
  • 25. Sheets-bound “Hello World!” Apps Script intro goo.gl/1sXeuD Know your serverless compute platforms ● Google App Engine — gives users ability to deploy source-based web applications or mobile backends to the cloud without concerns of servers or autoscaling (PaaS—app-hosting in the cloud) ● Cloud Functions — for scenarios where you may not have an entire app; great for microservices, one-off utilities, or event-driven functions (FaaS/PaaS—function-hosting in the cloud) ● Cloud Run — provides flexibility of containers (any language, library, binary) along with convenience of serverless; use with Docker or "containerless" w/Cloud Buildpacks (CaaS—container-hosting in the cloud) ● Google Apps Script — Customized JavaScript runtime for automation, and extension & integration with Google Workspace (formerly G Suite) and other Google & external services ("restricted" PaaS)
  • 26. 04 Inspiration What is possible with serverless? Custom intelligence in Gmail Analyze Google Workspace (formerly G Suite) data with GCP
  • 27. Gmail message processing with GCP Gmail Cloud Pub/Sub Cloud Functions Cloud Vision Workspace (formerly G Suite) GCP Star message Message notification Trigger function Extract images Categorize images
  • 28. Inbox augmented with Cloud Function ● Gmail API: sets up notification forwarding to Cloud Pub/Sub ● developers.google.com/gmail/api/guides/push ● Pub/Sub: triggers logic hosted by Cloud Functions ● cloud.google.com/functions/docs/calling/pubsub ● Cloud Functions: "orchestrator" accessing GCP (and Google Workspace/G Suite) APIs ● Combine all of the above to add custom intelligence to Gmail ● Deep dive code blog post ● cloud.google.com/blog/products/application-development/ adding-custom-intelligence-to-gmail-with-serverless-on-gcp ● Application source code ● github.com/GoogleCloudPlatform/cloud-functions-gmail-nodejs App summary
  • 29. Hangouts Chat Productivity Tracker Chat bot that's GCP & Google Workspace (formerly G Suite) aware Productivity tracker Hangouts Chat bot Google Workspace (formerly G Suite) GCP Sheets Natural Language START or LOG END Hangouts Chat App Engine Cloud SQL
  • 30. App summary ● Motivation ● Do coding contract jobs during school year ● Needed to track time spent on work (and non-work) ● Who doesn't want to be more productive? ● Hangouts Chat bot framework & API... build bots to: ● Automate workflows ● Query for information ● Other heavy-lifting ● Google Workspace (formerly G Suite) app that leverages app-hosting, NL processing, and storage tools from GCP ● Application source code ● github.com/gsuitedevs/hangouts-chat-samples/tree/master/python/productivity_tracker ● Presented at GDG Silicon Valley (Aug 2018) ● meetup.com/gdg-silicon-valley/events/252858660
  • 31. Using Google Docs as an IDE Running Python code in Docs w/the help of GCP Google Docs as a Code Editor/IDE GCP Google Workspace (formerly G Suite/Google Apps) Docs New Roster, New Editors Run Code Edit Roster Edit Code Cloud Functions Compute Engine Drive Sheets New Roster, New Editors
  • 32. App summary ● Motivation ● Lead TA during school year; manage student coursework ● Needed roster app for non-engineering faculty for student coding ● Use two new products (Docs API and Python Cloud Functions) ● Implementation ● Use Drive & Sheets APIs to create student roster Sheet for professor ● Faculty completes roster in Sheet, calls Cloud Function again ● Autogenerate "Docs IDE" per student via Docs API ● Student edits code in Doc, then calls Cloud Function to run ● Read from Doc, spin-up GCE VM, run code, write results into Doc, bring down VM ● Application source code (to-be-published some day[?]) ● github.com/gsuitedevs/python-samples/tree/master/docs/docs_editor
  • 33. 05 Summary Online resources & wrap-up Cost of Google Cloud serverless tools ● What is free in Google Cloud overall? ○ Free Trial (credit card required; expires) ■ $300USD credit good for first 90 days ○ Always Free tier (credit card required; no expiration; subject to change) ■ Independent of Free Trial & education grants (more below) ■ Some GCP products free up to usage limits ○ Learn about both programs at cloud.google.com/free ● Serverless Always Free tier (daily or monthly quotas) ○ App Engine (28 [or 9] hours, 1GB storage & 1GB egress) per day ○ Cloud Run (2M reqs, 360k GB-secs, 180k vCPU-secs, 1GB egress) per month ○ Cloud Functions (2M calls, 400k GB-secs, 200k vCPU-secs, 5GB egress) per month ● Higher education (teaching & research) grants ○ cloud.google.com/edu (credit card NOT required; expires) ○ Provides "free" usage for coursework and initial research $$ FREE $$
  • 34. Cloud/serverless 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. ○ Modernization more than moving VMs to the cloud ○ Serverless lets users focus on just their logic (apps or functions) ○ Interesting possibilities when using >1 Google product families/APIs ● Documentation (most APIs have "Quickstarts") ○ Google Cloud: cloud.google.com/{docs,appengine,functions,run,vision,automl,translate,language, speech,texttospeech,video-intelligence,firestore,bigquery,compute,storage,gpu,tpu} ○ Google Workspace: developers.google.com/{gsuite,drive,calendar,gmail,docs,sheets,slides,apps-script} ● Introductory "codelabs" ([free] self-paced, hands-on tutorials) ○ Workspace APIs: g.co/codelabs/gsuite-apis-intro (featuring Drive API) ○ Apps Script: g.co/codelabs/apps-script-intro ○ App Engine: codelabs.developers.google.com/codelabs/cloud-app-engine-python ○ Cloud Functions: codelabs.developers.google.com/codelabs/cloud-starting-cloudfunctions ○ Cloud Run: codelabs.developers.google.com/codelabs/cloud-run-hello-python3 ○ Others: g.co/codelabs (all Google codelabs) and gcplab.me (Cloud-only) ● Videos: youtube.com/GoogleCloudPlatform (Cloud) and goo.gl/JpBQ40 (Workspace) ● Code samples: github.com/GoogleCloudPlatform (Cloud) and github.com/googleworkspace (Workspace) ● Cloud Free Trial (new users) and Always Free (daily/monthly tier) programs: cloud.google.com/free ● Know AWS/Azure? Compare with Google Cloud products at cloud.google.com/docs/compare/aws ● Language support: cloud.google.com/{python,java,nodejs,go,php,ruby,dotnet} Resources (industry)
  • 35. Other Google APIs & platforms ● Google Workspace (G Suite) (code Gmail, Drive, Docs, Sheets, Slides!) ○ developers.google.com/gsuite ● Firebase (mobile development platform and RT DB plus ML-Kit) ○ firebase.google.com and firebase.google.com/docs/ml-kit ● Google Data Studio (data visualization, dashboards, etc.) ○ datastudio.google.com/overview ○ goo.gle/datastudio-course ● Actions on Google/Assistant/DialogFlow (voice apps) ○ developers.google.com/actions ● YouTube (Data, Analytics, and Livestreaming APIs) ○ developers.google.com/youtube ● Google Maps (Maps, Routes, and Places APIs) ○ developers.google.com/maps ● Flutter (native apps [Android, iOS, web] w/1 code base[!]) ○ flutter.dev Thank you! Questions? Wesley Chun @wescpy Video: youtu.be/nOj8y_gjSWI?t=1170 Progress bars: goo.gl/69EJVw