You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the implementation of the image deletion async task, discussion was started on the repercussions of permanently deleting images in the backend. Since animl is being viewed/used as an image hosting service by many of our users, we are starting to see the need for the reversibility of image deletion. A proposed solution would be to instead of immediately deleting the image records from mongoDB, we can flag the records for deletion at a later time by some kind of automated process.
Proposed solution:
mark images in mongoDB records, such as Image.queuedForDeletion: true, and also create a Image.queuedForDeletionDate: 01/01/2025. The queued for deletion date can be the date when the image is first queued for deletion or it can be the date it is meant to be deleted by
create a process that runs on a schedule checking for images queued for deletion and deleting them after the appropriate time requirement along with the corresponding s3 objects
This would be the more performant option as it offloads most of the processing to the scheduled process, and only needs to flip a flag on each image, which I imagine is simpler than deleting an image record. This also preserves the most information, such as any human created objects, and any validation that is done by a human.
Alternative solution that I have been thinking about, but not fully thought out:
leave as is by deleting the mongo records but instead moving the s3 objects to a temporary bucket with a retention policy
if a user wishes to recover these images, we can download the images and allow them to reupload the images and just create new mongo records instead
This solution would be less performant than the original proposed solution, but also makes the image recovery process a bit simpler, while also making the implementation easier. There would be some information lost with the mongo record deletions, but not sure how critical some of that information would be.
reference to the initial discussion notes: #148 (comment)
The text was updated successfully, but these errors were encountered:
After the implementation of the image deletion async task, discussion was started on the repercussions of permanently deleting images in the backend. Since animl is being viewed/used as an image hosting service by many of our users, we are starting to see the need for the reversibility of image deletion. A proposed solution would be to instead of immediately deleting the image records from mongoDB, we can flag the records for deletion at a later time by some kind of automated process.
Proposed solution:
Image.queuedForDeletion: true
, and also create aImage.queuedForDeletionDate: 01/01/2025
. The queued for deletion date can be the date when the image is first queued for deletion or it can be the date it is meant to be deleted byThis would be the more performant option as it offloads most of the processing to the scheduled process, and only needs to flip a flag on each image, which I imagine is simpler than deleting an image record. This also preserves the most information, such as any human created objects, and any validation that is done by a human.
Alternative solution that I have been thinking about, but not fully thought out:
This solution would be less performant than the original proposed solution, but also makes the image recovery process a bit simpler, while also making the implementation easier. There would be some information lost with the mongo record deletions, but not sure how critical some of that information would be.
reference to the initial discussion notes: #148 (comment)
The text was updated successfully, but these errors were encountered: