exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 19 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 19
Topic #: 1
[All Professional Cloud Developer Questions]

Your application takes an input from a user and publishes it to the user's contacts. This input is stored in a table in Cloud Spanner. Your application is more sensitive to latency and less sensitive to consistency.
How should you perform reads from Cloud Spanner for this application?

  • A. Perform Read-Only transactions.
  • B. Perform stale reads using single-read methods.
  • C. Perform strong reads using single-read methods.
  • D. Perform stale reads using read-write transactions.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
emmet
Highly Voted 4 years, 5 months ago
As mentioned here https://cloud.google.com/spanner/docs/reference/rest/v1/TransactionOptions read-write transaction type has no options, and there is no way to make stale reads with this transaction type, so D) is definitely wrong. In the question, low latency is more critical than consistency, so C) is not an option. Read-Only transactions can do stale reads as well as Single Read methods, but in the documentation https://cloud.google.com/spanner/docs/transactions#read-only_transactions , they encourage to use SingleRead methods where possible. My vote is B)
upvoted 15 times
gcper
4 years ago
I agree with B because of this statement: "Your application is more sensitive to latency and less sensitive to consistency." Also if your application is latency sensitive but tolerant of stale data, then stale reads can provide performance benefits. source: https://cloud.google.com/spanner/docs/reads
upvoted 6 times
...
...
syu31svc
Highly Voted 3 years, 4 months ago
https://cloud.google.com/spanner/docs/reads: "A stale read is read at a timestamp in the past. If your application is latency sensitive but tolerant of stale data, then stale reads can provide performance benefits." B is the answer since the qn is asking about reading from Cloud Spanner; no writes involved
upvoted 6 times
...
santoshchauhan
Most Recent 7 months, 3 weeks ago
Selected Answer: B
B. Perform stale reads using single-read methods: Stale reads (also known as bounded staleness reads) can execute with lower latency because they can serve data from a timestamp in the recent past and do not have to wait for ongoing writes to be completed. This allows the application to trade off some consistency for lower latency, which is suitable for this scenario.
upvoted 1 times
...
__rajan__
1 year, 1 month ago
Selected Answer: B
It Should be B. Since the application is more sensitive to latency and less sensitive to consistency performing stale reads is the best choice here. It will provide low latency at the cost of potentially returning stale data.
upvoted 1 times
...
tuanbo91
1 year, 10 months ago
Selected Answer: B
Should be B
upvoted 1 times
...
jcataluna
1 year, 11 months ago
Selected Answer: B
B is correct
upvoted 1 times
...
tomato123
2 years, 2 months ago
Selected Answer: B
B is correct
upvoted 3 times
...
tomato123
2 years, 2 months ago
B is correct
upvoted 1 times
...
arobertox
2 years, 6 months ago
in my humble opinion it's D because the application must write on user contacts table.
upvoted 2 times
maxdanny
2 years, 3 months ago
the question is "How should you perform reads from Cloud Spanner for this application?" , so only read transaction....
upvoted 1 times
...
...
herocc
2 years, 9 months ago
B is right, data consistency is less sensitive.
upvoted 1 times
...
ParagSanyashiv
2 years, 9 months ago
Selected Answer: B
B is the correct answer
upvoted 1 times
...
amber4eg
2 years, 11 months ago
"Your application takes an input from a user and publishes it to the user's contacts" What does "publishes" mean? If "write to database" than my vote is D
upvoted 1 times
...
saurabh1805
3 years, 11 months ago
B is correct answer here.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago