It would be great if user-performed course backups could be asynchronous, as in, the request returns instantly with a message that the backup is "queued". The user can then return to the backups page later to check if the backup is complete. There could be an AJAX interface to prevent them from needing to hit refresh.
The back-end would be implemented in a process-queue. The advantage being:
- Long-running backup processes do not hold up apache threads and use excessive memory/cpu on page-serving nodes which can effect other page requests.
- The user's session is not locked during the time that the backup is running
- It prevents all issues relating to max execution time, load balancer idle timeouts, partially completed backups, that can make course backups/restores fail.
- It would allow the process queue to be scaled by adding more servers that pull from the queue.
- Most importantly, it prevents multiple concurrent backups from slowing down the system. We can limit and control the concurrency and scale the worker pool as needed.
This is obviously not a trivial thing to implement, and for low-end users who download a WAMP package it needs to be just as easy to get running. However, for enterprise deployments this would be an excellent architectural change.
Note that it is pretty common amongst large-scale web applications to not 'block' on long-running operations - but rather to return instantly and send a job to a back-end process queue.