Our score was calculated by something like this:
var gravity = 1.5;
var score = num_votes / Math.pow(t+2,gravity);
Then we'd just run this function through the whole database periodically (every 5 minutes or something).
Could you share your experience building trees for comments in your project Exipe?
The best would probably actively update on votes and do a catchall operation on ones that haven't been voted on or all on a certain periodic cycle.