ianG wrote:
> Hi all,
>
> I'm wrestling with a protocol error condition where an action has been
> done already, the requester innocently asks for it to be done, and is
> told that it is already done.  Idempotency, in a nutshell.
>
> The problem with "already done" in an idempotent sense is that it is
> both an error and a success.

But that's not what idempotent means.  It means that the same 
transaction has the same attack -
you can repeat it multiple times without worry.

write(key, value) is idempotent (for the same key/value pair)
add 1 to value is not

an "already done" message is implicitly NOT idempotent (the more 
appropriate response is
returning the value) - for example:
read(key) -> 10
write(key,20) -> 20
write(key,20) -> 20
write(key,20) -> 20
is idempotent.

Miles Fidelman

-- 
In theory, there is no difference between theory and practice.
In practice, there is.   .... Yogi Berra

_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers

Reply via email to