Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4496

Concurrency in the REST API (v7) using ETags

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Received (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Needed

      Description

      Ideally, the new DSpace REST API (v7) should allow for multiple editors to edit the same object at the same time.

      This means that if two people are editing the same object (e.g. adding/removing metadata fields) at the same time, the REST API should provide expected responses similar to the following:

      • If both edits occur on different metadata fields, ideally they are both saved.
      • If both edits occur on the same metadata field, then the first one should be saved while the second would report back that the object has changed in some way.

      Generally speaking, this behavior requires being able to determine if the object changed from when you began editing, in order to determine if your edits are still valid.

      In our meeting on March 7, 2019 it was decided to use ETags to implement concurrency. Those are noted in our REST Contract at: https://github.com/DSpace/Rest7Contract#etags--conditional-headers

      ETags seem to have broader support in other REST APIs and was recommended by folks working both on the front end (Angular UI) and backend. However, it is worth noting that even with ETags, some errors may still occur. ETags only update if two fields match. So, if someone edits first, your edit would fail and you'd get a fail response code (422).

      This ticket is to note this decision to support ETags. It is unlikely to be implemented in 7.0, but should be implemented in 7.x or 8.0.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tdonohue Tim Donohue
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: