This is very interesting!

I’ve thought about that, and I think it depends on your application. In my case, it was not reasonable to update the rank regularly, because that would happen too frequently to make sense.

The one thing with my approach is that it’s at the mercy of the $sort operator in MongoDB. If two players have the same ranking, MongoDB is going to determine who is above the other. But again, depending on your application, you can handle the sorting however you want to, solving this issue.

Like what you read? Give Dan Delaney a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.