• Firebase Logo. Source: Firebase 2018a.
    image
  • An overview of Firebase products. Source: Sevilleja 2016.
    image
  • Components of Firebase Cloud Messaging. Source: Firebase Docs 2018a.
    image

Firebase

Summary

image
Firebase Logo. Source: Firebase 2018a.

Modern web and mobile apps are typically built with a mix of backend services and frontend frameworks. Wouldn't it be nice if there was a way for developers to focus on just the frontend and user experience, and let someone else take care of all backend requirements? It's exactly in this context that Backend-as-a-Service (BaaS) has emerged.

Firebase started as a BaaS but after its acquisition by Google in 2014, it's now more deeply integrated to some parts of Google Cloud Platform. Since then, Firebase is described as "a comprehensive mobile development platform". The idea is to build apps faster without managing infrastructure.

Milestones

Sep
2011

Firebase starts as a startup named Envolve, founded by James Tamplin and Andrew Lee. It provides developers an API to integrate online chat functionality into their websites.

Apr
2012

It's noticed that some apps using Envolve are doing things beyond chat. They use Envolve's capability for synchronizing app data in real time. This prompts its creators to separate chat functionality from the underlying framework that enables real-time communications. The latter could now be offered as a standalone service. Thus, Firebase as a separate company is born.

Oct
2014

Google acquires Firebase. In following years, other Google acquisitions of Fabric/Crashlytics, Divshot, and LaunchKit add value to Firebase portfolio of products.

May
2016

Google announces Firebase at Google I/O as a unified platform for mobile developers. Firebase now integrates deeply with some of Google cloud tools. The user base of Firebase is now 470,000, up from about 110,000 when Google acquired it.

Oct
2017

Firebase team announces a beta release of Cloud Firestore, a fully managed NoSQL document database. Built in close collaboration with Google Cloud Platform team, it's replicated across regions and offers strong consistency. However, for special use cases where cost and latency are important, Firebase Realtime Database may be preferred.

May
2018

As a beta release, ML Kit becomes available on Firebase. This allows developers to add machine learning features into their apps. Use cases supported are recognizing text, detecting faces, scanning barcodes, labelling images and recognizing landmarks. For advanced use cases, developers can also import TensorFlow Lite models.

Oct
2018

It's reported that over 1.5 million apps are using Firebase every month. India's Hotstar entertainment app is a Firebase-based app with over 150 million monthly active users.

