I actually did this for exipe.com in node.js/mongodb let me look it up.
Our score was calculated by something like this:
var gravity = 1.5;
var score = num_votes / Math.pow(t+2,gravity);
Gravity being how quickly a post would fall. Notice the t+2 ... it added 2 hours to all posts in order to eliminate things that were recently posted with like one vote sitting at the top.Then we'd just run this function through the whole database periodically (every 5 minutes or something).
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.
Could you share your experience building trees for comments in your project Exipe?