SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
FIREBASE CLOUD
FUNCTIONS V2
And friends....
whoami - I Am !Groot
Aviv Laufer
CTO as a Service - https://42-golems.io/
@avivl
42-golems.io
A Brief History of Firebase
● 2014 Acquired by Google, Firebase Hosting & Authentication.
● 2016 Analytics, Messaging.
● Firebase, a real-time document database.
● Cloud Firestore scalable NoSQL cloud database.
● Cloud Functions
● Remote Config
● And much more https://firebase.google.com/products-build
42-golems.io
“Cloud Functions for Firebase is a serverless framework that lets you
automatically run backend code in response to events triggered by Firebase
features and HTTPS requests. Your JavaScript or TypeScript code is stored in
Google's cloud and runs in a managed environment. There's no need to
manage and scale your own servers.“
Firebase Functions the Shpiel
42-golems.io
The Shpiel continues...
After you write and deploy a function, Google's servers begin to manage the function
immediately. You can fire the function directly with an HTTP request, or, in the case of
background functions, Google's servers will listen for events and run the function when it
is triggered.
● Cloud Firestore triggers
● Realtime Database triggers
● Remote Config triggers
● Firebase Authentication triggers
● Google Analytics triggers
● Cloud Storage triggers
● Pub/Sub triggers
42-golems.io
Welcome to V2
Powered by Cloud Run and Eventarc, Cloud Functions for Firebase (2nd gen) has
the potential to give you more powerful infrastructure, advanced control over
performance and scalability, and more control of the functions runtime.
42-golems.io
Cloud Run
● Fully managed
● Excellent for stateless containers.
● Serverless
● Built on top of Knative.
● Comes in 2 flavorus.
Shameless Plug
Taking Google Cloud Run for a spin
Hacking Google Cloud Run
42-golems.io
Eventarc
Eventarc lets you build event-driven architectures without having to implement, customize, or maintain the underlying
infrastructure. Eventarc offers a standardized solution to manage the flow of state changes, called events, between
decoupled microservices. When triggered, Eventarc routes these events through Pub/Sub subscriptions to various
destinations (in this document, see Event destinations) while managing delivery, security, authorization, observability, and
error-handling for you.
42-golems.io
What's new in Cloud Functions for Firebase (2nd gen)
● Function instances can now execute more than one request at a time.
● Secure your callable and HTTP functions with a new `cors` setting.
42-golems.io
● HTTP functions can now have a 1 hour timeout (up from 9 minutes
previously).
● Function instances now default to the default compute service account rather
than the app engine service account.
● New trigger types include Firebase Alerts, triggers custom event triggers for
Firebase Extensions, and task queue functions. .
What's new cont...
42-golems.io
V2 Triggers
● Firebase Realtime Database
● Cloud Storage
● Firebase Alerts
● Pub/Sub
● Callables
● Cloud Tasks
● HTTP
● Scheduled functions
● Firebase Authentication blocking
functions
● Firebase Remote Config
● Firebase Test Lab
42-golems.io
Not supported triggers (for now)
● Cloud Firestore
● Firebase Authentication `onCreate` and `onDelete`
● Google Analytics
42-golems.io
From V1 to V2 and beyond
42-golems.io
Call functions directly
● Call functions from your app
● Call functions via HTTP requests
● Enqueue functions with Cloud Tasks
● Run functions on schedule
42-golems.io
Trigger background functions
● Firebase Alerts triggers
● Custom event/extension triggers
● Blocking Auth triggers
● Pub/Sub triggers
● Realtime Database Triggers
● Remote Config Triggers
● Cloud Storage triggers
● Test Lab Triggers
42-golems.io
Custom event triggers/extensions NEW!
Firebase Extensions:
● Firebase Extensions help you deploy functionality to your app quickly with pre-packaged solutions.
● Once installed, a Firebase Extension performs a specific task or set of tasks in response to HTTPS
requests, Cloud Scheduler events, or to triggering events from other Firebase products, like Cloud
Firestore or Firebase Cloud Messaging.
● Available on the extensions Marketplace
42-golems.io
Extensions
● Stream Collections to BigQuery
● Resize Images
● Delete User Data
● Trigger Email
● Send Invoices using Stripe
● Send Messages with Twilio
● And many more....
42-golems.io
When you upload a file to your specified Cloud Storage bucket, this extension:
Detects if the file is an image. If it is, then:
● Creates a resized image with your specified dimensions.
● Names the resized image using the same name as the original uploaded
image, but suffixed with your specified width and height.
● Stores the resized image in the same Storage bucket as the original uploaded
image.
Resize Images
42-golems.io
42-golems.io
Authentication blocking triggers
Blocking functions let you execute custom code that modifies the result of a user registering or
signing in to your app. For example, you can prevent a user from authenticating if they don't meet
certain criteria, or update a user's information before returning it to your client app.
You can register blocking functions for two events:
● beforeUserCreated: Triggers before a new user is saved to the Firebase Authentication
database, and before a token is returned to your client app.
● beforeUserSignedIn: Triggers after a user's credentials are verified, but before Firebase
Authentication returns an ID token to your client app. If your app uses multi-factor
authentication, the function triggers after the user verifies their second factor. Note that
creating a new user also triggers beforeUserSignedIn, in addition to beforeUserCreated.
42-golems.io
42-golems.io
High Noon
42-golems.io
And the winner is....
● The test was configured to run up to 20 VUs for 6 minutes
● Using K6
42-golems.io
Life behind Firebase - Cloud Functions (2nd gen)
● Longer request processing - Up to 60 mins for HTTP functions.
● Larger instances - Up to 16GB of RAM and 4 vCPUs
● Concurrency - Up to 1000 concurrent requests with a single function.
● Minimum instances - Provide for pre-warmed instances to cut your cold starts and make sure the
bootstrap time of your application does not impact application performance.
● Traffic splitting - Support multiple revisions of your functions, splitting traffic between different
revisions and rolling your function back to a prior version.
● Event Sources - Native support for Eventarc, which brings over 90+ event sources from direct
sources and Cloud Audit logs (e.g., BigQuery, Cloud SQL, Cloud Storage, Firebase...)
42-golems.io
42-golems.io
Thank You!
42-golems.io