Discussion

  • Why should I adopt Firebase for my next web/mobile app?

    Firebase provides easy-to-use workflows common to many apps. Examples include onboarding flow, customizing the "welcome back" screen, progressively rolling out new features, following the user journey across devices, adding chat to your app, optimizing ads based on user behaviour, enabling users to share and resize photos, processing third-party payments, and more. These typically involve significant development on the server side. Instead, Firebase offers out-of-the-box and easily deployable solutions to do these.

    As developers, you don't have to worry about server-side software. Mobile and web SDKs enable this. The main offering is real-time sync of data between client apps and Firebase via Realtime Database and Cloud Firestore. Using Authentication, user authentication feature is easy to build, even if it involves third-party providers such as Facebook or Twitter. Messaging and notifications are efficiently done using Firebase Cloud Messaging (FCM). Unlike native apps updated via app stores, Remote Config can update Firebase apps without asking users to update their installation. Using Crashlytics and Performance Monitoring app stability and performance can be improved. There's good integration with Adwords and Admob. Even UI testing across multiple devices is simplified via Test Lab.

  • What are the products offered by Firebase?
    image
    An overview of Firebase products. Source: Sevilleja 2016.

    Firebase products can be grouped into three categories:

    • Build: Helps developers build more powerful, secure and scalable apps. Products include Cloud Firestore, ML Kit, Cloud Functions, Authentication, Hosting, Cloud Storage, Realtime Database.
    • Improve: Gives developers insights into app performance and stability. Products include Crashlytics, Performance Monitoring, Test Lab.
    • Grow: Helps your app to grow. Products include In-App Messaging, Google Analytics, Predictions, A/B Testing, Cloud Messaging, Remote Config, Dynamic Links, App Indexing.
  • What exactly is Firebase Hosting?
    Firebase web hosting. Source: Firebase YouTube 2016.

    With the rise of powerful frontend frameworks (Angular) and static site generators (Jekyll) it's become possible to develop web apps without much server-side processing. For hosting such web apps, Firebase Hosting is a suitable solution. It serves content over secure connections, delivers content quickly due to caching on solid-state devices at CDN edges, enables rapid deployment and supports one-click rollbacks. CDN edge servers ensure global availability of your app. SSL certificates are free and automatically provisioned even for custom domains.

    It's also easy to deploy a sophisticated Progressive Web App (PWA). While Firebase Hosting serves static content, dynamic content can be served using Cloud Functions for Firebase.

  • Could you share more details on Firebase Cloud Messaging (FCM)?
    image
    Components of Firebase Cloud Messaging. Source: Firebase Docs 2018a.

    FCM a cross-platform messaging solution that can be used for pushing new data to client apps or notifying users. Instant messaging has a payload limit of 2KB. From client to server, acknowledgments, chats, and other messages can be sent.

    FCM consists of FCM servers managed by Google and an app server or other trusted environment such as Cloud Functions for Firebase. All message go via FCM servers. Developers can use raw protocols (HTTP/XMPP) or use Admin SDK. HTTP is synchronous and downstream. XMPP is asynchronous and both downstream and upstream. HTTP supports multicast as well.

    In April 2018, Google deprecated its Google Cloud Messaging (GCM) service. GCM APIs will be available only till April 2019. Since GCM and FCM cannot coexist in an app, developers must migrate to FCM. FCM inherits GCM infrastructure and adds many new features. For more details, refer to the GCM/FCM FAQ.

  • How's the pricing of Firebase products?

    Firebase gives following services under free tier: A/B Testing, Analytics, App Indexing, Authentication (except Phone Auth), Cloud Messaging (FCM), Crashlytics, Dynamic Links, Invites, Performance Monitoring, Predictions, and Remote Config. With free tier, you get some free access to other products with limits on storage, bandwidth, number of reads/writes/deletes/uploads/downloads/tests, etc. Realtime Database allows only 100 simultaneous connections.

    Besides the free tier, there's a fixed price per month and pay-as-you-go plans. With the latter, the pricing of Realtime Database, Cloud Firestore, Storage, Phone-Auth, Hosting, Test Lab, ML Kit, Use of BigQuery & other IaaS, is based on the use.

  • What are some criticisms of Firebase?

    Since 2016, developers have noted many problems with Firebase. While it's good for enabling real-time apps with client-side logic, running complex database queries is almost impossible. Firebase Realtime Database is nothing more than a large JSON file. Data is duplicated since the benefits of relationships in a relational database are absent. Filtering or paginating records are not possible. More recently, the situation has improved with Cloud Firestore that manages data using collections and documents.

    Your data is on a server that you don't control. There's no easy way to import/export data. Firebase is also not open source. If the service is discontinued, you have no choice but to rework your app. While initial development may be faster, scaling up later may prove difficult. Moving business logic from client to server won't be trivial. When you scale, the cost of using Firebase will be higher than adopting a platform-as-a-service.

    Developers can't work with a local installation. Network connection is required. They're also at the mercy of Firebase's upgrade cycles.

Sample Code

  • // Example showing how to use Firebase in a Node.js application
    // Source: https://firebase.google.com/docs/web/setup
     
    // Install Firebase module by running: npm install firebase --save
     
    var firebase = require("firebase");
     
    // Initialize Firebase
    // TODO: Replace with your project's customized code snippet
    var config = {
      apiKey: "<API_KEY>",
      authDomain: "<PROJECT_ID>.firebaseapp.com",
      databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
      storageBucket: "<BUCKET>.appspot.com",
    };
    firebase.initializeApp(config);

