Google Cloud Functions Flashcards
Cloud Functions
Serverless, Event-driven, stateless, and autoscaling that is quick and pay as you go for small applications
Use for IoT Backends
Process and autoscale data from IoT without any human intervention
Use for Mobile Backends
Can process data delivered by mobile applications and can interact with all GCP services to make use of big data, ML capabilites, and so on.
Use for Third-Party API Integrations
Use functions to integrate with any third party system that provides API allowing you to extend your application with additional features delivered by other providers
Real Time Stream Processing
When messages arrive in the Pub/Sub, Cloud Functions can be triggered to analyze or enrich the messages to prepare them for further data processing
Real Time Files Processing
Immediately process files uploaded to your Cloud Storage Bukets using GCP AI APIs or creating thumbnails
Autoscaling in Cloud Functions
Scale from zero to desired scale, and is managed without user intervention. Limits can be set to control execution cost, to prevent design flaws causing spikes in use.
Stateless Cloud Functions
Functions do not store state or data. This allows them to work independantly and scale as needed. Each invocation has its own execution enviornment and does not share global variable memory or file systems. To share state across function invocations, should use Cloud Datastore or Cloud Storage.
Event Drive Response in Cloud Functions
Cloud Functions are triggered in response to an event of HTTP request, therefore they are invoked only wen needed and have no cost when inactive.
Chatbots and Virtual Assistants
Connect your text or voice platforms to Cloud Functions to integrate them with other GCP services such as DialogFlow to provide a natural conversation experience. Integration with third party aps can also be used to provide services.
Video and Image Analysis
Use Cloud Functions to interact with the various GCP AI building blocks such as video and image AI. When a user uploads an image or video, CF can immedately trigger the related API and return the anaylsis and can perform actions depending on the results of the analysis.
Lightweight APIs and Webhooks
Cloud Functions can be triggered using HTTP, exposing your application to the external world without building your API from scratch
What runtimes are supported in Cloud Functions?
Node.js 6/8/10, Python 3.7, Go 1.11. Modules and libraries associated with that runtime will be automatically loaded into that enviornment.
HTTP Functions
Cloud Functions can be triggered by HTTP(S) requests such as post, put, get delete, and options. It can return a response that has been constructed in the function
Background Functions
Can be triggered by changes in Cloud Storage Buckets, messages in the Cloud Pub/Sub topic, or one of the supported Firebase Events