PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #57
You are designing a physician portal app in Node.js. This application will be used in hospitals and clinics that might have intermittent internet connectivity. If a connectivity failure occurs, the…
The correct answer is A. Use Firestore and ensure that the PersistenceEnabled option is set to true. Firestore with PersistenceEnabled = true is precisely designed for this scenario. It provides a client-side local cache that allows the app to query data even when offline; when connectivity is restored, changes sync automatically. Firestore natively offers strong consistency…
Question
You are designing a physician portal app in Node.js. This application will be used in hospitals and clinics that might have intermittent internet connectivity. If a connectivity failure occurs, the app should be able to query the cached data. You need to ensure that the application has scalability, strong consistency, and multi-region replication. What should you do?
Options
- AUse Firestore and ensure that the PersistenceEnabled option is set to true.
- BUse Memorystore for Memcached.
- CUse Pub/Sub to synchronize the changes from the application to Cloud Spanner.
- DUse Table.read with the exactStaleness option to perform a read of rows in Cloud Spanner.
How the community answered
(36 responses)- A81% (29)
- B6% (2)
- C11% (4)
- D3% (1)
Explanation
Firestore with PersistenceEnabled = true is precisely designed for this scenario. It provides a client-side local cache that allows the app to query data even when offline; when connectivity is restored, changes sync automatically. Firestore natively offers strong consistency, horizontal scalability, and multi-region replication. Memorystore for Memcached (B) is a server-side in-memory cache with no client-side offline support. Pub/Sub with Cloud Spanner (C) provides no offline client caching. Cloud Spanner's exactStaleness read option (D) is for bounded-staleness reads on a fully online connection - it has no offline caching capability.
Topics
Community Discussion
No community discussion yet for this question.