Slide 1

Slide 1 text

Serverless Micronaut on Google Cloud Platform Developer Advocate Google

Slide 2

Slide 2 text

Guillaume Laforge Image safe area @glaforge

Slide 3

Slide 3 text

@glaforge Google Cloud Platform

Slide 4

Slide 4 text

@glaforge https://cloud.google.com/about/locations/ A Big Global Network of Data Centers

Slide 5

Slide 5 text

Panorama Machine Learning Cloud ML Platform Vision API Video Intelligence API Speech API Translate API NLP API ... Compute Compute Engine App Engine Kubernetes Engine Container Registry Cloud Run Cloud Functions ... Networking Cloud Virtual Network Cloud Load Balancing Cloud CDN Cloud Interconnect Cloud DNS ... Storage & Databases Cloud Storage Cloud Bigtable Cloud Firestore Cloud SQL Cloud Spanner ... Big Data BigQuery Cloud Dataflow Cloud Dataproc Cloud Dataprep Cloud Datalab Cloud Pub/Sub Genomics ... Management Monitoring Logging Error Reporting Debugger Deployment Manager ... Developer Cloud SDK Cloud Source Repositories Cloud Endpoints IDE plugins Cloud Test Lab Cloud Build Cloud Build Artifacts ... Identity & Security Cloud IAM Cloud IAP Cloud KMS Cloud Secret Manager Cloud Resource Manager Cloud Security Scanner Cloud Platform Security ...

Slide 6

Slide 6 text

Virtual Machine OS Application Runtime Application Virtual Hardware Dedicated Server OS Application Runtime Application Virtual Hardware Containers OS Application Runtime Application Virtual Hardware Functions Functions Functions Application Platform OS Application Runtime Application Virtual Hardware Functions Serverless OS Application Runtime Application Virtual Hardware Functions Infrastructure Container Platform Function Compute Engine Kubernetes Engine App Engine Cloud Functions On-Premises Serverless Zone Physical Hardware Cloud Run

Slide 7

Slide 7 text

Operational Model Programming Model No Infra Management Managed Security Pay only for usage Service-based Event-driven Open Operational & Programming Models

Slide 8

Slide 8 text

Serverless HTTP applications Sourced-based web apps App Engine Serverless functions and events Source-based event driven functions Cloud Functions Serverless HTTP containers Fully managed HTTP req/res containers HTTP req/res containers on GKE Cloud Run Google Cloud Compute Serverless Options

Slide 9

Slide 9 text

Cloud Functions

Slide 10

Slide 10 text

Cloud Functions as a cloud glue Access 20+ Google services from GCF Cloud Storage Cloud Pub/Sub HTTPS Firebase Cloud Scheduler Cloud Tasks

Slide 11

Slide 11 text

Cloud Functions runtimes NEW!

Slide 12

Slide 12 text

HTTP functions Cloud Functions provides a URL for your function Invoked by an HTTP call GET, POST, PUT, DELETE, OPTIONS Function replies with HTTP response Header, body, status code, etc. Background functions React to events in your cloud infrastructure Pub/Sub message on a topic New file on Cloud Storage Change in Cloud Firestore docs Audit log event Two Types of Functions

Slide 13

Slide 13 text

DEMO Micronaut HTTP & Background Functions

Slide 14

Slide 14 text

App Engine

Slide 15

Slide 15 text

Serverless, but for your whole web app and not just single functions Goal: let developers focus on code, GCP handle the rest Open-source, idiomatic experience Use any library, extension, binary, or framework Java, Python, Node.js, PHP, Ruby, Go What’s App Engine?

Slide 16

Slide 16 text

Scale up / down quickly One vs. multiple concurrent requests Traffic splitting across versions (A/B testing, Canary or Blue/Green depl.) CDN static asset serving Concurrency & Scaling Traffic Traffic

Slide 17

Slide 17 text

DEMO Micronaut Application on Google App Engine

Slide 18

Slide 18 text

Cloud Run

Slide 19

Slide 19 text

Any language Any library Any binary Ecosystem of base images Cloud Run .js .rb .go .py .java … 0 1 0 1 0 0 1 1 1

Slide 20

Slide 20 text

Cloud Run Cloud Run Fully managed, deploy your workloads and don’t see the cluster. Cloud Run on Anthos Deploy into Anthos, run serverless side-by-side with your existing workloads. Knative Everywhere Use the same APIs and tooling anywhere you run Kubernetes with Knative.

Slide 21

Slide 21 text

Listen on 0.0.0.0 on port $PORT (default 8080) HTTP server must start < 4 min (timeout → 504) Request time < 15 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (no background activity) Container Contract

Slide 22

Slide 22 text

Pay Per Use CPU / Memory / Requests 100ms

Slide 23

Slide 23 text

Billable Time Instance Billable Time Request 1 Start Request 1 End Request 2 Start Request 2 End Instance Time Billable Non-billable

Slide 24

Slide 24 text

DEMO Building a Micronaut container image with Jib and deploy on Cloud Run

Slide 25

Slide 25 text

Summary

Slide 26

Slide 26 text

Google Cloud allows you to run your Micronaut functions, apps, and containers on: ● App Engine ● Cloud Functions ● Cloud Run Take advantage of the various data storage, communication channels, machine learning options… Why Micronaut? Because it starts fast and consumes less memory than the competition! Run Micronaut Serverlessly!

Slide 27

Slide 27 text

Proprietary + Confidential Thank you Questions & Answers Guillaume Laforge — @glaforge