Contenu connexe

Tendances

우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스Arawn Park
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cacheSebastian Andrasoni
 
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...GustavoMaciel67
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and AlertingKhairul Zebua
 
Google Firebase Presentation
Google Firebase PresentationGoogle Firebase Presentation
Google Firebase PresentationAeni Patel
 
CI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate ListCI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate ListPlutora
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsThomas Poetter
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioAraf Karsh Hamid
 
API Gateway Use Cases​ for Kubernetes​
API Gateway Use Cases​ for Kubernetes​API Gateway Use Cases​ for Kubernetes​
API Gateway Use Cases​ for Kubernetes​NGINX, Inc.
 
Apache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceApache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceSijie Guo
 
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문[AWSKRUG 컨테이너 소모임] Rancher 기본 입문
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문Hyunmin Kim
 
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)Brian Brazil
 
Firestore: The Basics
Firestore: The BasicsFirestore: The Basics
Firestore: The BasicsJielynn Diroy
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기AWSKRUG - AWS한국사용자모임
 

Tendances (20)

우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스
 
Firebase Overview
Firebase OverviewFirebase Overview
Firebase Overview
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cache
 
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...
Visualizing Google Cloud 101 Illustrated References for Cloud Engineers and A...
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and Alerting
 
Google Firebase Presentation
Google Firebase PresentationGoogle Firebase Presentation
Google Firebase Presentation
 
Google Firebase presentation - English
Google Firebase presentation - EnglishGoogle Firebase presentation - English
Google Firebase presentation - English
 
CI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate ListCI/CD Tools Universe: The Ultimate List
CI/CD Tools Universe: The Ultimate List
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & Infographics
 
Microservices
MicroservicesMicroservices
Microservices
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
 
API Gateway Use Cases​ for Kubernetes​
API Gateway Use Cases​ for Kubernetes​API Gateway Use Cases​ for Kubernetes​
API Gateway Use Cases​ for Kubernetes​
 
Apache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceApache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage Service
 
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문[AWSKRUG 컨테이너 소모임] Rancher 기본 입문
[AWSKRUG 컨테이너 소모임] Rancher 기본 입문
 
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
 
