Re: ldp-ISSUE-28 (bertails): transaction/rollback when deleting resources from a LDPC [Linked Data Platform core]

On 11/05/2012 03:02 PM, Richard Cyganiak wrote:
> On 5 Nov 2012, at 19:18, Alexandre Bertails wrote:
>>> Servers should indicate through the status code whether deletion of all children was successful or not.
>>
>> Yes, but I'd also like to know what went wrong. This is directly
>> related to the thread about returning machine-readable errors. This
>> does not have to be a MUST for the same argument than above.
>
> I agree. My only concern with machine-readable errors is that it's hard to know where to stop. Things can fail for innumerable reasons, and for most of them, a machine probably wouldn't know what to do about it except reporting the error to the user, so why allow the machine to distinguish between the cases?

I would agree that it's "difficult" in the general case. I guess it
will be difficult to list all the possible scenarios in the spec, if
even possible :-)

But we can always expect the server to follow a best-effort
approach. And even if we don't know the exact reason of what went
wrong, we should always be able to say what specific resource(s)
failed to be deleted. It will be enough in many cases.

Also, the errors may be specific to a particular
implementation. Following a linked-data approach, each server could
have its own list of potential issues as URIs. And we could say in the
spec something like: "The server MAY denote errors using custom
URIs. These URIs SHOULD be deferencable."

Alexandre.

>
> Best,
> Richard
>
>
>>> A possible invariant would be: The container itself is only deleted if all of its children were successfully deleted. If some of the children could not deleted, then an appropriate error in the 4XX range is returned and the container remains undeleted. The server SHOULD NOT delete any children if it can work out in advance that it will not be able to delete them all. The container itself thus can only be deleted if it has no children left, and only in that case will a 200/204 be returned.
>>
>> This looks ok to me.
>>
>> Alexandre.
>>
>>>
>>> Best,
>>> Richard
>>>
>>>
>>>
>>>> The general case would be: if something fails when deleting/modifying one the impacted resources, then the server returns an error (with a message explaining the error) and no resource is deleted. This should be captured in at least 5.6.1 and 5.6.2.
>>>>
>>>> I'm not sure about the following case though: the "child" LDPR for a given LDPC may not be on the same server. It may be a bad idea to return an error if a distant resource couldn't be deleted.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>

Received on Monday, 5 November 2012 20:22:35 UTC