How to use ML model in real time within Azure where model depends on e.g. clickstreams?

Viewed 43

I try to deploy service on Azure that will consume the ML model, in order to return information about the best offer that is displayed in a form of a banner to a person using the mobile application. For this I wanted to use all the goodness of Azure, i.e., build and register a model using Azure ML, and then perform a deploy to AKS with endpoint exposed to a client.

Data that is needed to perform scoring is a stream of information about clicks made by the user in the application and there is no way to store information about clicks on the client side. I was thinking about streaming the data about these events (clicks) with Kafka, using a consumer to write it to some storage in Azure (e.g. Cosmos DB) and responding to scoring queries in parallel (data would then be retrieved from the database when the endpoint is called). The problem with this approach, however, is that there is no assurance that all the events (clicks), that occurred before the scoring query takes place, have already been recorded.

An alternative to this approach would be to record information about clicks through a separate endpoint of the service itself, which would run in a synchronous mode, to make sure that "GET offer" endpoint is executed after all events that took place before requesting for an offer were registered. However, my intuition tells me that this would not be very efficient and could be set up in a smarter way within Azure.

So, my question is: How to use ML model in real time within Azure, making sure that all the data that was sent before requesting the model for scoring is present?

0 Answers
Related