TIL what Firebase is. I followed the tutorial and published a quick app to understand its capabilities.
We are about to start teaching Firebase in the web development bootcamp that I’m TA’ing. I’d heard of Firebase, but had never used it before. I figured I should try to work through the tutorial at least to have a better sense of what the service provides.
I deployed the tutorial app to chat.bambielli.com. It is hosted using Firebase’s hosting solution. You’ll need to authenticate (with Google) to be able to use it, but after that feel free to leave me a message.
What is Firebase?
Firebase offers cloud hosted alternatives to things you would traditionally need to set up independently when developing an app (e.g. a database). It provides an SDK that exposes methods for authentication, connecting to storage, and using other platform services like messaging and notifications. Like Heroku, Firebase offers a hosting option for apps developed on the platform, as well as a quick deployment option via a command line interface.
The Firebase tutorial walks through building a chat app, and covers a few of the different platform offerings.
Storage: Firebase connects to Google Cloud Storage (which seems like an S3 equivalent) allowing users to upload and download files. A feature of Firebase’s storage solution is that uploads and downloads are performed regardless of network quality. For example, if a transfer is paused due to a bad connection, the transfer begins again where it left off (saving bandwidth and time). Firebase Storage was used to store uploaded images to the chat app.
Real time Database: A NoSQL database hosted in the cloud. JSON data is stored and automatically synced to all relevant connected clients in milliseconds (data synchronization). Even works offline, writing data to disk until network connectivity is restored where it will sync with the server to get the latest state. Firebase Real time Database was used to store messages in the chat app, as well as FCM tokens.
Cloud Messaging: A push-notification service for your application. This was used to push background notifications to the chat app, indicating that someone had posted to the chat.
Authentication: Firebase offers a simple way to integrate OAuth2 in your app. You can enable various identity providers through the console, like Facebook, Twitter, Github and (of course) Google. You can then confirm in the Firebase console which users have successfully authenticated with your app, which provider they used, and when they last signed in.
Hosting: Firebase even offers a hosting solution, rivaling Heroku with its simplicity. Since Firebase is handling the backend work (database, auth, etc…) it just seems like a glorified CDN to me. Regardless, it was easy to deploy using the firebase CLI, and simple to hook up to my bambielli.com TLD using their interface.
Is It Worth It?
Overall, I can see the benefit that a service like firebase provides: as a Backend as a Service provider (BaaS) It offloads infrastructure setup to the platform, allowing developers to quickly get started on application specific functionality. Firebase has various pricing options if you wind up needing it, but at the scale supported by the tier3 plan I would think users would start migrating off of the platform and rolling their own infrastructure solutions.