SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Serverless computing
with Google Cloud
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
Introduction to
Google 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, Google 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,
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, OïŹƒce 365
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
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 Cloud
GCP & Google Workspace
(formerly G Suite & Google Apps)
YOUR
NEXT
APP? google.com/datacenter
Nine products with 1B+ (monthly)
users each, all powered by our cloud
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, Google 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, OïŹƒce 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
Google Cloud Platform vs. Google Workspace
Workspace
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
Google Cloud
serverless compute
GCP and Google Workspace
(formerly G Suite & Google Apps)
> 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*
● Why serverless?
○ Fastest growing segment of cloud... per analyst research*:
■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021) and $14.93B (2023)
○ What if you go viral? Autoscaling: your new best friend
○ What if you don't? Code not running? You're not paying.
* in USD; source:Forbes (May 2018), 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
Google Workspace (was G Suite/Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite, OïŹƒce 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
Why does App Engine exist?
● Focus on app not DevOps
○ Web app
○ Mobile backend
○ Cloud service
● Enhance productivity
● Deploy globally
● Fully-managed
● Auto-scaling
● Pay-per-use
● Familiar languages
● Test w/local dev server
Hello World (Python "MVP")
app.yaml
runtime: python38
main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'
requirements.txt
Flask>=1.1.2
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 runtimes execute on legacy platform (2008-today)
○ Platform comes with bundled services
○ 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)
○ Platform no longer has bundled services
○ Runtimes: Python 3.7+, Java 11, Go 1.12+, PHP 7, Node.js 10+, Ruby 2.5+
○ Less restrictions, richer/fuller, more idiomatic developer experience
● "Copying"/self-bundling 3P libraries requirement lifted
● No more proprietary services means apps more portable, less lock-in
● Opens door to more options: GAE, GCF, GCR; GKE, GCE; on-prem
Google Cloud Functions
Function-hosting in the cloud
Why does Cloud Functions exist?
● Don't have entire app?
○ No framework "overhead" (LAMP, MEAN...)
○ Deploy microservices
● 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
● Available runtimes
○ JS/Node.js 8, 10, 12, 14
○ Python 3.7, 3.8, 3.9
○ Go 1.11, 1.13
○ Java 11
○ Ruby 2.6, 2.7
○ .NET Core 3.1
main.py
def hello_world(request):
return 'Hello World!'
Deploy:
$ gcloud functions deploy hello --runtime python38 --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
Google Cloud Run
Container-hosting in the cloud
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==1.1.2
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
○ 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
app.py requirements.txt
$ gcloud run deploy myapp --source .
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
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);
GmailApp.sendEmail('friend@example.com', 'Map',
'See below.', {attachments:[map]});
}
JS
g.co/codelabs/apps-script-intro
04
In-practice
Use cases, nebulousness &
flexibility, best practices,
local development & testing
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 APIs and services ✓ ✓
Data processing ✓ ✓
Automation
Workflow & orchestration ✓ ✓
Event-driven automation ✓ ✓
Common use cases
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 app
○ Python 2 & 3 compatible
○ 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
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
BPs: Tools (know your platforms)
● Google App Engine — gives users the ability to deploy
source-based web applications or mobile backends to the cloud
without the concerns of servers or autoscaling (PaaS).
● Cloud Functions — for scenarios where you may not have an
entire app; great for microservices, one-off utilities, or event-driven
functions (FaaS/PaaS).
● Cloud Run — provides the flexibility of containers (any language,
library, binary) along with the convenience of serverless; use with
Docker or "containerless" with Cloud Buildpacks. (CaaS)
BPs: Latency
● Keep responses as short as possible (say <250ms)
○ Can't respond immediately? Split out longer jobs
○ Cloud Tasks, Cloud Pub/Sub, Cloud Scheduler (cron)
● Cache common objects, queries, output, etc.
○ Avoid repeated compute or database fetches
○ App Engine Memcache, Cloud Memorystore (Redis)
● Profile your code to find (and remove) bottlenecks
○ Cloud Profiler, Cloud Trace: low overhead insightful tools
● Consider moving some processing to client-side
○ Firebase/Cloud Firestore security rules, use edge-cache JS libs
BPs: More on latency
● Pagespeed tools to analyze & optimize your web apps
○ developers.google.com/speed
● How to think about speed tools
○ developers.google.com/web/fundamentals/performance/speed-tools
● Why speed matters post
○ web.dev/why-speed-matters
● 250ms too general? More specifics:
○ developers.google.com/speed/docs/insights/v5/about#categories
BPs: Still more on latency
● What about non-UI workloads > 250ms?
○ App Engine autoscaling timeout: 1 min (Gen1), 10 mins (Gen2)
○ App Engine basic & manual scaling timeout: 24 hrs (Gen1/Gen2)
○ GAE cron & task queue timeout: 10 mins (Gen1-AS), 24 hrs (Gen1-B/MS)
○ Cloud Tasks HTTP targets: 10 mins (default), 30 mins (max); App Engine
(Gen2) targets: same as GAE Std Gen1 task queue timeouts (10m/24h)
○ Cloud Scheduler HTTP targets: from 15 secs to 30 mins, App Engine
targets: from 15 secs to 24 hrs
○ Cloud Functions extended timeout: 1 min (default), 9 mins (max)
○ Cloud Run extended timeout: 5 mins (default), 1 hr (max)
○ Cloud Run Jobs (preview): tasks (1 hr each), jobs (>=1 tasks): 24 hrs
BPs: Architecture
● Going "stateless" is key
○ Get a request, perform a service, then return response
● Cache common objects, queries, output, etc.
○ Cache sessions elsewhere (cache, not in app); framework-provided?
○ Use database external to app (Cloud Datastore/Firestore; Cloud SQL)
● Breakup monoliths into multiple microservices
○ Loosely-coupled code elements; shared caching & database
● Change monitoring scenery
○ Focus on user, business, app metrics; not HW (CPU, RAM) or networking
BPs: More on stateless (architecture)
● Going "stateless" may be a large architectural change
○ Requires somewhat of a "mental reset"
● Receiving duplicate or retry requests? Logic should be idempotent.
○ This means neither side effects nor data corruption
○ What about job interruption and restarts? Same thing.
● Create repeatable logic exhibiting same behavior for given set of input
regardless of how often repeated
○ Save output to different location than input, leaving input data intact
○ If job runs again, should result in identical processing & same output
BPs: Even more on stateless
● Create unique ID for output to confirm work completed & avoid duplication
○ Duplicate data represents "collection-level" corruption; downstream
systems possibly affected if they assume unique records
● When/where possible, checkpoint long-running jobs, so

