Real time database - sana028/VueLearningsPoc GitHub Wiki

Real time database

firebase real time database is a cloud hosted database, unlike the SQL database it store the data in JSON format.it will store the data in JSON tree upto 32 levels. it is useful for simple data model applications.

Real time database /vs/ cloud firestore

1.In real time database data will store in json format and in nested objects. It will store the data in JSON tree format. 2.cloud firestore will store the data in collections and documents ,subcollections in JSON objects. It is scalable for complex and hierarchal data storage.

Offline support

1.Real time database support offline support for android and apple clients. 2.cloud firestore DB support offline support for apple, android and web clients.

Presence

1.Real time database support presence , it will useful to find the client is online or offline. 2. cloud firestore doesn't support presence but using cloud functions we can sync the Realtime database with cloud firestore database.

Querying

1.In Real time database complex queries can't use ex:we can't combine filter and sorting for one query. In real time database the query will return the entire sub tree. In real time database I can access the nodes at any level of data like objects, arrays.

2.In cloud firestore we can perform complex queries using compound index ex:I can write filter and sorting in one query. In cloud firestore the query will return an entire document. In cloud firestore I can access entire document when we query on particular data.

Readability & performance

1.In real time database we have extremely low latency we will get response with in 10ms.it is suitable for frequent changes update. 2.In cloud firestore database we have low latency level we will get response with in 30ms.

UpTime

1.In realtime database we have high uptime perfoemance with 99.95%. 2.In cloud firestore we have extremely high performance with 99.99% (it perform computer actions with out interruption).

Scalability

1.In real time database, Scale to around 200,000 concurrent connections and 1,000 writes/second in a single database. Scaling beyond that requires sharding your data across multiple databases. 2.In cloud firestore , Scales completely automatically. Scaling limits are around 1 million concurrent connections and 10,000 writes/second.

Security

1.In real time database the security rules follow cascading rules that means the higher level rules will apply for the lower level rules. In cloud firestore the security rules follow non-cascading rules that means the rules are work independently for each level.

2.In real time database the authorization and validation rules are work seperatly. In cloud firestore the authorization and validation rules work together .