I have this firestore database by firebase. This database contains documents which clients can then 'download' (i.e. view the data and parse it locally into a model class).
What I now would like to do is to mark certain documents as 'featured'. A document is featured if the average download count of the past 7 days is more than twice than that of the average of 14 days before and if the download count exceeds a certain threshold. I still might tweek this function.
But in order to do this marking, I'd need to run a function that reads in each document's download count (I put this download count inside the data of the document) every day, store those values and compare it to the stored values of earlier days.
What I now wonder is, does firebase have such functionality that allows me to host such a function or do I really need to setup my own external server (not my desktop of course) just for doing this?