Google Cloud Professional Machine Learning Engineer — Question 96

You work for a company that manages a ticketing platform for a large chain of cinemas. Customers use a mobile app to search for movies they’re interested in and purchase tickets in the app. Ticket purchase requests are sent to Pub/Sub and are processed with a Dataflow streaming pipeline configured to conduct the following steps:
1. Check for availability of the movie tickets at the selected cinema.
2. Assign the ticket price and accept payment.
3. Reserve the tickets at the selected cinema.
4. Send successful purchases to your database.

Each step in this process has low latency requirements (less than 50 milliseconds). You have developed a logistic regression model with BigQuery ML that predicts whether offering a promo code for free popcorn increases the chance of a ticket purchase, and this prediction should be added to the ticket purchase process. You want to identify the simplest way to deploy this model to production while adding minimal latency. What should you do?

Answer options

Correct answer: D

Explanation

The correct answer, D, allows for immediate inference on the mobile app side, providing the lowest latency since predictions are made directly on the device without needing to communicate with external servers. Options A and B involve batch processing or additional steps in the Dataflow pipeline, which would introduce latency beyond the required 50 milliseconds. Option C, while feasible, also introduces network latency by querying an external prediction endpoint.