Apr 17, 2020
I need to publish an API for recommending items based on preferences passed as criteria. The recommendation engine logic relies on shuffling and sorting the items in the list.
The list of items is small (<1000), so I was thinking of bringing them into context at startup (singleton pattern), and letting my Azure Functions (or alternative? must be on Microsoft Azure) do the number crunching with direct access to this dataset.
Is this viable, and if so, where should I implement my singleton initial load (from file): directly within the Azure Function? If not, what else?
Or if the singleton idea doesn't offer much benefit, what good (and cheap) fast-access data store would be recommended? Azure Cosmos DB? Any other? Each of my items can be represented by a small JSON document, like:
{ "id" : "...", "name" : "...", "description" : "...", "qualifiers" : [ "qualifier" : "...", "qualifier" : "...", "qualifier" : "..."]}
(description < 1000 chars; no more than 10 qualifiers).