Firestore: The Basics
Firestore: The BasicsFirestore: The Basics
Firestore: The Basics
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
 
Cloud Pub_Sub
Cloud Pub_SubCloud Pub_Sub
Cloud Pub_Sub
 

Similaire à Firebase Cloud Functions V2

GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...Oleg Shalygin
 
Google Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseGoogle Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseDaniel Zivkovic
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionDaniel Zivkovic
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionBrion Mario
 
GCCP Session 2.pptx
GCCP Session 2.pptxGCCP Session 2.pptx
GCCP Session 2.pptxDSCIITPatna
 
Session 4 GCCP.pptx
Session 4 GCCP.pptxSession 4 GCCP.pptx
Session 4 GCCP.pptxDSCIITPatna
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kuberneteskloia
 
Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Carlos Azaustre
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptxYachikaKamra
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Velocidex Enterprises
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014Hojoong Kim
 
Cloud Function For Firebase - GITS
Cloud Function For Firebase - GITSCloud Function For Firebase - GITS
Cloud Function For Firebase - GITSYatno Sudar
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley chun
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and HerokuTapio Rautonen
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuJoe Kutner
 
Getting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsGetting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsMuhammad Samu
 

Similaire à Firebase Cloud Functions V2 (20)

GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Supercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for FirebaseSupercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for Firebase
 
Google Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseGoogle Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash Course
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase Session
 
GCCP Session 2.pptx
GCCP Session 2.pptxGCCP Session 2.pptx
GCCP Session 2.pptx
 
Session 4 GCCP.pptx
Session 4 GCCP.pptxSession 4 GCCP.pptx
Session 4 GCCP.pptx
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptx
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Firebase
Firebase Firebase
Firebase
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
Cloud Function For Firebase - GITS
Cloud Function For Firebase - GITSCloud Function For Firebase - GITS
Cloud Function For Firebase - GITS
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on Heroku
 
ServerLess by usama Azure fuctions.pptx
ServerLess by usama Azure fuctions.pptxServerLess by usama Azure fuctions.pptx
ServerLess by usama Azure fuctions.pptx
 
Getting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsGetting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud Functions
 

