I like the concept of badges and achievements for the website that I am developing. It has been proven that they improve the usage / usage speed, and I think this can be a great motivator for the application that I would like to develop.
At a high level, I can imagine 3 ways to do this.
Check members that meet the requirements as a cron job: This doesnโt seem like a good idea for me, as the number of participants increases, the cron task takes more time and time.
Every time an action is completed, which may meet the requirements for the icon, check if any icons should be checked : This seems like a good way to do this, but it looks like I could potentially damage the server by constantly checking the already marked icons or what the user may not even come close to him.
Each time a user completes an action that can receive badges, check to see if they already have this, and then check to see if they meet the requirements:. This is also good, but if I save the user as an object, it seems that he can get prohibitively large or that I can finish getting into the database by checking the achievements quite a lot.
Are there any options that I am missing? Are my problems one or more approaches bloated?
Edit: Is this a much less interesting question than I thought, or am I asking at a bad time? I didnโt understand something?
badge achievements
Chris sobolewski
source share