Skip to content

Consider trov:accessMode on ArrangementBinding #31

@tmcphillips

Description

@tmcphillips

With trov:ArrangementBinding adopted as the uniform way for TRPs to reference arrangements (#30), we can reconsider how the access role (read vs. write) is expressed. Currently, the role is determined by which property the binding appears under (trov:accessedArrangement vs trov:contributedToArrangement).

An alternative would be to use trov:accessedArrangement for all bindings, with the access mode (via a trov:accessMode property with a value of trov:Read, trov:Write, or both) on the binding itself. This would simplify describing TRPs that might read from and write to the same arrangement; a single binding could list both access modes.

Current approach

Currently (per #30), read-only and write-only arrangements are under separate properties; a read+write arrangement must appear under both:

{
    "@id": "trp/0",
    "@type": "trov:TrustedResearchPerformance",
    "trov:accessedArrangement": [
        {
            "@id": "trp/0/binding/0",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/0" },
            "trov:boundTo": "/data"
        },
        {
            "@id": "trp/0/binding/1",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/1" },
            "trov:boundTo": "/workspace"
        }
    ],
    "trov:contributedToArrangement": [
        {
            "@id": "trp/0/binding/2",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/2" },
            "trov:boundTo": "/output"
        },
        {
            "@id": "trp/0/binding/3",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/1" },
            "trov:boundTo": "/workspace"
        }
    ]
}

Note that arrangement/1 above appears twice with the same trov:boundTo value duplicated. The biggest problem here is that these declarations can be inconsistent, with the same arrangement apparently bound at two different paths in the same TRP.

Proposed alternative

{
    "@id": "trp/0",
    "@type": "trov:TrustedResearchPerformance",
    "trov:accessedArrangement": [
        {
            "@id": "trp/0/binding/0",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/0" },
            "trov:accessMode": { "@id": "trov:Read" },
            "trov:boundTo": "/data"
        },
        {
            "@id": "trp/0/binding/1",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/2" },
            "trov:accessMode": { "@id": "trov:Write" },
            "trov:boundTo": "/output"
        },
        {
            "@id": "trp/0/binding/2",
            "@type": "trov:ArrangementBinding",
            "trov:arrangement": { "@id": "arrangement/1" },
            "trov:accessMode": [
                { "@id": "trov:Read" },
                { "@id": "trov:Write" }
            ],
            "trov:boundTo": "/workspace"
        }
    ]
}

In this scheme, arrangement/1 (read+write) appears once with both access modes declared in one place. No duplication, and it's clearer that the TRP read from /data, wrote to /output, and had dual access to /workspace.

Why dual access modes are useful

Distinguishing access modes (one way or the other) is a cheap way of communicating provenance relationships. A new file produced by a TRP can only have been derived (assuming the appropriate TRS capabilities are available and enabled) from artifacts that the TRP had read access to (because write access does not imply read access).

Other questions to consider

  1. Are trov:Read and trov:Write the right names for the modes and cover the scenarios (for now)?

  2. Should trov:accessMode be required or optional? If omitted, the binding could imply read/write. But this convention might limit our ability to add more modes in the future.

Related

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