DISQUS

Building Browsergames: Simple Cron

  • bardic · 1 year ago
    While crons are a good way to do such a task, they aren't the best solution. For a game with a large DB a cron can take too long to cycle through the DB.

    Classic example is TornCity. Their crons (when they were using crons) would take so long that it could take up to a day for a player to get a single update which was to occur every 15 minutes.

    Instead a better solution would be the "on-view" event in my opinion. We have discussed this solution on my blog, and it seems to be the best solution.

    The basic idea is that fields aren't updated till they have to been updated. So if I were to attacking someone, their info would be updated before the attack was made.