I'm using the react native firebase sdk and am wondering about how the underlying network calls are implemented. When making firestore get queries, is the sdk just keeping a socket open when it's initialized and make requests over the open socket, or does it make individual http requests to an endpoint?
Specifically I'm looking for an efficient way to get a batch of documents (profile thumbnail properties given a batch of profile ids), and I saw an answer that said that firebase calls are pipelined so calling the gets in parallel is efficient. However, I'm not sure if that applies to firestore as well.
The Firebase SDK collects basic app-usage data for you automatically, without the need to write any additional code. You can understand basic interactions such as: how many times your app was opened, how often in-app purchases were made, and how many users were active during a certain period of time.
Firestore is using websockets under the hood to react to changes, plus all the optimization based on lessons learned after the original firebase realtime db, it will scale! This is just a simple example and would require some restructuring and designing, but the ideas presented can and will scale.
You can listen to a document with the onSnapshot() method. An initial call using the callback you provide creates a document snapshot immediately with the current contents of the single document. Then, each time the contents change, another call updates the document snapshot.
Stay organized with collections Save and categorize content based on your preferences. Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development.
The Firestore SDK uses gRPC to communicate with the server. This is the same layer that many of Google's other Cloud products use under the hood. It is quite different from the Web Sockets communication layer that the Firebase Realtime Database relied on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With