○ Periodically write partial results to persistent storage, e.g., DB, GCS, etc.
○ Failure restarts/retries can pick up where it left off (vs. from beginning)
○ Speeds up jobs and minimizes unnecessary costs
● Consider breaking-up larger workloads
○ Especially those large enough not easily "checkpointable"
○ Creates smaller tasks more likely to complete (granted more tasks)
BPs: Development
● Prototype rapidly
○ Use favorite language and get something up-and-going
○ Serverless platforms each come w/default service accounts
○ When ready for production, switch to user-managed service accounts
○ Follows best practice of "least privileges"
● Create separate projects for dev, test, stage, and prod
○ Helps keep developers, testers, operators isolated to own sandbox
○ Can share via IAM roles/permissions (shared buckets, databases, etc.)
● Local development and testing
○ Running locally tests functionality, not scaling
○ Typically can use local web framework server, SDK, or Docker
BPs: Local development/testing
● App Engine — local or framework devserver
○ Local devserver (Gen1 or Gen2) and local unit testing (Gen1)
○ Testing and deploying your application: running locally (Gen2)
● Cloud Functions — Functions Framework
○ Functions Framework (local dev/testing; bundle function for Cloud Run)
○ Cloud Functions local development
○ Cloud Functions testing overview
○ Codelab: Local development with Cloud Functions (Node.js) using VSC
● Cloud Run — run Docker containers locally
○ Testing a Cloud Run service locally
○ Tutorial: Local troubleshooting of a Cloud Run service
BPs: Local testing Cloud emulators
● Cloud Datastore
○ Datastore emulator (non-App Engine or App Engine [Gen2])
○ App Engine Datastore emulator (Gen1 [or Gen2]; migrate to above)
● Firebase/Cloud Firestore
○ Firebase Emulator Suite (multiple product emulators; unit testing video)
○ Cloud Firestore emulator (w/in Firebase Emulator Suite; ex: React Native)
○ Cloud Storage emulator (w/in Firebase Emulator Suite; ex: React Native)
● Other Google Cloud emulators
○ Cloud Pub/Sub, Cloud Spanner, Cloud BigTable
● Others: Google Cloud Java test tools; BigQuery test kit (non-Google)
BPs: Best practices reading library
● Automated tracing & performance analysis to find app bottlenecks (GAE, Feb 2016)
● Best practices for coldstarts/startup time (GAE, Jun 2017)
● Profile your app's performance in production (GAE, Jun 2019)
● Managing serverless cost & reliability (all, Apr 2020)
● Serverless optimizations & efficiency (all, Jun 2020)
● Global load balancer and CDN for serverless (all, Jul 2020)
● Creating effective services with good response times (GCR, Node.js, Nov 2020)
● Cloud Run "min instances" to reduce coldstarts (GCR, Dec 2020)
● Running effective Node.js Cloud Functions (GCF, Node.js, Dec 2020)
● GCR container lifecycle (GCR, Jan 2021)
● Overall architecture best practices (GCR, Java, Apr 2021)
● Zero effort performance insights with tracing (all, Aug 2021)
● Cloud Functions "min instances" to reduce coldstarts (GCF, Aug 2021)
05
Inspirational Ideas
Build with ALL of Google
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
Big data analysis to slide presentation
Access GCP tools from Google Workspace (formerly G Suite)
Store big data results
Visualize big data results
Ingest data from Sheets
Link to chart in Sheets
Supercharge Workspace (G Suite) with GCP
Workspace (G Suite) GCP
BigQuery
Apps Script
Slides Sheets
Application
request
Big data
analytics
App summary
● Leverage GCP and build the "final mile" with Google Workspace (formerly G Suite)
● Driven by Google Apps Script
● Google BigQuery for data analysis
● Google Sheets for visualization
● Google Slides for presentable results
● "Glued" together w/Google Workspace (formerly G Suite) serverless
● Build this app (codelab): g.co/codelabs/bigquery-sheets-slides
● Video and blog post: bit.ly/2OcptaG
● Application source code: github.com/googlecodelabs/bigquery-sheets-slides
● Presented at Google Cloud NEXT (Jul 2018 [DEV229] & Apr 2019 [DEV212])
● cloud.withgoogle.com/next18/sf/sessions/session/156878
● cloud.withgoogle.com/next/sf/sessions?session=DEV212
06
Summary
Online resources &
references
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, 350k 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 using all of Google Cloud (GCP + Workspace)
● Documentation
○ GCP: cloud.google.com/{docs,appengine,functions,run,vision,automl,translate,language,
speech,texttospeech,video-intelligence,firestore,bigquery,compute,storage,gpu,tpu}
○ G Suite: developers.google.com/{workspace,drive,calendar,docs,sheets,slides,apps-script}
● Introductory "codelabs" (free, online, self-paced, hands-on tutorials [Python])
○ 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
○ Apps Script: g.co/codelabs/apps-script-intro
● Others: gcplab.me (GCP) & codelabs.developers.google.com/?cat=googleworkspace (Workspace)
● Videos: youtube.com/GoogleCloudPlatform (GCP) and goo.gl/JpBQ40 (Workspace)
● Samples: github.com/GoogleCloudPlatform (GCP) and github.com/googleworkspace (Workspace)
● Know AWS/Azure? Compare w/GCP at cloud.google.com/docs/compare/{aws,azure}
● Google Cloud serverless products: cloud.google.com/serverless
Google Cloud references
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

