-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download Service Work #484
Comments
more thoughts:
|
regarding the above comment, i spent a good bit of time playing with this today, and wanted to document my findings here for future purposes. to put this in context, this is trying to figure out a good way to solve the following problem - since we allow downloading large files, we allow the user to continue the download from where they left off. so what happens if the file changes server side? since this doesn't happen often, our way of dealing with this up until now was to either pretend the problem doesn't exist (with audio, for example), or rename or move the pages and clear any partial downloads (as was done to fix #529, for example). there are 2 ways of fixing this problem:
one workaround would be to add an offset (ex 1 day) to the that having been said, the two solutions would be:
either way, this is likely not an extremely high priority feature at this point in time. |
This new directory contains the newest image zips. For now, did not want to change the existing zips in place, since this can cause incorrect downloads (using part of an old file and continuing with part of the new one). Eventually, this will be inevitable, since we're likely to symlink the old files to the new ones at some point (so that the many users who have not yet upgraded can still get the newest images if downloading their images for the first time). Also see #484 for more discussions around this problem.
This new directory contains the newest image zips. For now, did not want to change the existing zips in place, since this can cause incorrect downloads (using part of an old file and continuing with part of the new one). Eventually, this will be inevitable, since we're likely to symlink the old files to the new ones at some point (so that the many users who have not yet upgraded can still get the newest images if downloading their images for the first time). Also see #484 for more discussions around this problem.
This new directory contains the newest image zips. For now, did not want to change the existing zips in place, since this can cause incorrect downloads (using part of an old file and continuing with part of the new one). Eventually, this will be inevitable, since we're likely to symlink the old files to the new ones at some point (so that the many users who have not yet upgraded can still get the newest images if downloading their images for the first time). Also see #484 for more discussions around this problem.
This new directory contains the newest image zips. For now, did not want to change the existing zips in place, since this can cause incorrect downloads (using part of an old file and continuing with part of the new one). Eventually, this will be inevitable, since we're likely to symlink the old files to the new ones at some point (so that the many users who have not yet upgraded can still get the newest images if downloading their images for the first time). Also see #484 for more discussions around this problem.
#498 point 3, is it related to this? |
wow, this issue is super old! #498's point 3 is still valid though |
QuranDownloadService
is currently one download at a time. while this is intentional, it is also problematic:AudioManager
also blocks (for the same reason).proposed solution
SingleThreadExecutors
- for pages, audio, translations, and "mass audio," respectively.Handler
can take "done" posts tostopSelf
when everything is done (or the thread itself can call stopSelf after locking and decrementing an int and ensuring it's 0).alternative solution
while the alternative solution is better for cost (server load, etc), the proposed solution above is better for usability. in practice (after the first initial download), a user would still only be able to have 2 long running downloads at a time (audio download from the Quran pages and one from the download manager).
The text was updated successfully, but these errors were encountered: