Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud. Firestore keeps your data in sync across client apps through realtime listeners and offers offline support for mobile and web so you can build responsive apps that work regardless of network latency or Internet connectivity. Firestore also offers seamless integration with other Firebase and Google Cloud products, including Cloud Run functions.
Choosing between Native mode and Datastore mode
When you create a new Firestore database, you can configure the database instance to run in Datastore mode which makes the database backwards-compatible with Datastore.
Firestore in Native mode
Firestore is the next major version of Datastore and a re-branding of the product. Taking the best of Datastore and the , Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Firestore introduces the following features:
A strongly consistent storage layer A collection and document data model Mobile and Web client libraries Firestore is backwards compatible with Datastore, but the new data model, real-time updates, and mobile and web client library features are not. To access all Firestore features, you must use Firestore in Native mode.
Firestore in Datastore mode
Firestore in Datastore mode uses Datastore system behavior but accesses Firestore's storage layer, removing the following Datastore limitations:
All Datastore queries are now strongly consistent, unless you explicitly request . Queries in transactions are no longer required to be ancestor queries. Transactions are no longer limited to 25 entity groups. Writes to an entity group are no longer limited to 1 per second. Datastore mode disables Firestore features that are not compatible with Datastore:
The project will accept Datastore API requests and deny Firestore API requests. The project will use Datastore indexes instead of Firestore indexes. You can use Datastore client libraries with this project but not Firestore client libraries. Firestore real-time capabilities will not be available. In the Google Cloud console, the database will use the Datastore viewer.