Asynchronous file operations
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Long running file operations like copy or move requests are very prone to timeouts, which means that there might be an inconsistent state if a request gets aborted due to a webserver or php timeout.
Opening this ticket to keep track of further ideas to optimize that in terms that the heavy lifting could be done asynchronously in some background process. Not meant as a concrete implementation suggestion yet.
Some ideas:
- The actual request puts the operation into a queue
- Find a way to handle the pending state in the response
- Allow checking for the progress/state of the operation
- Maybe have some kind of pending virtual file in the tree (especially for MOVE)
Possible process for a upload:
- Do the chunked upload as before
- The move request just schedules a task in the queue to assemble the file
- As long as the assembly is pending we have a somehow hidden pending file entry
- Clients can check the state on the pending file
- The worker queue will build the final file and move it to the location and remove the pending file
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by mapping the existing copy, move, upload, and request-handling paths, then review how background queues and operation state are handled elsewhere in the server. The issue does not define a concrete implementation or acceptance criteria, so the expected completion point remains undecided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100