BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Introduces Cloud Functions

Google Introduces Cloud Functions

Leia em Português

This item in japanese

Google has launched a new service called Cloud Functions in alpha. This service allows one to create small JavaScript functions that automatically respond to cloud events without requiring user’s intervention, configuring a runtime and executing it, or scaling it to multiple machines.

There can be multiple events occurring in a cloud environment, asynchronously propagated through the Cloud Pub/Sub infrastructure. The user can configure a trigger that listens to such events and reacts on them by executing JavaScript code in a Node.js environment. Currently, triggers can be activated through the following channels:

  • Cloud Pub/Sub – any asynchronous Pub/Sub event
  • Cloud Storage - Object Change notifications
  • HTTP Invocation – synchronous invocation through HTTP
  • Debug/Direct Invocation – using the CLI to develop/debug Cloud Functions

We asked Google what Cloud Functions can do:

The function can access any other cloud resources that have appropriate Node (JavaScript) client libraries or RESTful APIs. If you use the gcloud-node client libraries you're automatically authenticated with the default project credentials, so you don't have to worry about generating or storing auth keys etc.

The function has full access to the internet so you can call out to any 3rd party API, however you'll have to maintain your own auth keys etc for these external services.

Google did not want to comment on future development, so we do not know if they will add support for other languages. But it is likely they will.

Amazon has a similar service called AWS Lambda. Lambda functions can be directly triggered by CloudWatch, DynamoDB, Kinesis, SNS, S3, or by modifications in system state, data change or user action. AWS Lambda can be used in real-time file processing or data streaming, performing various operations on data as it is loaded or modified. AWS Lambda supports Java, JavaScript/Node.js, and Python, with the promise that support for other languages will be added in the future.

Rate this Article

Adoption
Style

BT