References

  1. Anastasyev, Dmytro. 2016. "Firebase Framework Review." MLSDev, October 16. Accessed 2018-11-12.
  2. Bover, Pier. 2017. "Firebase: the great, the meh, and the ugly." freeCodeCamp, January 13. Accessed 2018-11-12.
  3. Crunchbase. 2018. "Firebase." Accessed 2018-11-03.
  4. Dufetel, Alex. 2017. "Introducing Cloud Firestore: Our New Document Database for Apps." The Firebase Blog, October 03. Accessed 2018-11-12.
  5. Firebase. 2018a. "Firebase Homepage." Accessed 2018-11-01.
  6. Firebase. 2018b. "Use Cases." Accessed 2018-11-12.
  7. Firebase. 2018c. "Pricing Plans." Accessed 2018-11-03.
  8. Firebase. 2018d. "Products." Accessed 2018-11-12.
  9. Firebase Docs. 2018a. "Firebase Cloud Messaging." Firebase, November 01. Accessed 2018-11-01.
  10. Firebase Docs. 2018c. "About Firebase Cloud Messaging server." Firebase, November 08. Accessed 2018-11-12.
  11. Firebase Docs. 2018d. "Firebase Hosting." Firebase, October 26. Accessed 2018-11-12.
  12. Firebase YouTube. 2016. "Introducing Firebase Hosting." YouTube, May 18. Accessed 2018-11-12.
  13. Google Developers. 2018. "Migrate a GCM Client App for Android to Firebase Cloud Messaging." Cloud Messaging, Google, September 06. Accessed 2018-11-03.
  14. H Fatima. 2017. "Why is Firebase the best Mobile Backend-as-a-Service." Blog, Reseller Club, December 12. Accessed 2018-11-03.
  15. Jamin, Baptiste. 2016. "Reasons Not To Use Firebase." Blog, Crisp Insights, September 18. Accessed 2018-11-12.
  16. Kudlack, Chris. 2018. "Android UI Testing with Firebase." Tura Engineering, Medium, April 18. Accessed 2018-11-12.
  17. Lardinois, Frederic. 2016. "Google turns Firebase into its unified platform for mobile developers." TechCrunch, May 18. Accessed 2018-11-12.
  18. Ma, Francis. 2018a. "What's new in Firebase at I/O 2018." The Firebase Blog, May 08. Accessed 2018-11-12.
  19. Ma, Francis. 2018b. "What's new at Firebase Summit 2018." Firebase, Google Blog, October 29. Accessed 2018-11-12.
  20. Rajat S. 2017. "Introduction to Firebase." GeekyAnts on Hacker Noon, December 28. Accessed 2018-11-12.
  21. Rouse, Alex. 2016. "Firebase: The Good, Bad, and the Ugly." Raizlabs, December 01. Accessed 2018-11-12.
  22. Ruffrey. 2018. "Firebase Pros and Cons for a SaaS Company." Symbolic Logic, April 06. Accessed 2018-11-12.
  23. Sevilleja, Chris. 2016. "A Look at the New Firebase: A Powerful Google Platform." Scotch, May 23. Accessed 2018-11-12.

Milestones

Sep
2011

Firebase starts as a startup named Envolve, founded by James Tamplin and Andrew Lee. It provides developers an API to integrate online chat functionality into their websites.

Apr
2012

It's noticed that some apps using Envolve are doing things beyond chat. They use Envolve's capability for synchronizing app data in real time. This prompts its creators to separate chat functionality from the underlying framework that enables real-time communications. The latter could now be offered as a standalone service. Thus, Firebase as a separate company is born.

Oct
2014

Google acquires Firebase. In following years, other Google acquisitions of Fabric/Crashlytics, Divshot, and LaunchKit add value to Firebase portfolio of products.

May
2016

Google announces Firebase at Google I/O as a unified platform for mobile developers. Firebase now integrates deeply with some of Google cloud tools. The user base of Firebase is now 470,000, up from about 110,000 when Google acquired it.

Oct
2017

Firebase team announces a beta release of Cloud Firestore, a fully managed NoSQL document database. Built in close collaboration with Google Cloud Platform team, it's replicated across regions and offers strong consistency. However, for special use cases where cost and latency are important, Firebase Realtime Database may be preferred.

May
2018

As a beta release, ML Kit becomes available on Firebase. This allows developers to add machine learning features into their apps. Use cases supported are recognizing text, detecting faces, scanning barcodes, labelling images and recognizing landmarks. For advanced use cases, developers can also import TensorFlow Lite models.

Oct
2018

It's reported that over 1.5 million apps are using Firebase every month. India's Hotstar entertainment app is a Firebase-based app with over 150 million monthly active users.

Tags

See Also

  • Backend-as-a-Service
  • Firebase Performance
  • Cloud Firestore
  • Google Analytics
  • Real-time Apps
  • Parse Platform

Further Reading

  1. Rajat S. 2017. "Introduction to Firebase." GeekyAnts on Hacker Noon, December 28. Accessed 2018-11-12.
  2. Ruffrey. 2018. "Firebase Pros and Cons for a SaaS Company." Symbolic Logic, April 06. Accessed 2018-11-12.
  3. FriendlyPix: a cross-platform Firebase example app
  4. The Firebase Blog
  5. Senior, Ngenge. 2018. "Database Structure of One to One Chat App With Firebase." Medium, September 07. Accessed 2018-11-12.

Top Contributors

Last update: 2018-11-22 10:21:22 by arvindpdmn
Creation: 2018-11-01 05:36:25 by Pawan_Dubey

Article Stats

1234
Words
1
Chats
3
Authors
37
Edits
3
Likes
275
Hits

Cite As

Devopedia. 2018. "Firebase." Version 37, November 22. Accessed 2018-12-16. https://devopedia.org/firebase
BETA V0.18