It’s just data

Idempotency

I agree with DJ's point #1.  I'll fess up: that statement was made for dramatic effect.

Re: point #2... let's review the definition of idempotentThe methods GET, HEAD, PUT and DELETE share this property.  Yes, DELETE is idempotent.

As for #3... let's change the example slightly... for every query, your account balance is debited ten cents.  In other words, a scenario where one definitely incurs an obligation in return for the response.

Note: my real goal with bringing up this discussion was not to rehash RPC vs REST, but to establish that this is not a simple black or white issue.

Meanwhile, for those who haven't seen it, there is a fascinating discussion going on in the comments to my original blog entry.


None of your links points to a definition of idempotence. How come?

I expected at least one link to be similar to definition #1 at

http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?idempotent

PS: You really need to allow some HTML tags in this text entry box.


Posted by Dare Obasanjo

at

I (attempted to) link to three definitions, one each on the three words of "definition" "of" "idempotent". The href for the link behind definition was incorrect and has been updated.

Posted by Sam Ruby at

Dare,

The mathematical definition of idempotency does not apply to HTTP.

(You probably already know this if you hang out on the REST list along with all the other cool software architects, but I put this here for purposes of posterity).

To quote Roy Fielding:

"Idempotence of methods is specifically not identical to idempotence
of mathematical operations, as is explained in the spec. We did not
attempt to make it more formal because the goal was to have the
specification describe the interface as it was intended, not define
it in such a way that only static resources could be implemented." [1]

[1] http://www.xent.com/pipermail/fork/2001-July/001946.html

Hopefully this makes it clear what idempotent wrt HTTP means.

Thanks goes out to Jeff Winter who found this quote.





Posted by itdp

at

So basically they made up a meaning for idempotency which has no formal definition?

Yet another reason to be thankful for not wasting my time debating this REST tomfollery.

Posted by Dare Obasanjo at

Add your comment