I have uploaded a file that I want users to extract information from and then edit the file, saving that they have accessed the file(setting a boolean flag to true). My current method involves the user downloading the file, deserializing it, manipulating the data, serializing the updated file, uploading the new file and deleting the old file. My issue is that I could have multiple users trying to access that file. So there may be multiple files floating around in the database when I just want one. Is there a way to queue requests to access a file and then run each request when the file is available?
about 5 years ago
I found a way around this. I upload a flag file that indicates that a user is editing the file. Once completed, the flag file is deleted, indicating that the file can be edited. It seems a bit messy but it insures that only one user edits the file.