Files
Quiz/Reflection.md

1.3 KiB

Issues

Issues during testing

Scheduler

I don't know if it was the scheduler specifically, but whenever I try to test it, both the cache and the queue seem to become empty after the first function is completed. I don't know how to solve this yet

Caching solution

Lack of data

Not being able to gather blocks of 50 is a huge issue. The idea of reusing blocks becomes less viable if I can just get a big chunk every time for others to use I can't force a big chunk, because it might just return a status 1, and then the user gets nothing.

Perhaps I can separate the questions myself and make a collection, that i can build the requests from. However, for every quest tracking if someone has already seen is a huge pain.

Possible solution

Cache all data, 50 at a time Store it in a database When its done, let the db make blocks for quick cache access

Then randomize when someone asks for an item from the cache Or return a failure if there are not enough items (a la the api itself)

Every night, create a new db in the background and start filling it (should take ~34 minutes for all 20k items the external API has) When it's full, replace the old database with the new one, and delete the old one. Then start replacing the cache items one at a time.

Users shouldn't feel this at all, because the active sessions are stored in their own cache items