Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 135 discussion

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

You manage an ecommerce application that processes purchases from customers who can subsequently cancel or change those purchases. You discover that order volumes are highly variable and the backend order-processing system can only process one request at a time. You want to ensure seamless performance for customers regardless of usage volume. It is crucial that customers' order update requests are performed in the sequence in which they were generated. What should you do?

  • A. Send the purchase and change requests over WebSockets to the backend.
  • B. Send the purchase and change requests as REST requests to the backend.
  • C. Use a Pub/Sub subscriber in pull mode and use a data store to manage ordering.
  • D. Use a Pub/Sub subscriber in push mode and use a data store to manage ordering.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
scaenruy
Highly Voted 2 years, 10 months ago
I vote C https://cloud.google.com/pubsub/docs/pull
upvoted 9 times
Blueocean
2 years, 10 months ago
Agreed considering only one request can be processed at a time
upvoted 2 times
Blueocean
2 years, 10 months ago
And there are a large number of incoming requests Pub Sub is needed
upvoted 3 times
...
...
...
mrgarfield
Most Recent 2 months, 3 weeks ago
Selected Answer: D
Why the other options are not as suitable: Option A: WebSockets provide real-time communication, but they might not be suitable for all scenarios, especially if the backend needs to process requests asynchronously. Option B: Using REST requests directly can lead to performance bottlenecks under high load, as the backend might become overwhelmed with requests. Option C: A Pub/Sub subscriber in pull mode requires the frontend to actively poll for messages, which can introduce latency and overhead.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: C
C is correct.
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: C
Pull model so that application handle the requests by pulling requests one by one. This is called event driven architecture where the response to client from the app will happen asynchronously.
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
Selected Answer: C
C. Use a Pub/Sub subscriber in pull mode and use a data store to manage ordering. To ensure that customer order update requests are performed in the sequence in which they were generated, the recommended approach is to use a Pub/Sub subscriber in pull mode, together with a data store to manage ordering. This approach allows the backend system to process requests one at a time, while maintaining the order of requests. By using a pull-based subscription, the backend system can control the rate at which messages are consumed from the Pub/Sub topic, and can ensure that requests are processed in the correct order. The data store can be used to maintain a queue of requests, where each request is added to the queue in the order that it was generated, and then processed by the backend system.
upvoted 1 times
omermahgoub
1 year, 10 months ago
A. Send the purchase and change requests over WebSockets to the backend. WebSockets are a protocol for bidirectional communication between a client and server, it may not ensure that requests are processed in the order they were generated. B. Send the purchase and change requests as REST requests to the backend. Sending the request as REST does not ensure that requests are processed in the order they were generated, it also would not allow controlling the rate at which requests are consumed. D. Use a Pub/Sub subscriber in push mode and use a data store to manage ordering. Push-based subscription don't allow controlling the rate at which requests are consumed, it also may not ensure that requests are processed in the order they were generated.
upvoted 1 times
...
...
zellck
1 year, 11 months ago
Selected Answer: C
C is the answer.
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
jdx000
2 years, 4 months ago
Selected Answer: C
Correct answer C
upvoted 1 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 ...