-
Notifications
You must be signed in to change notification settings - Fork 4
Description
It would be nice to have versioning support cf. valkyrie#932.
I can see two possible approaches:
-
Implement native S3 object versioning on version-enabled buckets, which should be possible since Shrine expose the underlying Aws::S3::Client.
-
Implement something similar to VersionedDisk and/or the versioning support for Fedora 4 in the Fedora adapter, where we expose only the non-versioned ID, but under the hood, the storage adapter creates a synthetic versioned ID.
To make this work efficiently in S3, you'd want an ID structure similar to the Fedora ID, say
<object id>/versions/<timestamp>(and personally I'd prefer the human-readable timestamps used in the Fedora adapter to the raw Unix timestamps used inVersionedDisk), so you can do a bucket lookup with<object id>/versions/as the prefix, but the code would otherwise probably look more likeVersionedDisk.
Approach #2 is what we've been more or less trying to do in Comet. It's a little more complex because you need to do more bookkeeping, handle deletion, etc., but on the other hand it's more self-contained b/c it's independent of your S3 configuration.
Thoughts?