
Answer-first summary for fast verification
Answer: Use Firestore and ensure that the PersistenceEnabled option is set to true.
To design a physician portal app in Node.js that requires scalability, strong consistency, and multi-region replication, especially with the need to query cached data during intermittent internet connectivity, the best option is to use Firestore with PersistenceEnabled set to true. Firestore is a NoSQL document database that supports offline data persistence, which allows the app to continue functioning and querying cached data when offline. It also provides strong consistency and supports multi-region replication for scalability and high availability. Memorystore for Memcached (Option B) is not suitable as it is an in-memory data store and does not provide the persistence or the consistency model required. Using Pub/Sub to synchronize changes to Cloud Spanner (Option C) does not address the offline query capability. Table.read with the exactStaleness option in Cloud Spanner (Option D) allows for reading stale data but does not provide the offline persistence feature needed for the app to function without internet connectivity.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can you design a physician portal app in Node.js that maintains functionality during intermittent internet connectivity by querying cached data, while ensuring scalability, strong consistency, and multi-region replication?
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.