News for hackers. Stuff that matters.
Re:Ask HN: How do I handle a million hits a minute? by owkaye on Wednesday November 12, 2008 @12:50PM (#362050)
Yes, eliminating the sorting is a better way to approach the problem I believe. I've always just 'sorted' to determine a new record's position in the list, but it seems there may be other (more efficient) ways to determine the record's position without sorting ...
Re:Ask HN: How do I handle a million hits a minute? by mleonhard on Thursday November 13, 2008 @01:33AM (#362784)
Do all of the rankings need the same precision? Maybe you can get away with perfect accuracy for the top 1,000 rankings and then provide an approximation for anything >1,000?

You could use a list for the first 1,000 and then store the rest in a tree. Then have another process that walks the tree in-order and updates the ranking of each node.