Google Cloud Professional Cloud Database Engineer — Question 83
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?
Answer options
- A. Use Firestore and ensure that the PersistenceEnabled option is set to true.
- B. Use Memorystore for Memcached.
- C. Use Pub/Sub to synchronize the changes from the application to Cloud Spanner.
- D. Use Table.read with the exactStaleness option to perform a read of rows in Cloud Spanner.
Correct answer: A
Explanation
The correct answer is A because Firestore's PersistenceEnabled option allows the application to cache data locally, which is essential for handling intermittent connectivity while ensuring strong consistency and scalability. Options B and C do not provide the required caching and consistency features, and option D is not suitable for the scenario as it doesn't address the need for local data access during connectivity issues.