Please enter the input passage
Cloud Firestore What is Cloud Firestore? Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Like Firebase Realtime Database, it 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. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions. Features: The Cloud Firestore data model supports flexible, hierarchical data structures. Store your data in documents, organized into collections. Documents can contain complex nested objects in addition to subcollections. In Cloud Firestore, you can use queries to retrieve individual, specific documents or to retrieve all the documents in a collection that match your query parameters. Your queries can include multiple, chained filters and combine filtering and sorting. They're also indexed by default, so query performance is proportional to the size of your result set, not your data set. Like Realtime Database, Cloud Firestore uses data synchronization to update data on any connected device. However, it's also designed to make simple, one-time fetch queries efficiently. Cloud Firestore caches data that your app is actively using, so the app can write, read, listen to, and query data even if the device is offline. When the device comes back online, Cloud Firestore synchronizes any local changes back to Cloud Firestore. How Does Cloud Firestore Work? Cloud Firestore is a cloud-hosted, NoSQL database that your iOS, Android, and web apps can access directly via native SDKs. Cloud Firestore is also available in native Node.js, Java, Python, Unity, C++ and Go SDKs, in addition to REST and RPC APIs. Following Cloud Firestore's NoSQL data model, you store data in documents that contain fields mapping to values. These documents are stored in collections, which are containers for your documents that you can use to organize your data and build queries. Documents support many different data types, from simple strings and numbers, to complex, nested objects. You can also create subcollections within documents and build hierarchical data structures that scale as your database grows. The Cloud Firestore data model supports whatever data structure works best for your app. Additionally, querying in Cloud Firestore is expressive, efficient, and flexible. Create shallow queries to retrieve data at the document level without needing to retrieve the entire collection, or any nested subcollections. Add sorting, filtering, and limits to your queries or cursors to paginate your results. To keep data in your apps current, without retrieving your entire database each time an update happens, add realtime listeners. Adding realtime listeners to your app notifies you with a data snapshot whenever the data your client apps are listening to changes, retrieving only the new changes. Cloud Firestore vs Realtime Database In the Firebase service, you have two architectures and data models to choose from Realtime Database and Cloud Firestore. Both are database products created by Firestore, and are easy to include in a project with just a few setup steps. They both tie in nicely with Firebase's suite of other services. Cloud Firestore Real Time Database Cloud-hosted Cloud-hosted Uses collections of documents to store data. Can store data similar to tables and rows. Only stores key-value pairs using JSON documents. SDK support for iOS, Android, and web, also available for native Node.js, Java, Python, Unity, C++, Go, and offers REST and RPC APIs. SDK support for iOS, Android, and web. Requires handling most of the logic in client applications and duplicating code across platforms. Data is typed, including booleans, objects, arrays, numbers, strings, null values, geopoints, timestamps, and references to documents. Does not use data types. Only supports nested objects and arrays, which are objects with indices set as keys. Best Practices for Cloud Firestore Following are best practices that can help you get the most out of the Cloud Firestore database. Database Location When you create your database instance, select the database location closest to your users and compute resources. Far-reaching network hops are more error-prone and increase query latency. To maximize the availability and durability of your application, select a multi-region location and place critical compute resources in at least two regions. Select a regional location for lower costs, for lower write latency if your application is sensitive to latency, or for co-location with other GCP resources. Ramping up Traffic You should gradually ramp up traffic to new collections or lexicographically close documents to give Cloud Firestore sufficient time to prepare documents for increased traffic. We recommend starting with a maximum of 500 operations per second to a new collection and then increasing traffic by 50% every 5 minutes. For instance, you can use this ramp up schedule to grow your read traffic to 740K operations per second after 90 minutes. You can similarly ramp up your write traffic, but keep in mind the Cloud Firestore Standard Limits. Be sure that operations are distributed relatively evenly throughout the key range. This is called the "500/50/5" rule. Indexes Avoid using too many indexes. An excessive number of indexes can increase write latency and increases storage costs for index entries. Be aware that indexing fields with monotonically increasing values, such as timestamps, can lead to hotspots which impact latency for applications with high read and write rates. Read and Write Operations Avoid writing to a document more than once per second. Use asynchronous calls where available instead of synchronous calls. Asynchronous calls minimize latency impact. For example, consider an application that needs the result of a document lookup and the results of a query before rendering a response. If the lookup and the query do not have a data dependency, there is no need to synchronously wait until the lookup completes before initiating the query. Do not use offsets. Instead, use cursors. Using an offset only avoids returning the skipped documents to your application, but these documents are still retrieved internally. The skipped documents affect the latency of the query, and your application is billed for the read operations required to retrieve them.
Select Translation Path
Afrikaans| Albanian| Amharic| Arabic| Armenian| Azerbaijani| Basque| Belarusian| Bengali| Bosnian| Bulgarian| Catalan|Cebuano |Chinese (Simplified)| Chinese (Traditional)| Corsican| Croatian| Czech| Danish| Dutch| English| Esperanto| Estonian| Finnish| French| Frisian| Galician| Georgian| German| Greek| Gujarati| Haitian Creole| Hausa| Hawaiian| Hebrew| Hindi| Hmong| Hungarian| Icelandic| Igbo| Indonesian| Irish| Italian| Japanese| Javanese| Kannada| Kazakh| Khmer| Kinyarwanda| Korean| Kurdish| Kyrgyz| Lao| Latin| Latvian| Lithuanian| Luxembourgish| Macedonian| Malagasy| Malay| Malayalam| Maltese| Maori| Marathi| Mongolian| Myanmar| Nepali| Norwegian| Nyanja| Odia| Pashto| Persian| Polish| Portuguese| Punjabi| Romanian| Russian| Samoan| Scots| Serbian| Sesotho| Shona| Sindhi| Sinhala| Slovak| Slovenian| Somali| Spanish| Sundanese| Swahili| Swedish| Tagalog| Tajik| Tamil| Tatar| Telugu| Thai| Turkish| Turkmen| Ukrainian| Urdu| Uyghur| Uzbek| Vietnamese| Welsh| Xhosa| Yiddish| Yoruba| Zulu
English|Japanese|English|Chinese (Traditional)|English|Korean|English English|French|English|Hindi|English|Spanish|English|Hindi|English English|Spanish|English|French|English|German|English English|Japanese|English|Russian|English English|Spanish|English