I plan to include a poll in my game where players can apply a number of votes to different items in the poll. The poll would be made of many entries, several hundred most likely. Players can adjust or change which entries their votes are applied to at any time.
Currently I have players submitting their votes via cloudscript / azure function which validates them and stores them in the player's readonly PlayerData.
My problem I've encountered is how to total the number votes in real time (or close to it) for display in the client so that players can see how popular different items in the poll currently are. The simple solution sounds like it would be to write a server-side function that iterates through every player data and does the calculations and publishes the up-to-date data but I've found out that this is unacceptably slow, requiring an individual api call for every individual player.
There are entity objects and GetProfiles but even that seems to be limited to 25 profiles at a time?
An alternative may be to keep a total record that is adjusted accordingly by a delta every time a player submits their individual votes based on what their previous votes were, but this introduces multiple versions of truth and I'm concerned about this method becoming out of sync and inaccurate.
Is there anything on the playfab side that can handle this or do I need to look into some azure capabilities for data storage and retrieval instead?