Mais conteĂșdo relacionado

Mais procurados

Powering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformPowering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformRomin Irani
 
Build with all of Google Cloud
Build with all of Google CloudBuild with all of Google Cloud
Build with all of Google Cloudwesley chun
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter GuideSimon Su
 
How to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalHow to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalAcquia
 
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 JavaKunal Dabir
 
30 days of Google Cloud Introduction
30 days of Google Cloud Introduction30 days of Google Cloud Introduction
30 days of Google Cloud IntroductionDeepikaRana30
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokImre Nagi
 
10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef Ahmed10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef AhmedZareef Ahmed
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App EngineColin Su
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform UpdatesRomin Irani
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type scriptBob German
 
Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRafael Casuso Romate
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine IntroductionSimon Su
 
Devfest09 App Engine Java
Devfest09  App Engine  JavaDevfest09  App Engine  Java
Devfest09 App Engine JavaChris Schalk
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Prateek Jain
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeJuarez Filho
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPressPantheon
 
Platform as a service google app engine
Platform as a service   google app enginePlatform as a service   google app engine
Platform as a service google app engineDeepu S Nath
 
Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016Suzanne Dergacheva
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App EngineSimon Su
 

Mais procurados (20)

Powering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformPowering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud Platform
 
Build with all of Google Cloud
Build with all of Google CloudBuild with all of Google Cloud
Build with all of Google Cloud
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter Guide
 
