Google Professional Cloud Developer Question 417
Select 2Google Cloud PlatformYou are building a serverless e-commerce application on Google Cloud. The application requires: (1) scheduling periodic tasks to update product inventory from an external API, (2) processing user actions from a frontend application in near real-time, and (3) orchestrating tasks when a user completes a purchase (e.g., verifying payment, sending a confirmation email, and updating inventory). Which combination of services would best meet these requirements?
- A
Use Cloud Scheduler to schedule periodic inventory updates, Eventarc to process user actions in near real-time, and Workflows to orchestrate tasks for completed purchases.
- B
Use Cloud Tasks to schedule periodic inventory updates, Cloud Scheduler to process user actions in near real-time, and Workflows to orchestrate tasks for completed purchases.
- C
Use Cloud Scheduler to schedule periodic inventory updates, Eventarc to process user actions in near real-time, and Cloud Tasks to orchestrate tasks for completed purchases.
- D
Use Cloud Scheduler to schedule periodic inventory updates, Cloud Tasks to process user actions in near real-time, and Workflows to orchestrate tasks for completed purchases.
- E
Use Workflows to schedule periodic inventory updates, Eventarc to process user actions in near real-time, and Cloud Tasks to orchestrate tasks for completed purchases.
Show answer and explanation
Correct answers: A, D
Explanation
To meet the requirements, you need to use the right tools for the right tasks: (1) Cloud Scheduler efficiently handles scheduling periodic inventory update tasks. (2) For near real-time event processing, Eventarc (or Cloud Tasks in some cases) can handle frontend user actions. (3) Workflows is the best choice for orchestrating multi-step processes like verifying payments and sending emails. This combination of services ensures the application remains efficient, scalable, and maintainable.
- A. Correct.
Correct: Cloud Scheduler is ideal for scheduling periodic tasks (like inventory updates), Eventarc allows for near real-time event-driven processing (like user actions), and Workflows is designed for complex task orchestration (like purchase processes).
- B. Incorrect.
Incorrect: Cloud Tasks is not designed for scheduling periodic tasks; it is better suited for handling asynchronous task execution with guarantees of delivery.
- C. Incorrect.
Incorrect: While Cloud Scheduler is correctly used for periodic tasks, Cloud Tasks is not designed for event-driven processing, and it does not handle orchestration as well as Workflows.
- D. Correct.
Correct: Cloud Scheduler is ideal for scheduling periodic tasks, Cloud Tasks is suitable for handling asynchronous user actions in near real-time, and Workflows is well-suited for orchestrating multi-step processes (like purchase flows).
- E. Incorrect.
Incorrect: Workflows is not designed for scheduling periodic tasks; its primary purpose is orchestrating complex workflows. Similarly, Eventarc is not ideal for task orchestration.