I am working on a React Native app with a firestore database. The app will use batched writes.which are triggered by a user from within the app. I expect that the writes will exceed 500. In that case the fire store documentation suggests to use the server client library. Is there a way to do this with the google firestore platform without setting up your own server? Would this for example be possible with cloud functions?
Asked
Active
Viewed 340 times
1 Answers
0
Would this for example be possible with cloud functions?
Yes.
Cloud Functions allows you to run your code in Google Cloud's environment, which is precisely the type of scenario that the Firebase Admin SDKs/server libraries were made for.
For an example of how to perform the writes in batches, and the performance gains to be gotten from this, see my answer here: What is the fastest way to write a lot of documents to Firestore?

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
Just to be sure. Are the examples you refer to in your answer all possible with firestore cloud functions? – Bert Dec 09 '19 at 09:22
-
Yes, as long as you stay within the time-out limit of the Cloud Functions environment: https://firebase.google.com/docs/functions/quotas#time_limits – Frank van Puffelen Dec 09 '19 at 15:39