How to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalHow to Successfully Implement Headless Drupal
How to Successfully Implement Headless Drupal
 
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
 
30 days of Google Cloud Introduction
30 days of Google Cloud Introduction30 days of Google Cloud Introduction
30 days of Google Cloud Introduction
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 Depok
 
10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef Ahmed10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef Ahmed
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform Updates
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type script
 
Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend Developer
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine Introduction
 
Devfest09 App Engine Java
Devfest09  App Engine  JavaDevfest09  App Engine  Java
Devfest09 App Engine Java
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in Realtime
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPress
 
Platform as a service google app engine
Platform as a service   google app enginePlatform as a service   google app engine
Platform as a service google app engine
 
Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App Engine
 

Semelhante a Serverless computing with Google Cloud

Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackwesley 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
 
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 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'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
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Pythonwesley 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
 
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
 
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
 
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
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform UpdateIdo Green
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley 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 Cloudwesley 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 Cloudwesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)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
 
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
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Pythonwesley chun
 

Semelhante a Serverless computing with Google Cloud (20)

Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
 
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
 
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 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'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
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 
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
 
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)
 
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
 
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)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
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
 
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
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 
Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)Google Cloud @ Hackathons (2020)
Google Cloud @ Hackathons (2020)
 
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)
 
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
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 

Mais 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 Scriptwesley 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
 
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 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
 
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
 
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
 

Mais de wesley chun (12)

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)
 
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
 
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
 
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)
 
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
 

