IIIF / discovery

8 stars 3 forks source link

Single create/delete requirement justified? #49

Closed azaroth42 closed 4 years ago

azaroth42 commented 5 years ago

In the API we say that each resource must have at most one Create or Delete activity: https://preview.iiif.io/api/discovery-0.3/api/discovery/0.3/#activities

But if you delete something, and then put another resource in its place with the same URI, then what? You would need to just file Updates after the Delete, which makes no sense.

Propose to change this to clarify that you can't Create, then Create, then Create, but you can Create, then Delete, then Create.

(From @zimeon review of 0.3)

aisaac commented 5 years ago

The proposed clarification makes sense to me, but I'm not sure that we should be very strict in the specification of such constraint. In fact the comment I'm going to make may apply to the original constraint " Each resource must have at most one Create Activity in which it is the object."

I.e. there could be systems that cannot make the difference between an Update or a Create. In fact this was pretty much what happened at Europeana for a while: basically every update of a record would be a 're-creation' of that record. I think such situation is less than ideal of course, but do we want to just remove from the landscape these systems that may struggle?

azaroth42 commented 5 years ago

That's still okay -- this is only in the "level 2" discussion where Create and Delete are introduced. If all you use is Update, then no problem :)

zimeon commented 5 years ago

My original question was motivated by the question of whether it should be illegal to delete and then recreate a resource in the IIIF world... enforced by the discovery spec. We understand that URI re-use is generally a bad idea but not forbidden. The proposed requirement that there be only one "Create" or "Delete" action for a given resource seems not to have any meaningful benefit to downstream services -- whatever the sequence the current state is still obvious -- but does have a rather far reaching implication that might impact some systems

aisaac commented 5 years ago

@zimeon my comment was about "re-creating the same resource", really, not re-using a URI for another resource. So it was quite a bad situation. And to answer @azaroth42 's comment, if we would have been asked to output Create/Delete (and certainly we would have like to be level 2- compliant!) then these 'wrong' Create/Delete would have been mixed with 'good' ones.

But well this is a purely hypothetical argument, as hopefully our situation is better now ;-) But indeed I guess some systems may feel the consequences of the rule.