Google Goes Serverless with Cloud Functions
Google Goes Serverless with Cloud Functions
Written by Nikos Vaggalis   
Monday, 20 March 2017

The view that serverless is the way of the future is once more reinforced by Google's recent announcement of its Cloud Functions for Firebase. These can be seen as an attempt to catch up with the already established players of the Function-as-a-Service scene, AWS Lambda and Azure Functions.

Like AWS Lambda and Azure, Cloud Functions are standalone snippets of code that live on the cloud and are fired in response to events taking place in Firebase supported products; for example sending notifications to all registered clients when a new record gets inserted in a Firebase database.But as well as being fired in response to all kind of events, they can also be exposed as dedicated HTTP endpoints that can be directly invoked without the need of a middle-app.

Before Cloud functions, for Firebase based products to get similar functionality you had to run a VPS on Google Cloud which would asynchronously handle all event requests through a Firebase Queue, the fault-tolerant, multi-worker, multi-stage job pipeline.But now Google recommends Cloud Functions as a total replacement to Firebase Queues:

"there may continue to be specific use-cases for firebase-queue, however if you're looking for a general purpose, scalable queueing system for Firebase then it is likely that building on top of Google Cloud Functions for Firebase is the ideal route."


In order to be considered a worthy feature to migrate to, Cloud Functions also tempt with quite a few integrations out of the box:

  • Firebase Analytics integration
    Sending a notification with a coupon code to users who have just completed a purchase or sending a survey request to users after they upgrade their app.
  • Firebase Authentication integration
    Triggering a function when a new user is created or deleted,  
    sending an email to welcome new users immediately after they sign up or cleaning up user associated data from Realtime Databases when a user account is deleted.
  • Firebase Realtime Database integration
    Triggering a function when data is created, updated, or deleted at a specific path in the database, sending a notification when data is written to the database or moderating and removing abusive language from data written to the database.
  • Cloud Storage integration
    Triggering a function when an object is written, updated, or deleted within a particular storage bucket, resizing and converting images when a new image has been uploaded to your Cloud Storage bucket or moderating abusive images uploaded to Cloud Storage using the Cloud Vision API.
  • HTTP endpoint integration
    Allowing Cloud Functions to be exposed as URLs, triggered when a request is made to that URL.

Also out of the box, with support for Google, Facebook, Twitter and GitHub sign-in, there's much flexibility in choosing an authentication option. Setting it up also looks much easier than under AWS, a case that we extensively covered in the three part article series of AWS Lambda For The Impatient.

But there's also limitations in that the only language currently supported is Javascript on a NodeJS runtime.  Google is looking into rectifying it by quickly announcing support for other languages as well, such as C# or Python, eventually bringing it on a par with AWS and Azure.

Pricing is based on the familiar by now pay-as-you-go scheme, an affordable and scalable solution since you don't have to pay for your server's idle time as the case with full blown VPSs.The Blaze starter pack costs $0 and allows 100 Simultaneous connections, 1GB of database storage and 10GB/month bandwidth.

So is sticking to AWS or Azure still a viable option? As always this is something that should be considered on a case by case basis, but it is undeniable that Google's move in going serverless, makes using, integrating and expanding Firebase-backed products on any of the supported platforms of iOS, Android, Unity and the Web, much more accessible.


More Information

Cloud Functions for Firebase
Firebase Authentication
Cloud Functions Pricing

Firebase SDK for Cloud Functions Samples Library

Related Articles

Google Takes On Amazon's Lambda

Google Firebase Adds Analytics, Improves Gaming 

AWS Lambda For The Impatient Part 1

AWS Lambda For The Impatient Part 2

AWS Lambda For The Impatient Part 3

AWS Adds Java Lambda Support

Amazon AWS Lambda


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.



Machine Learning Identifies MOMA Artworks

Google's Arts & Culture Lab in Paris has been experimenting with how AI can be used for the benefit of culture. One of its latest achievements is to turn a repository of 30,000 images into a searc [ ... ]

Top 3 Languages For Big Data Programming

R, Python, and Scala are the three major languages for data science and data mining. Here you’ll find out about their respective popularity, ease of use, and some pros and cons. Before all that, how [ ... ]

More News



or email your comment to:


Last Updated ( Monday, 20 March 2017 )

RSS feed of news items only
I Programmer News
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.