Último

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Serverless computing with Google Cloud

  • 1. Serverless computing with Google Cloud 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 Introduction to Google 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, Google 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, 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, OïŹƒce 365 Google App Engine, Cloud Functions Heroku, Cloud Foundry, Engine Yard, AWS Lambda
  • 4. 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 Cloud GCP & Google Workspace (formerly G Suite & Google Apps)
  • 5. YOUR NEXT APP? google.com/datacenter Nine products with 1B+ (monthly) users each, all powered by our cloud
  • 6. formerly ( ) Google Workspace Top-level documentation and comprehensive developers overview video at developers.google.com/gsuite (formerly G Suite and Google Apps) APIs
  • 7. 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 Apps Script Salesforce1/force.com Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, OïŹƒce 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 Google Cloud Platform vs. Google Workspace Workspace 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
  • 8. 03 Google Cloud serverless compute GCP and Google Workspace (formerly G Suite & Google Apps) > 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*?
  • 9. Serverless: what & why ● What is serverless? ○ Misnomer (a "PMM") :-) ○ "No worries" ○ Developers focus on writing code & solving business problems* ● Why serverless? ○ Fastest growing segment of cloud... per analyst research*: ■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021) and $14.93B (2023) ○ What if you go viral? Autoscaling: your new best friend ○ What if you don't? Code not running? You're not paying. * in USD; source:Forbes (May 2018), 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 Google Workspace (was G Suite/Google Apps) Yahoo!Mail, Hotmail, Salesforce, Netsuite, OïŹƒce 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
  • 10. Google App Engine App-hosting in the cloud Why does App Engine exist? ● Focus on app not DevOps ○ Web app ○ Mobile backend ○ Cloud service ● Enhance productivity ● Deploy globally ● Fully-managed ● Auto-scaling ● Pay-per-use ● Familiar languages ● Test w/local dev server
  • 11. Hello World (Python "MVP") app.yaml runtime: python38 main.py from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World!' requirements.txt Flask>=1.1.2 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
  • 12. 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 runtimes execute on legacy platform (2008-today) ○ Platform comes with bundled services ○ 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) ○ Platform no longer has bundled services ○ Runtimes: Python 3.7+, Java 11, Go 1.12+, PHP 7, Node.js 10+, Ruby 2.5+ ○ Less restrictions, richer/fuller, more idiomatic developer experience ● "Copying"/self-bundling 3P libraries requirement lifted ● No more proprietary services means apps more portable, less lock-in ● Opens door to more options: GAE, GCF, GCR; GKE, GCE; on-prem
  • 13. Google Cloud Functions Function-hosting in the cloud Why does Cloud Functions exist? ● Don't have entire app? ○ No framework "overhead" (LAMP, MEAN...) ○ Deploy microservices ● 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 ● Available runtimes ○ JS/Node.js 8, 10, 12, 14 ○ Python 3.7, 3.8, 3.9 ○ Go 1.11, 1.13 ○ Java 11 ○ Ruby 2.6, 2.7 ○ .NET Core 3.1
  • 14. main.py def hello_world(request): return 'Hello World!' Deploy: $ gcloud functions deploy hello --runtime python38 --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 Google Cloud Run Container-hosting in the cloud
  • 15. 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
  • 16. 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==1.1.2
  • 17. 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 ○ 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 app.py requirements.txt $ gcloud run deploy myapp --source .
  • 18. 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
  • 19. Sheets-bound “Hello World!” Apps Script intro goo.gl/1sXeuD What can you do with this?
  • 20. 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); GmailApp.sendEmail('friend@example.com', 'Map', 'See below.', {attachments:[map]}); } JS g.co/codelabs/apps-script-intro
  • 21. 04 In-practice Use cases, nebulousness & flexibility, best practices, local development & testing 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 APIs and services ✓ ✓ Data processing ✓ ✓ Automation Workflow & orchestration ✓ ✓ Event-driven automation ✓ ✓ Common use cases
  • 22. 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 app ○ Python 2 & 3 compatible ○ 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 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
  • 23. BPs: Tools (know your platforms) ● Google App Engine — gives users the ability to deploy source-based web applications or mobile backends to the cloud without the concerns of servers or autoscaling (PaaS). ● Cloud Functions — for scenarios where you may not have an entire app; great for microservices, one-off utilities, or event-driven functions (FaaS/PaaS). ● Cloud Run — provides the flexibility of containers (any language, library, binary) along with the convenience of serverless; use with Docker or "containerless" with Cloud Buildpacks. (CaaS) BPs: Latency ● Keep responses as short as possible (say <250ms) ○ Can't respond immediately? Split out longer jobs ○ Cloud Tasks, Cloud Pub/Sub, Cloud Scheduler (cron) ● Cache common objects, queries, output, etc. ○ Avoid repeated compute or database fetches ○ App Engine Memcache, Cloud Memorystore (Redis) ● Profile your code to find (and remove) bottlenecks ○ Cloud Profiler, Cloud Trace: low overhead insightful tools ● Consider moving some processing to client-side ○ Firebase/Cloud Firestore security rules, use edge-cache JS libs
  • 24. BPs: More on latency ● Pagespeed tools to analyze & optimize your web apps ○ developers.google.com/speed ● How to think about speed tools ○ developers.google.com/web/fundamentals/performance/speed-tools ● Why speed matters post ○ web.dev/why-speed-matters ● 250ms too general? More specifics: ○ developers.google.com/speed/docs/insights/v5/about#categories BPs: Still more on latency ● What about non-UI workloads > 250ms? ○ App Engine autoscaling timeout: 1 min (Gen1), 10 mins (Gen2) ○ App Engine basic & manual scaling timeout: 24 hrs (Gen1/Gen2) ○ GAE cron & task queue timeout: 10 mins (Gen1-AS), 24 hrs (Gen1-B/MS) ○ Cloud Tasks HTTP targets: 10 mins (default), 30 mins (max); App Engine (Gen2) targets: same as GAE Std Gen1 task queue timeouts (10m/24h) ○ Cloud Scheduler HTTP targets: from 15 secs to 30 mins, App Engine targets: from 15 secs to 24 hrs ○ Cloud Functions extended timeout: 1 min (default), 9 mins (max) ○ Cloud Run extended timeout: 5 mins (default), 1 hr (max) ○ Cloud Run Jobs (preview): tasks (1 hr each), jobs (>=1 tasks): 24 hrs
  • 25. BPs: Architecture ● Going "stateless" is key ○ Get a request, perform a service, then return response ● Cache common objects, queries, output, etc. ○ Cache sessions elsewhere (cache, not in app); framework-provided? ○ Use database external to app (Cloud Datastore/Firestore; Cloud SQL) ● Breakup monoliths into multiple microservices ○ Loosely-coupled code elements; shared caching & database ● Change monitoring scenery ○ Focus on user, business, app metrics; not HW (CPU, RAM) or networking BPs: More on stateless (architecture) ● Going "stateless" may be a large architectural change ○ Requires somewhat of a "mental reset" ● Receiving duplicate or retry requests? Logic should be idempotent. ○ This means neither side effects nor data corruption ○ What about job interruption and restarts? Same thing. ● Create repeatable logic exhibiting same behavior for given set of input regardless of how often repeated ○ Save output to different location than input, leaving input data intact ○ If job runs again, should result in identical processing & same output
  • 26. BPs: Even more on stateless ● Create unique ID for output to confirm work completed & avoid duplication ○ Duplicate data represents "collection-level" corruption; downstream systems possibly affected if they assume unique records ● When/where possible, checkpoint long-running jobs, so
 ○ Periodically write partial results to persistent storage, e.g., DB, GCS, etc. ○ Failure restarts/retries can pick up where it left off (vs. from beginning) ○ Speeds up jobs and minimizes unnecessary costs ● Consider breaking-up larger workloads ○ Especially those large enough not easily "checkpointable" ○ Creates smaller tasks more likely to complete (granted more tasks) BPs: Development ● Prototype rapidly ○ Use favorite language and get something up-and-going ○ Serverless platforms each come w/default service accounts ○ When ready for production, switch to user-managed service accounts ○ Follows best practice of "least privileges" ● Create separate projects for dev, test, stage, and prod ○ Helps keep developers, testers, operators isolated to own sandbox ○ Can share via IAM roles/permissions (shared buckets, databases, etc.) ● Local development and testing ○ Running locally tests functionality, not scaling ○ Typically can use local web framework server, SDK, or Docker
  • 27. BPs: Local development/testing ● App Engine — local or framework devserver ○ Local devserver (Gen1 or Gen2) and local unit testing (Gen1) ○ Testing and deploying your application: running locally (Gen2) ● Cloud Functions — Functions Framework ○ Functions Framework (local dev/testing; bundle function for Cloud Run) ○ Cloud Functions local development ○ Cloud Functions testing overview ○ Codelab: Local development with Cloud Functions (Node.js) using VSC ● Cloud Run — run Docker containers locally ○ Testing a Cloud Run service locally ○ Tutorial: Local troubleshooting of a Cloud Run service BPs: Local testing Cloud emulators ● Cloud Datastore ○ Datastore emulator (non-App Engine or App Engine [Gen2]) ○ App Engine Datastore emulator (Gen1 [or Gen2]; migrate to above) ● Firebase/Cloud Firestore ○ Firebase Emulator Suite (multiple product emulators; unit testing video) ○ Cloud Firestore emulator (w/in Firebase Emulator Suite; ex: React Native) ○ Cloud Storage emulator (w/in Firebase Emulator Suite; ex: React Native) ● Other Google Cloud emulators ○ Cloud Pub/Sub, Cloud Spanner, Cloud BigTable ● Others: Google Cloud Java test tools; BigQuery test kit (non-Google)
  • 28. BPs: Best practices reading library ● Automated tracing & performance analysis to find app bottlenecks (GAE, Feb 2016) ● Best practices for coldstarts/startup time (GAE, Jun 2017) ● Profile your app's performance in production (GAE, Jun 2019) ● Managing serverless cost & reliability (all, Apr 2020) ● Serverless optimizations & efficiency (all, Jun 2020) ● Global load balancer and CDN for serverless (all, Jul 2020) ● Creating effective services with good response times (GCR, Node.js, Nov 2020) ● Cloud Run "min instances" to reduce coldstarts (GCR, Dec 2020) ● Running effective Node.js Cloud Functions (GCF, Node.js, Dec 2020) ● GCR container lifecycle (GCR, Jan 2021) ● Overall architecture best practices (GCR, Java, Apr 2021) ● Zero effort performance insights with tracing (all, Aug 2021) ● Cloud Functions "min instances" to reduce coldstarts (GCF, Aug 2021) 05 Inspirational Ideas Build with ALL of Google
  • 29. Custom intelligence in Gmail Analyze Google Workspace (formerly G Suite) data with GCP
  • 30. 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
  • 31. ● 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 Big data analysis to slide presentation Access GCP tools from Google Workspace (formerly G Suite)
  • 32. Store big data results
  • 33. Visualize big data results Ingest data from Sheets
  • 34. Link to chart in Sheets
  • 35. Supercharge Workspace (G Suite) with GCP Workspace (G Suite) GCP BigQuery Apps Script Slides Sheets Application request Big data analytics App summary ● Leverage GCP and build the "final mile" with Google Workspace (formerly G Suite) ● Driven by Google Apps Script ● Google BigQuery for data analysis ● Google Sheets for visualization ● Google Slides for presentable results ● "Glued" together w/Google Workspace (formerly G Suite) serverless ● Build this app (codelab): g.co/codelabs/bigquery-sheets-slides ● Video and blog post: bit.ly/2OcptaG ● Application source code: github.com/googlecodelabs/bigquery-sheets-slides ● Presented at Google Cloud NEXT (Jul 2018 [DEV229] & Apr 2019 [DEV212]) ● cloud.withgoogle.com/next18/sf/sessions/session/156878 ● cloud.withgoogle.com/next/sf/sessions?session=DEV212
  • 36. 06 Summary Online resources & references 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, 350k 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 $$
  • 37. 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 using all of Google Cloud (GCP + Workspace) ● Documentation ○ GCP: cloud.google.com/{docs,appengine,functions,run,vision,automl,translate,language, speech,texttospeech,video-intelligence,firestore,bigquery,compute,storage,gpu,tpu} ○ G Suite: developers.google.com/{workspace,drive,calendar,docs,sheets,slides,apps-script} ● Introductory "codelabs" (free, online, self-paced, hands-on tutorials [Python]) ○ 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 ○ Apps Script: g.co/codelabs/apps-script-intro ● Others: gcplab.me (GCP) & codelabs.developers.google.com/?cat=googleworkspace (Workspace) ● Videos: youtube.com/GoogleCloudPlatform (GCP) and goo.gl/JpBQ40 (Workspace) ● Samples: github.com/GoogleCloudPlatform (GCP) and github.com/googleworkspace (Workspace) ● Know AWS/Azure? Compare w/GCP at cloud.google.com/docs/compare/{aws,azure} ● Google Cloud serverless products: cloud.google.com/serverless Google Cloud references
  • 38. 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