Your team is building a website that handles votes from a large user population. The incoming votes will arrive at various rates. You want to optimize the storage and processing of the votes. What should you do?
A.
Save the incoming votes to Firestore. Use Cloud Scheduler to trigger a Cloud Functions instance to periodically process the votes.
B.
Use a dedicated instance to process the incoming votes. Send the votes directly to this instance.
C.
Save the incoming votes to a JSON file on Cloud Storage. Process the votes in a batch at the end of the day.
D.
Save the incoming votes to Pub/Sub. Use the Pub/Sub topic to trigger a Cloud Functions instance to process the votes.
Pub/Sub (a messaging service) triggering a Cloud Function (the glue between services that are otherwise independent) to trigger something else to process the votes
Pub/Sub: Google Cloud Pub/Sub is a messaging service which directly uses for this purpose.
Cloud Functions: By triggering a Cloud Function with a Pub/Sub topic, you can process the votes as they arrive, ensuring low-latency handling and efficient scaling based on demand. This approach provides real-time processing and can handle bursts of traffic effectively.
upvoted 4 times
...
Log in to ExamTopics
Sign in:
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.
denno22
1 month, 3 weeks agoTimfdklfajlksdjlakf
2 months, 3 weeks agoflummoxed_individual
4 months agoBuenaCloudDE
4 months, 1 week ago