The evolution of Cloud Firebase
Thursday, October 5, 2017
Richard Harris |
App Developer Magazine chatted with Dan McGrath, Product Manager at Google, about his work on the recent launch of Cloud Firestore.
These days, if you're developing a mobile or web app, there's a good chance you'll need to sync your data to the cloud. Maybe that's because your users want to share data with their friends for some exciting in-app collaboration, or maybe they simply want to access their data from more than one device.
But syncing data between all those devices and the cloud isn't quite as easy as it first looks. You have to set up your own servers to host the data and make sure they're up and running 24 hours a day. You'll need to make sure your clients can deal with network issues and handle offline support. And if your app ends up being an overnight success, you'll want to make sure you can handle that traffic without falling apart. And then you should probably spend some time figuring out if you've gotten your security right.
We chatted with Dan McGrath, Product Manager at Google, about his work on the recent launch of Cloud Firestore.
McGrath: When Firebase was acquired by Google 3 years ago, it was a rapidly growing mobile backend-as-a-service platform. It featured three products, including the flagship Firebase Realtime Database. Since then Firebase has become Google's app development platform, with 16 products to help develop build and grow their apps. The platform has grown to over a million developers
McGrath: Cloud Firestore is a fully-managed NoSQL document database for mobile and web app development. It's designed to easily store, query, and sync app data at global scale.
McGrath: Managing app data is still hard; you have to scale servers, handle intermittent connectivity, and deliver data with low latency. We built Cloud Firestore to help developers build better apps faster.
Cloud Firestore is inspired by what developers love most about the Firebase Realtime Database. Since its launch, the Firebase Database has been adopted by hundred of thousands of developers, and as its adoption grew, so did usage patterns. Developers began using the Realtime Database for more complex data and to build bigger apps, pushing the limits of the JSON data model and the performance of the database at scale.
Cloud Firestore builds on what developers like most about the Firebase Realtime Database, like its user-friendly client SDKs with real-time updates and offline capabilities, and it addresses its key limitations, in particular around data structuring, querying, and scaling.
McGrath: Cloud Firestore is Google's database solution for mobile and web app development. It has much in common with the Firebase Realtime Database, but is not a drop-in replacement. In fact, for some use cases, it may make sense to use the Realtime Database to optimize for cost and latency, and it's also easy to use both databases together. We actually wrote a full length blogpost comparing both databases.
A few things make Cloud Firestore a truly unique database. Its client SDKs and backend security rules allows developers to build serverless applications without having to compromise on security. It integrates into the Firebase platform, from hosting the webpage with Firebase Hosting, to handling user sign-in with Firebase Auth and kicking off server side computation with Cloud Functions for Firebase. It's also fully managed by Google from encryption at rest to multi-region replication, so developers can hand off worrying about operating a database and concentrate solely on building great products.
McGrath: Cloud Firestore is built leveraging a lot of the technology Google has developed for running large scale distributed systems, along with several completely new pieces to provide real-time updates as data changes to large numbers of concurrent queries.
With Multi-Region replication under the covers, Cloud Firestore replicates across multiple data centers in different geographical regions to ensure durability even in the face of disasters. It's also strongly consistent, so you don't need to think through the implications of queries being eventually consistent.
Another important aspect is networking, and with Cloud Firestore you're on Google’s high quality private network with 100 global network points of presence. This uses state-of-the-art software-defined networking to connect Cloud Firestore to your users in a fast and reliable manner.
McGrath: Spend more time developing features rather than rebuilding and managing common infrastructure. Whether it's adding an offline mode that allows you to update data, or synchronizing changes between multiple devices and users - these are all engineering and administration time sinks that take away from what you're really trying to build.
One prime example of how this makes building apps easier is HomeAway using the built-in offline support to make an app for travellers who might have spotty network connections. Another is Hawkin Dynamics who utilize the real-time sync functionality to display IoT data received by their mobile app in a full size web browser screen while it happens.
But syncing data between all those devices and the cloud isn't quite as easy as it first looks. You have to set up your own servers to host the data and make sure they're up and running 24 hours a day. You'll need to make sure your clients can deal with network issues and handle offline support. And if your app ends up being an overnight success, you'll want to make sure you can handle that traffic without falling apart. And then you should probably spend some time figuring out if you've gotten your security right.
We chatted with Dan McGrath, Product Manager at Google, about his work on the recent launch of Cloud Firestore.
ADM: Google acquired Firebase almost 3 years ago? How was the platform changed since then?
McGrath: When Firebase was acquired by Google 3 years ago, it was a rapidly growing mobile backend-as-a-service platform. It featured three products, including the flagship Firebase Realtime Database. Since then Firebase has become Google's app development platform, with 16 products to help develop build and grow their apps. The platform has grown to over a million developers
ADM: I heard you’re launching a new database, what is it?
McGrath: Cloud Firestore is a fully-managed NoSQL document database for mobile and web app development. It's designed to easily store, query, and sync app data at global scale.
Some of Cloud Firestore key features include:
- Serverless development with iOS, Android and Web SDKs
- Real-time data synchronization
- Offline data access
- Documents and collections with powerful querying
- Multi-region data replication with strong consistency
- Node.js, Python, Go, and Java server SDKs
ADM: Why did you decide to build Cloud Firestore?
McGrath: Managing app data is still hard; you have to scale servers, handle intermittent connectivity, and deliver data with low latency. We built Cloud Firestore to help developers build better apps faster.
Cloud Firestore is inspired by what developers love most about the Firebase Realtime Database. Since its launch, the Firebase Database has been adopted by hundred of thousands of developers, and as its adoption grew, so did usage patterns. Developers began using the Realtime Database for more complex data and to build bigger apps, pushing the limits of the JSON data model and the performance of the database at scale.
Cloud Firestore builds on what developers like most about the Firebase Realtime Database, like its user-friendly client SDKs with real-time updates and offline capabilities, and it addresses its key limitations, in particular around data structuring, querying, and scaling.
ADM: What makes Cloud Firestore a unique real-time database service compared to other offerings at Google or outside of Google?
McGrath: Cloud Firestore is Google's database solution for mobile and web app development. It has much in common with the Firebase Realtime Database, but is not a drop-in replacement. In fact, for some use cases, it may make sense to use the Realtime Database to optimize for cost and latency, and it's also easy to use both databases together. We actually wrote a full length blogpost comparing both databases.
A few things make Cloud Firestore a truly unique database. Its client SDKs and backend security rules allows developers to build serverless applications without having to compromise on security. It integrates into the Firebase platform, from hosting the webpage with Firebase Hosting, to handling user sign-in with Firebase Auth and kicking off server side computation with Cloud Functions for Firebase. It's also fully managed by Google from encryption at rest to multi-region replication, so developers can hand off worrying about operating a database and concentrate solely on building great products.
Dan McGrath, Product Manager at Google
ADM: What Google technologies was Cloud Firestore built on?
McGrath: Cloud Firestore is built leveraging a lot of the technology Google has developed for running large scale distributed systems, along with several completely new pieces to provide real-time updates as data changes to large numbers of concurrent queries.
With Multi-Region replication under the covers, Cloud Firestore replicates across multiple data centers in different geographical regions to ensure durability even in the face of disasters. It's also strongly consistent, so you don't need to think through the implications of queries being eventually consistent.
Another important aspect is networking, and with Cloud Firestore you're on Google’s high quality private network with 100 global network points of presence. This uses state-of-the-art software-defined networking to connect Cloud Firestore to your users in a fast and reliable manner.
ADM: What are some specific examples of how Cloud Firestore will benefit mobile app developers?
McGrath: Spend more time developing features rather than rebuilding and managing common infrastructure. Whether it's adding an offline mode that allows you to update data, or synchronizing changes between multiple devices and users - these are all engineering and administration time sinks that take away from what you're really trying to build.
One prime example of how this makes building apps easier is HomeAway using the built-in offline support to make an app for travellers who might have spotty network connections. Another is Hawkin Dynamics who utilize the real-time sync functionality to display IoT data received by their mobile app in a full size web browser screen while it happens.
Become a subscriber of App Developer Magazine for just $5.99 a month and take advantage of all these perks.
MEMBERS GET ACCESS TO
- - Exclusive content from leaders in the industry
- - Q&A articles from industry leaders
- - Tips and tricks from the most successful developers weekly
- - Monthly issues, including all 90+ back-issues since 2012
- - Event discounts and early-bird signups
- - Gain insight from top achievers in the app store
- - Learn what tools to use, what SDK's to use, and more
Subscribe here