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 74 discussion

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

Your company has created an application that uploads a report to a Cloud Storage bucket. When the report is uploaded to the bucket, you want to publish a message to a Cloud Pub/Sub topic. You want to implement a solution that will take a small amount to effort to implement.
What should you do?

  • A. Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified.
  • B. Create an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
  • C. Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic.
  • D. Create an application deployed in a Google Kubernetes Engine cluster to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
donchick
Highly Voted 3 years, 11 months ago
Since one of reqs is "You want to implement a solution that will take a small amount to effort to implement" I'd choose A because no code has to be written. However option C works great as well and is recommended by https://cloud.google.com/storage/docs/pubsub-notifications#other_notification_options.
upvoted 16 times
closer89
1 year, 6 months ago
you link says that you use cloud functions only when you dont want to publish message to pubsub
upvoted 1 times
...
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: A
The best answer is A. Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified. Here's why: Simplicity and Ease of Implementation: This approach is the most straightforward and requires minimal effort. Cloud Storage offers built-in integration with Cloud Pub/Sub, allowing you to configure notifications directly within the bucket settings. No Additional Code: You don't need to write any custom code or deploy additional applications. Cloud Storage handles the notification process automatically. Scalability and Reliability: Cloud Pub/Sub is a highly scalable and reliable messaging service, ensuring that your notifications are delivered efficiently and reliably.
upvoted 1 times
thewalker
4 months, 1 week ago
Let's look at why the other options are less ideal: B. Create an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic. This approach requires you to create and deploy an App Engine application, which adds complexity and overhead. C. Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic. While Cloud Functions are a good option for event-driven tasks, this approach still requires you to write and deploy code, making it more complex than using built-in Cloud Storage notifications. D. Create an application deployed in a Google Kubernetes Engine cluster to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic. This is the most complex and resource-intensive approach. It requires you to create and manage a Kubernetes cluster, deploy an application, and handle the notification process within your application code.
upvoted 1 times
...
...
santoshchauhan
8 months, 3 weeks ago
Selected Answer: A
A. Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified. This solution is straightforward and requires minimal effort to implement. Google Cloud Storage offers native support for publishing messages to Cloud Pub/Sub topics in response to changes in your bucket, like uploading a new file. By configuring Cloud Storage to automatically send a message to a Pub/Sub topic when a new report is uploaded, you can easily set up a real-time notification system without the need to write and maintain additional code.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: A
A is correct.
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
C. Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic. This would be the most straightforward and easiest solution to implement, as it only requires creating a Cloud Function and setting it up to be triggered by the Cloud Storage bucket. This solution would not require deploying any additional resources, such as App Engine or a Kubernetes cluster, and would not require any significant code changes to the application uploading the report.
upvoted 4 times
zevexWM
1 year, 10 months ago
A does exactly the same just without Cloud Functions. Notifications triggered by a Cloud Storage event, work as a trigger for PubSub. No need for Cloud Functions.
upvoted 1 times
zevexWM
1 year, 10 months ago
Changing to option C. Option A state "when objects are modified" which is not the request here.
upvoted 2 times
...
...
closer89
1 year, 6 months ago
documentation says that you use cloud functions only when you dont want to publish message to pubsub. but you need to publish message to pubsub - therefore answer is A https://cloud.google.com/storage/docs/pubsub-notifications#other_notification_options https://cloud.google.com/storage/docs/pubsub-notifications#overview
upvoted 1 times
...
...
tomato123
2 years, 3 months ago
Selected Answer: A
I think A is correct
upvoted 3 times
...
cloud_enth0325
2 years, 5 months ago
A -- Least steps for the overall requirement. Option C, tho suggested, won't need to trigger pub/sub unless it requires heavyweight or many subsequent steps. (https://cloud.google.com/storage/docs/pubsub-notifications#:~:text=don%27t%20want%20to%20manage%20a%20Pub/Sub%20topic)
upvoted 1 times
...
brewpike
2 years, 6 months ago
Also, aren't cloud storage objects immutable you can't modify but version them.
upvoted 1 times
...
brewpike
2 years, 6 months ago
A : https://cloud.google.com/storage/docs/pubsub-notifications
upvoted 1 times
...
mariorossi
2 years, 10 months ago
A not is correct because trigger must to be only in insert and not modify. only C is possible
upvoted 2 times
...
ParagSanyashiv
2 years, 10 months ago
Selected Answer: A
Answer A takes least effort to implement the solution
upvoted 3 times
...
StelSen
3 years, 9 months ago
Option-A required least amount of effort to implement. https://cloud.google.com/storage/docs/reporting-changes#enabling
upvoted 4 times
syu31svc
3 years, 4 months ago
Agree; just a one line code and you're done
upvoted 2 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 ...