Skip to content

Implement versioning #20

@dmolesUC

Description

@dmolesUC

It would be nice to have versioning support cf. valkyrie#932.

I can see two possible approaches:

  1. Implement native S3 object versioning on version-enabled buckets, which should be possible since Shrine expose the underlying Aws::S3::Client.

  2. 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 in VersionedDisk), so you can do a bucket lookup with <object id>/versions/ as the prefix, but the code would otherwise probably look more like VersionedDisk.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions