Subject: [Simple] XCAP - Idempotent Delete

From: "Joel M. Halpern" <[email-masked]>
Date: Sun, 01 Aug 2004 12:22:33 -0400

I noticed in reading the recent XCAP draft that in making everything 
Idempotent, certain restrictions were introduced.

Given a document
    <foo>
      <bar> contenta </bar>
      <bar> contentb </bar>
      <bar> contentc </bar>
    </foo>
one can replace the second bar with a path of the form /foo/bar[2].
However, one can not delete that second element with /foo/bar[2], because 
that delete, if applied a second time, would produce a different document 
(i.e. it is not idempotent.)

I can live with this restriction.
But it does awkward.
Also, the server is require to check the condition, which makes for some 
interesting error checking code.

Yours,
Joel M. Halpern

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Jonathan Rosenberg <[email-masked]>
Date: Sun, 01 Aug 2004 13:17:07 -0400

Joel M. Halpern wrote:

> However, one can not delete that second element with /foo/bar[2], 
> because that delete, if applied a second time, would produce a different 
> document (i.e. it is not idempotent.)

That's not the intent. The intent is that it is allowed.

The definition of idempotent is that a series of N operations have the 
same effect as 1. If I do N DELETE operations to foo/bar[2], the first 
causes the delete, and the rest generate 404. The net result is that N 
of the operations have the same result as 1, and thus the operation is 
idempotent.

> interesting error checking code.

Jari had a similar impression, so clearly there is text in here that is 
conveying an intent that I am not seeing. Can you point to the specific 
text that is leading you to this conclusion?

Thanks,
Jonathan R.

-- 
Jonathan D. Rosenberg, Ph.D.                600 Lanidex Plaza
Chief Technology Officer                    Parsippany, NJ 07054-2711
dynamicsoft
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

---

From: Jari Urpalainen <[email-masked]>
Date: Mon, 02 Aug 2004 15:42:14 +0300

> of the operations have the same result as 1, and thus the operation is 

ok, given this definition for idempotent delete I'll agree with Joel as
the second delete will find <bar>contentc</bar> which is another
resource (!). But then deleting /foo/bar[3] would be idempotent and all
of the similar delete requests are still unambiguous. 

> > interesting error checking code.

it is easy to implement if you just have to check after successful
delete that you'll don't find anything. Anyway, I'll fully agree that
this idempotency requirement introduces protocol ugliness but apparently
we have to comply with rfc2616...

> text that is leading you to this conclusion?
br,
Jari

---

From: Jari Urpalainen <[email-masked]>
Date: Mon, 02 Aug 2004 15:45:40 +0300

br,
Jari