This was asked in one of the interviews. I would like to know the possible answers to this question.
"You have a shared folder, which everybody can see. You want to upload 100 files. This upload of 100 files should atomic i.e either all files are available to download to any user or no file is available to download.
One can argue that he will delete the uploaded files if operation fails in between but that is not an option because once a file is uploaded, it becomes visible to other users.
What can be the possible solutions?
My solution - Upload them first to a private folder and then share that folder inside the main shared folder.
It will be almost impossible to achieve isolation if you are using these cloud services. You can do it if you have your own server. Distributed systems is the topic which deals with similar kind of problems.
You can put a lock on a folder and upload all the files and then can change the lock on that folder.