How to change a node field when the output of a View changes? I have a View Top 3 that displays the 3 nodes with the highest average voting scores (I use Fivestar via comments on the nodes for voting). Every node has a field Highest ranking, that - as the name suggests - should store the highest ranking ever obtained in Top 3.

Now, the View Top 3 also filters nodes that were created less than 5 days ago. I'm wondering how I can change the Highest ranking fields of the nodes in the top 3 when the top 3 changes. The above explanation should make clear that this can happen when


a new comment with a vote has been created;
an existing comment with a vote has been changed;
a node is older than 5 days and is therefore banned from the top 3.


Which hooks can I use for this?
Implement something like hook_views_pre_render() or hook_views_post_execute() and, every time your "Top 3" view is executed have your code iterate over the results and update the "Highest Ranking" field for each of the nodes in the top 3 as needed.

The only downside of this is that if your "Top 3" view is rarely ever executed then it's possible that a node could move into then back out of the Top 3 without the view ever being executed and thus without your code ever recording the node's presence in the top 3.  If you want to try to avoid this you might implement hook_cron and programmatically call your view every time cron is run.