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

More Related Content

What's hot

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 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)wesley chun
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloudwesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Code driven development in drupal
Code driven development in drupalCode driven development in drupal
Code driven development in drupalAndriy Yun
 
Drupal contributor HOWTO
Drupal contributor HOWTODrupal contributor HOWTO
Drupal contributor HOWTOAndriy Yun
 
Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)wesley chun
 
Google App Engine Overview and Update
Google App Engine Overview and UpdateGoogle App Engine Overview and Update
Google App Engine Overview and UpdateChris Schalk
 
JHipster Code 2020 keynote
JHipster Code 2020 keynoteJHipster Code 2020 keynote
JHipster Code 2020 keynoteJulien Dubois
 
World is changed. i feel it in the front end
World is changed. i feel it in the front endWorld is changed. i feel it in the front end
World is changed. i feel it in the front endAndriy Yun
 
Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudChris Schalk
 
How to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudHow to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudChris Schalk
 
Drupal core indeas - Andy Postnikov
Drupal core indeas  - Andy PostnikovDrupal core indeas  - Andy Postnikov
Drupal core indeas - Andy PostnikovDrupalCamp Kyiv
 
Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIswesley chun
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...rtCamp
 
Google App Engine Developer - Day1
Google App Engine Developer - Day1Google App Engine Developer - Day1
Google App Engine Developer - Day1Simon Su
 
Rapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for JavaRapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for JavaKunal Dabir
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesChris Schalk
 
JHipster overview
JHipster overviewJHipster overview
JHipster overviewJulien Dubois
 
Building Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesBuilding Integrated Applications on Google's Cloud Technologies
Building Integrated Applications on Google's Cloud TechnologiesChris Schalk
 

What's hot (20)

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

Similar to Introduction to Serverless Computing on Google Cloud

Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to presentwesley chun
 
G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopwesley 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
 
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
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google 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 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)wesley chun
 
Cloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google CloudCloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google Cloudwesley 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
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley chun
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform UpdateIdo Green
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptwesley 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
 
Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)Cloud computing overview & running your code on Google Cloud (Jun 2019)
Cloud computing overview & running your code on Google Cloud (Jun 2019)wesley chun
 
Intro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google CloudIntro to cloud computing & running your code on Google Cloud
Intro to cloud computing & running your code on Google 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
 
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
 
Google Developers Overview Deck 2015
Google Developers Overview Deck 2015Google Developers Overview Deck 2015
Google Developers Overview Deck 2015Houssem Eddine LASSOUED
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
 

Similar to Introduction to Serverless Computing on Google Cloud (20)

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

More from wesley chun

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

More from wesley chun (10)

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

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 

Introduction to Serverless Computing on Google Cloud

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