Thu Jan 03 2019

Cloud function and its utility

Technology0 views

Cloud function and its utility

Cloud Functions is a serverless execution environment for building and connecting cloud services. With Cloud Functions, you write simple, single-purpose functions that are attached to events emitted from your cloud infrastructure and services. Your function is triggered when an event being watched is fired. Your code executes in a fully managed environment. There is no need to provision any infrastructure or worry about managing any servers.

On Google Cloud Platform, Cloud Functions can be written using JavaScript (Node.js 6.14.0, Node.js 8.11.1) or Python (Python 3.7.1). You can take your function and run it in any standard Node.js 6, Node.js 8 or Python runtime, which makes both portability and local testing a breeze.

Cloud Functions utilities

Cloud Functions provides a connective layer of logic that lets you write code to connect and extend cloud services. Listen and respond to a file upload to Cloud Storage, a log change, or an incoming message on a Cloud Pub/Sub topic.

Cloud Functions augments existing cloud services and allows you to address an increasing number of use cases with arbitrary programming logic. Cloud Functions have access to the Service Account credential and are thus seamlessly authenticated with the majority of cloud platform services, including Cloud Vision, as well as many others.

Cloud Functions are also supported by numerous cloud client libraries.

Serverless

Cloud Functions removes the work of managing servers, configuring software, updating frameworks, and patching operating systems.

Events and triggers

Cloud events are things that happen in your cloud environment. These might be things like changes to data in a database, files added to a storage system, or a new virtual machine instance being created. Events occur whether or not you choose to respond to them. You create a response to an event with a trigger.

A trigger is a declaration that you are interested in a certain event or set of events. Binding a function to a trigger allows you to capture and act on events. For more information on creating triggers and associating them with your functions, see Events and Triggers.

Use cases

Asynchronous workloads like cloud automation such as triggering application build now no longer need their own server and a developer to wire it up. You simply deploy a function bound to the event you want and you're done.

The fine-grained, on-demand nature of Cloud Functions also makes it a perfect candidate for lightweight APIs and webhooks.

Integration with third-party services and APIs

Use Cloud Functions to surface your own microservices via HTTP APIs or integrate with third-party services that offer webhook integrations to quickly extend your application with powerful capabilities such as sending a confirmation email after a successful Stripe payment or responding to Twilio text message events.

Real-time file processing

Use Cloud Functions to respond to events from Cloud Storage or Firebase Storage to process files immediately after upload to generate thumbnails from image uploads, process logs, validate content, transcode videos, validate, aggregate and filter data in real-time.

Real-time stream processing

Use Cloud Functions to respond to events from Cloud Pub/Sub to process, transform and enrich streaming data in transaction processing, clickstream analysis, application activity tracking, IoT device telemetry, social media analysis, and other types of applications.

Intelligent applications

Use Cloud Functions with Google Cloud AI’s pre-trained machine learning models to easily inject artificial intelligence into your applications. With a single API request, you can classify images, analyze videos, convert speech to text, perform natural language processing, and more.

Scales automatically

Serve users from zero to planet-scale without even thinking about any infrastructure. Cloud Functions automatically manages and scales underlying infrastructure with the size of workload.

 

You can share your experiences with us in the comment section. Thank you!

 

Photograph by Bloomicon

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.