
Answer-first summary for fast verification
Answer: Convert your model with TensorFlow Lite (TFLite), and add it to the mobile app so that the promo code and the incoming request arrive together in Pub/Sub.
Option D is the correct answer. By converting the model with TensorFlow Lite (TFLite) and adding it to the mobile app, the prediction is conducted on the device itself. This ensures that the promo code decision is made before sending the request to Pub/Sub, which minimizes latency by avoiding additional network calls during the real-time ticket purchasing process. This method is also simpler to implement compared to the other options that involve changes to the streaming pipeline or external inference endpoints.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are part of the engineering team at a company that operates a ticketing platform for a large chain of cinemas. The platform allows customers to use a mobile app to search for movies they are interested in and purchase tickets directly through the app. The process of ticket purchasing involves sending requests to Pub/Sub, which are then processed by a Dataflow streaming pipeline. This pipeline is designed to perform the following steps with low latency requirements (less than 50 milliseconds for each step): 1. Checking the availability of movie tickets at the selected cinema. 2. Assigning the price of the ticket and accepting payment. 3. Reserving the tickets at the chosen cinema. 4. Updating the database with successful purchases. Recently, you developed a logistic regression model using BigQuery ML, which predicts whether offering a promo code for free popcorn increases the likelihood of a ticket purchase. This prediction needs to be integrated into the ticket purchasing process. What is the simplest way to deploy this model to production while ensuring minimal latency?
A
Run batch inference with BigQuery ML every five minutes on each new set of tickets issued.
B
Export your model in TensorFlow format, and add a tfx_bsl.public.beam.RunInference step to the Dataflow pipeline.
C
Export your model in TensorFlow format, deploy it on Vertex AI, and query the prediction endpoint from your streaming pipeline.
D
Convert your model with TensorFlow Lite (TFLite), and add it to the mobile app so that the promo code and the incoming request arrive together in Pub/Sub.
No comments yet.