Dernier

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Dernier (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Firebase Cloud Functions V2

  • 2. whoami - I Am !Groot Aviv Laufer CTO as a Service - https://42-golems.io/ @avivl 42-golems.io
  • 3. A Brief History of Firebase ● 2014 Acquired by Google, Firebase Hosting & Authentication. ● 2016 Analytics, Messaging. ● Firebase, a real-time document database. ● Cloud Firestore scalable NoSQL cloud database. ● Cloud Functions ● Remote Config ● And much more https://firebase.google.com/products-build 42-golems.io
  • 4. “Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your JavaScript or TypeScript code is stored in Google's cloud and runs in a managed environment. There's no need to manage and scale your own servers.“ Firebase Functions the Shpiel 42-golems.io
  • 5. The Shpiel continues... After you write and deploy a function, Google's servers begin to manage the function immediately. You can fire the function directly with an HTTP request, or, in the case of background functions, Google's servers will listen for events and run the function when it is triggered. ● Cloud Firestore triggers ● Realtime Database triggers ● Remote Config triggers ● Firebase Authentication triggers ● Google Analytics triggers ● Cloud Storage triggers ● Pub/Sub triggers 42-golems.io
  • 6. Welcome to V2 Powered by Cloud Run and Eventarc, Cloud Functions for Firebase (2nd gen) has the potential to give you more powerful infrastructure, advanced control over performance and scalability, and more control of the functions runtime. 42-golems.io
  • 7. Cloud Run ● Fully managed ● Excellent for stateless containers. ● Serverless ● Built on top of Knative. ● Comes in 2 flavorus. Shameless Plug Taking Google Cloud Run for a spin Hacking Google Cloud Run 42-golems.io
  • 8. Eventarc Eventarc lets you build event-driven architectures without having to implement, customize, or maintain the underlying infrastructure. Eventarc offers a standardized solution to manage the flow of state changes, called events, between decoupled microservices. When triggered, Eventarc routes these events through Pub/Sub subscriptions to various destinations (in this document, see Event destinations) while managing delivery, security, authorization, observability, and error-handling for you. 42-golems.io
  • 9. What's new in Cloud Functions for Firebase (2nd gen) ● Function instances can now execute more than one request at a time. ● Secure your callable and HTTP functions with a new `cors` setting. 42-golems.io
  • 10. ● HTTP functions can now have a 1 hour timeout (up from 9 minutes previously). ● Function instances now default to the default compute service account rather than the app engine service account. ● New trigger types include Firebase Alerts, triggers custom event triggers for Firebase Extensions, and task queue functions. . What's new cont... 42-golems.io
  • 11. V2 Triggers ● Firebase Realtime Database ● Cloud Storage ● Firebase Alerts ● Pub/Sub ● Callables ● Cloud Tasks ● HTTP ● Scheduled functions ● Firebase Authentication blocking functions ● Firebase Remote Config ● Firebase Test Lab 42-golems.io
  • 12. Not supported triggers (for now) ● Cloud Firestore ● Firebase Authentication `onCreate` and `onDelete` ● Google Analytics 42-golems.io
  • 13. From V1 to V2 and beyond 42-golems.io
  • 14. Call functions directly ● Call functions from your app ● Call functions via HTTP requests ● Enqueue functions with Cloud Tasks ● Run functions on schedule 42-golems.io
  • 15. Trigger background functions ● Firebase Alerts triggers ● Custom event/extension triggers ● Blocking Auth triggers ● Pub/Sub triggers ● Realtime Database Triggers ● Remote Config Triggers ● Cloud Storage triggers ● Test Lab Triggers 42-golems.io
  • 16. Custom event triggers/extensions NEW! Firebase Extensions: ● Firebase Extensions help you deploy functionality to your app quickly with pre-packaged solutions. ● Once installed, a Firebase Extension performs a specific task or set of tasks in response to HTTPS requests, Cloud Scheduler events, or to triggering events from other Firebase products, like Cloud Firestore or Firebase Cloud Messaging. ● Available on the extensions Marketplace 42-golems.io
  • 17. Extensions ● Stream Collections to BigQuery ● Resize Images ● Delete User Data ● Trigger Email ● Send Invoices using Stripe ● Send Messages with Twilio ● And many more.... 42-golems.io
  • 18. When you upload a file to your specified Cloud Storage bucket, this extension: Detects if the file is an image. If it is, then: ● Creates a resized image with your specified dimensions. ● Names the resized image using the same name as the original uploaded image, but suffixed with your specified width and height. ● Stores the resized image in the same Storage bucket as the original uploaded image. Resize Images 42-golems.io
  • 20. Authentication blocking triggers Blocking functions let you execute custom code that modifies the result of a user registering or signing in to your app. For example, you can prevent a user from authenticating if they don't meet certain criteria, or update a user's information before returning it to your client app. You can register blocking functions for two events: ● beforeUserCreated: Triggers before a new user is saved to the Firebase Authentication database, and before a token is returned to your client app. ● beforeUserSignedIn: Triggers after a user's credentials are verified, but before Firebase Authentication returns an ID token to your client app. If your app uses multi-factor authentication, the function triggers after the user verifies their second factor. Note that creating a new user also triggers beforeUserSignedIn, in addition to beforeUserCreated. 42-golems.io
  • 23. And the winner is.... ● The test was configured to run up to 20 VUs for 6 minutes ● Using K6 42-golems.io
  • 24. Life behind Firebase - Cloud Functions (2nd gen) ● Longer request processing - Up to 60 mins for HTTP functions. ● Larger instances - Up to 16GB of RAM and 4 vCPUs ● Concurrency - Up to 1000 concurrent requests with a single function. ● Minimum instances - Provide for pre-warmed instances to cut your cold starts and make sure the bootstrap time of your application does not impact application performance. ● Traffic splitting - Support multiple revisions of your functions, splitting traffic between different revisions and rolling your function back to a prior version. ● Event Sources - Native support for Eventarc, which brings over 90+ event sources from direct sources and Cloud Audit logs (e.g., BigQuery, Cloud SQL, Cloud Storage, Firebase...) 42-golems.io