Open slaweet opened 8 years ago
It seems that fc_queue_size_max is set to 1 [0] (and it is also corresponding to reality). I understand the problem with high traffic, maybe we should try fc_queue_size_max=2. I also understand motivation of replacing question in queue but I believe that solution of problems during high traffic do not lies in this (we give backend more work to do - selection flashcards is expensive and replacing them is wasting). Solution can be in settting fc_queue_size_max dynamically based on traffic?
[0] https://github.com/adaptive-learning/geography/blob/master/geography/proso_config.yaml#L17
It is not just high traffic problem, but also low network speed on mobile.
I think that fetching questions after every answer is expensive, but selecting 4 flashcards instead of 2 isn't that much of additional cost (at least it was the case in the original implementation. I'm not sure how it's currently implemented).
You are right, overhead for 4 flashcards instead of 2 is really small (I think).
practiceService.getFlashcard [0] has currently some questions in the queue (On both geography and anatomy is fc_queue_size_max [1] set to 2). New questions are fetched only when the queue is empty and user has to wait for questions being fetched from the server (when there is high traffic it happens a lot).
practiceService should be changed so that it has always some questions in the queue, but at the same time it can replace them with more fresh (recently fetched) questions.
[0] https://github.com/adaptive-learning/proso-apps-js/blob/master/src/flashcards-practice/practice.js#L127 [1] https://github.com/adaptive-learning/proso-apps-js/blob/master/src/flashcards-practice/practice.js#L25