Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 179 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 179

Single answerGoogle Cloud Platform

You are developing a distributed application on Google Cloud using Cloud Spanner as the database. The application processes customer orders and updates inventory levels. For inventory updates, it is critical that the most recent data is always read to avoid overselling products. Which consistency model should you choose for reading inventory data?

  1. A

    Strong consistency

  2. B

    Eventual consistency

  3. C

    Transactional consistency

  4. D

    Causal consistency

Show answer and explanation

Correct answer: A

Explanation

Strong consistency is the appropriate choice for applications that require reading the most up-to-date data, such as inventory management in an e-commerce application. This ensures that decisions are always made based on the most accurate and recent state of the database, avoiding issues like overselling products. Eventual consistency, while faster, risks returning stale data, which would not be acceptable in this scenario.

  • A. Correct.

    Strong consistency ensures that the most recent data is always read, making it suitable for scenarios where data accuracy is critical, such as inventory management.

  • B. Incorrect.

    Eventual consistency allows for faster reads but does not guarantee the most recent data will be returned, which can lead to overselling in this use case.

  • C. Incorrect.

    Transactional consistency is not a recognized consistency model in Google Cloud. It may refer to the ACID guarantees of transactions, but it is not the correct term for this scenario.

  • D. Incorrect.

    Causal consistency ensures that related operations are processed in the correct order, but it does not guarantee the most recent data will be read. This is not suitable for critical real-time data requirements like inventory updates.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam