SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Firebase Cloud Functions
the GA, the Beta, and the Ugly
Joseph Lust mabl engineer @lustcoder
“The secret of change is to focus all of your
energy, not on fighting the old, but on building
the new.”
–Socrates
startups must push or perish
4
serverless just works
■ No Provisioning
■ Transparent Scaling
■ Event Driven
■ Pay only for Use
5
how developers deploy code
2014
2007 2013
VPS
Machine
Image
Docker
Containers
war File
AWS
Lambda
6
2000
Container Era
Serverless Era
Firebase
CF
Serverless functions
GCF
2016 2017
event driven all the way
Trigger Events Firebase CF GCF
Cloud Storage Events ✔ ✔
PubSub Topics ✔ ✔
HTTP Endpoint ✔ ✔
Auth Events ✔ ✘
Database Events ✔ ✘
Google Analytics Events ✔ ✘
7
no function provider is a clear winner
Features Firebase CF GCF
Stackdriver Error Reports ✔ ✔
Cloud Logging ✔ ✔
Environment Configs ✔ ✘
Code Based Wireup ✔ ✘
Rich Function Dashboard ✘ ✔
Deployment Wireup ✘ ✔
SCM Base Deploy ✘ ✔
8
function clarity through dashboards
9
live function health tracking
10
but, there are some speed bumps...
12
the ugly: firebase cloud functions
■ All functions run as FB project Editor
■ No failure retry semantics
■ Cannot access resources cross project
■ CLI deploy requires rigid project layout
■ Automatic undeploy of all functions for non-standard layouts
■ Slow deployment ~ 5min
13
the uglier: gcf
■ Cannot pass configs to function
■ No failure retry semantics
■ All functions run as project Editor
■ Complex multi-module deploy
▲ Impossible from SCM deploy
■ Slow deployment ~ 2min
■ Non-Deterministic Deployment Failures
■ Single Supported Region (Iowa US-Centra1)
14
functions are not designed for failure
15
functions require total trust
16
blazing fast function deployment
17
lossy pubsub deployments
18
work arounds to the rescue
19
work around the warts
■ Load ServiceAccount key from KMS encrypted CS file
■ Cache resources between function calls
■ Use Firebase Admin lib from GCF
▲ Best of most worlds
■ Use the lowest sensible memory and timeout limits
■ Use --local-path and --include-ignored-files for multi-module deploy
20
embrace serverless
■ to focus on shipping code
■ to harness NodeJS microservices
■ to power low latency experiences
■ to provision, deploy, and scale automatically
21
cloud functions resources
■ FB CF Examples Repo: github.com/firebase/functions-samples
■ GCF Examples: github.com/GoogleCloudPlatform/nodejs-docs-samples
■ I/O 2017 CF Presentations
▲ Building the Fire!sale demo app: youtu.be/G-MBeEW92v4
▲ FB and ML with CF: youtu.be/RdqV_N0sCpM
▲ FB CF and Testability: youtu.be/SnWwkURpwxs
▲ Data Pipelines with CF: youtu.be/guo-4IOqx2M
22
Questions?
gcf is cheaper by half
■ FB CF 125K req/mo FREE, 2.5M/ $1
■ GCF 2M req/mo FREE, 5M/ $1 after
* Also see execution time, bandwidth, and memory costs
Source GCP Pricing, FB Pricing
24

Weitere ähnliche Inhalte

Was ist angesagt?

Serverless with Google Cloud Functions
Serverless with Google Cloud FunctionsServerless with Google Cloud Functions
Serverless with Google Cloud FunctionsJerry Jalava
 
Serverless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKServerless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKKriangkrai Chaonithi
 
Introduction to Serverless and Google Cloud Functions
Introduction to Serverless and Google Cloud FunctionsIntroduction to Serverless and Google Cloud Functions
Introduction to Serverless and Google Cloud FunctionsMalepati Bala Siva Sai Akhil
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker kloia
 
Kubeflow on google kubernetes engine
Kubeflow on google kubernetes engineKubeflow on google kubernetes engine
Kubeflow on google kubernetes engineBear Su
 
Going Microserverless on Google Cloud
Going Microserverless on Google CloudGoing Microserverless on Google Cloud
Going Microserverless on Google CloudJoseph Lust
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablJoseph Lust
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud:  more dev, less opsServerless Apps on Google Cloud:  more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsJoseph Lust
 
GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享Simon Su
 
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017Codemotion
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Experiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlExperiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlOkis Chuang
 
Introduction to Modern DevOps Technologies
Introduction to  Modern DevOps TechnologiesIntroduction to  Modern DevOps Technologies
Introduction to Modern DevOps TechnologiesKriangkrai Chaonithi
 
From training to explainability via git ops
From training to explainability via git opsFrom training to explainability via git ops
From training to explainability via git opsRyan Dawson
 
Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018☁️ Mikhail Shilkov
 

Was ist angesagt? (16)

Serverless with Google Cloud Functions
Serverless with Google Cloud FunctionsServerless with Google Cloud Functions
Serverless with Google Cloud Functions
 
Serverless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKServerless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OK
 
Introduction to Serverless and Google Cloud Functions
Introduction to Serverless and Google Cloud FunctionsIntroduction to Serverless and Google Cloud Functions
Introduction to Serverless and Google Cloud Functions
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker
 
Kubeflow on google kubernetes engine
Kubeflow on google kubernetes engineKubeflow on google kubernetes engine
Kubeflow on google kubernetes engine
 
Going Microserverless on Google Cloud
Going Microserverless on Google CloudGoing Microserverless on Google Cloud
Going Microserverless on Google Cloud
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mabl
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud:  more dev, less opsServerless Apps on Google Cloud:  more dev, less ops
Serverless Apps on Google Cloud: more dev, less ops
 
GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享
 
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017
Life of a startup - Sjoerd Mulder - Codemotion Amsterdam 2017
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Experiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlExperiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and Postgresql
 
Introduction to Modern DevOps Technologies
Introduction to  Modern DevOps TechnologiesIntroduction to  Modern DevOps Technologies
Introduction to Modern DevOps Technologies
 
CloudDesignPatterns
CloudDesignPatternsCloudDesignPatterns
CloudDesignPatterns
 
From training to explainability via git ops
From training to explainability via git opsFrom training to explainability via git ops
From training to explainability via git ops
 
Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018Performance Tales of Serverless - CloudNative London 2018
Performance Tales of Serverless - CloudNative London 2018
 

Ähnlich wie Firebase Cloud Functions: a quick overview

Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Googlemabl
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsServerless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsmabl
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablmabl
 
Up and Running with firebase
Up and Running with firebaseUp and Running with firebase
Up and Running with firebaseMd. Sadhan Sarker
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionBrion Mario
 
Automation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataAutomation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataYan Wang
 
Spring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCFSpring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCFLars Rosenquist
 
Serverless preview environments to the rescue
Serverless preview environments to the rescueServerless preview environments to the rescue
Serverless preview environments to the rescueJoseph Lust
 
Best practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudBest practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudOleg Posyniak
 
Advanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the FieldAdvanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the FieldAriel Moskovich
 
Cloud Native Java Development Patterns
Cloud Native Java Development PatternsCloud Native Java Development Patterns
Cloud Native Java Development PatternsBilgin Ibryam
 
Serverless Architecture GCP In Production
Serverless Architecture GCP In ProductionServerless Architecture GCP In Production
Serverless Architecture GCP In ProductionOliver Fierro
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...NETWAYS
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE Corporation
 
Serverless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsServerless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsJoseph Lust
 
State of serverless
State of serverlessState of serverless
State of serverlessAnurag Saran
 
The FN Project by Maximilian Jerg
The FN Project by Maximilian JergThe FN Project by Maximilian Jerg
The FN Project by Maximilian JergHarald Schmaldienst
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composerBruce Kuo
 
Cloud-native Java EE-volution
Cloud-native Java EE-volutionCloud-native Java EE-volution
Cloud-native Java EE-volutionQAware GmbH
 

Ähnlich wie Firebase Cloud Functions: a quick overview (20)

Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Google
 
Serverless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less opsServerless Apps on Google Cloud: more dev, less ops
Serverless Apps on Google Cloud: more dev, less ops
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mabl
 
Up and Running with firebase
Up and Running with firebaseUp and Running with firebase
Up and Running with firebase
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase Session
 
Automation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataAutomation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure Data
 
Spring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCFSpring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCF
 
Serverless preview environments to the rescue
Serverless preview environments to the rescueServerless preview environments to the rescue
Serverless preview environments to the rescue
 
Best practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudBest practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on Cloud
 
Advanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the FieldAdvanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the Field
 
