I am writing a Flutter Android application that uses Cloud Firestore to conduct CRUD operation.
As part of the specification document I have to describe how the app reads and writes to the database. This includes what connection is opened (TCP ) what protocols are used (HTTP/2) does it send any requests, data transferred etc.
In the app I am writing and reading JSON like data It is my understanding the firestore uses the connection and protocol listed above. Could someone provide in detail how these operations work? More specifically could you explain how these operations are done? And also point me to relevant documentation/articles if any.
Write
Future addMember(Member mem) {
return FirebaseFirestore.instance
.collection(Collection.church)
.doc(Document.members)
.collection(Collection.churchmembers)
.doc(mem.uid)
.set(mem.toJson());
}
Read
Stream<QuerySnapshot> getServices() {
return FirebaseFirestore.instance
.collection(Collection.church)
.doc(Document.services)
.collection(Collection.churchservices)
.snapshots();
}