Downsides of Dynamic Achievements1:21
you just dynamically filter through all of those that have been registered, and you compare them against the given user, and you build up a collection of awarded achievement badges. Now, what are the downsides? Well, the downsides are, what if you need to query against this? For example, what if, as the administrator, I wanted to say, give me all users who have been awarded the Alercast Mastery Badge? In those situations, you kind of want a database, right? It's a very simple query. In this case, we don't have it. Instead, we would have to grab all users in the system, filter through them, call the method that builds up their dynamic list of achievements earned, and then we can calculate it that way. Yeah, you can maybe do it once a day and throw it into Redis for performance reasons, but again, at that point, a database is so much more intuitive. Another example would be timestamps. What
Switching to Database Solution4:02
everything we did there. All right. So if we go back to our achievements test, we're once again in this situation where this test is failing. So in the next episode, using the database, we're going to work on a clean solution.