Cloud Native Java Development Patterns
Cloud Native Java Development PatternsCloud Native Java Development Patterns
Cloud Native Java Development Patterns
 
Serverless Architecture GCP In Production
Serverless Architecture GCP In ProductionServerless Architecture GCP In Production
Serverless Architecture GCP In Production
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
 
Serverless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOpsServerless Preview Environments @ Boston DevOps
Serverless Preview Environments @ Boston DevOps
 
State of serverless
State of serverlessState of serverless
State of serverless
 
The FN Project by Maximilian Jerg
The FN Project by Maximilian JergThe FN Project by Maximilian Jerg
The FN Project by Maximilian Jerg
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composer
 
Sprint 17
Sprint 17Sprint 17
Sprint 17
 
Cloud-native Java EE-volution
Cloud-native Java EE-volutionCloud-native Java EE-volution
Cloud-native Java EE-volution
 

Kürzlich hochgeladen

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Firebase Cloud Functions: a quick overview

  • 1. Firebase Cloud Functions the GA, the Beta, and the Ugly Joseph Lust mabl engineer @lustcoder
  • 2.
  • 3. “The secret of change is to focus all of your energy, not on fighting the old, but on building the new.” –Socrates
  • 4. startups must push or perish 4
  • 5. serverless just works ■ No Provisioning ■ Transparent Scaling ■ Event Driven ■ Pay only for Use 5
  • 6. how developers deploy code 2014 2007 2013 VPS Machine Image Docker Containers war File AWS Lambda 6 2000 Container Era Serverless Era Firebase CF Serverless functions GCF 2016 2017
  • 7. event driven all the way Trigger Events Firebase CF GCF Cloud Storage Events ✔ ✔ PubSub Topics ✔ ✔ HTTP Endpoint ✔ ✔ Auth Events ✔ ✘ Database Events ✔ ✘ Google Analytics Events ✔ ✘ 7
  • 8. no function provider is a clear winner Features Firebase CF GCF Stackdriver Error Reports ✔ ✔ Cloud Logging ✔ ✔ Environment Configs ✔ ✘ Code Based Wireup ✔ ✘ Rich Function Dashboard ✘ ✔ Deployment Wireup ✘ ✔ SCM Base Deploy ✘ ✔ 8
  • 10. live function health tracking 10
  • 11.
  • 12. but, there are some speed bumps... 12
  • 13. the ugly: firebase cloud functions ■ All functions run as FB project Editor ■ No failure retry semantics ■ Cannot access resources cross project ■ CLI deploy requires rigid project layout ■ Automatic undeploy of all functions for non-standard layouts ■ Slow deployment ~ 5min 13
  • 14. the uglier: gcf ■ Cannot pass configs to function ■ No failure retry semantics ■ All functions run as project Editor ■ Complex multi-module deploy ▲ Impossible from SCM deploy ■ Slow deployment ~ 2min ■ Non-Deterministic Deployment Failures ■ Single Supported Region (Iowa US-Centra1) 14
  • 15. functions are not designed for failure 15
  • 17. blazing fast function deployment 17
  • 19. work arounds to the rescue 19
  • 20. work around the warts ■ Load ServiceAccount key from KMS encrypted CS file ■ Cache resources between function calls ■ Use Firebase Admin lib from GCF ▲ Best of most worlds ■ Use the lowest sensible memory and timeout limits ■ Use --local-path and --include-ignored-files for multi-module deploy 20
  • 21. embrace serverless ■ to focus on shipping code ■ to harness NodeJS microservices ■ to power low latency experiences ■ to provision, deploy, and scale automatically 21
  • 22. cloud functions resources ■ FB CF Examples Repo: github.com/firebase/functions-samples ■ GCF Examples: github.com/GoogleCloudPlatform/nodejs-docs-samples ■ I/O 2017 CF Presentations ▲ Building the Fire!sale demo app: youtu.be/G-MBeEW92v4 ▲ FB and ML with CF: youtu.be/RdqV_N0sCpM ▲ FB CF and Testability: youtu.be/SnWwkURpwxs ▲ Data Pipelines with CF: youtu.be/guo-4IOqx2M 22
  • 24. gcf is cheaper by half ■ FB CF 125K req/mo FREE, 2.5M/ $1 ■ GCF 2M req/mo FREE, 5M/ $1 after * Also see execution time, bandwidth, and memory costs Source GCP Pricing, FB Pricing 24