Re: Idempotent partial updates

ons 2012-02-29 klockan 16:35 -0800 skrev Martin Thomson:
> 2012/2/29 Henrik Nordström <henrik@henriknordstrom.net>:
> > It also desirable that idempotent methods are used for idempotent
> > actions,
> 
> Actually, a server has to be prepared for the consequences if it
> treats idempotent requests in a non-idempotent fashion.  Clients (and
> intermediaries) should not bear the responsibility for bad code...

Yes, there is no non- above. What you mention here was covered in
another part.

> > but using requests defined as non-idempotent for idempotent
> > actions do not cause any breakage, only slight loss of efficiency.
> 
> Depends on the axis you use for measuring efficiency.  I somewhat like
> the resiliency afforded by idempotent operations and prefer to use
> POST and PATCH in a way that they are effectively idempotent, within
> the context of the application.  So retrying doesn't result in waste
> of other types (orphaned state, etc).

There is a slight loss of efficiency as intermediaries can not tell
these are idempotent so they can't pipeline them and also need to take
special care when forwarding the request to an existing persistent
server connection as they can not afford running into concurrent server
close condition when forwarding a seemingly non-indempotent request.

Regards
Henrik

Received on Thursday, 1 March 2012 01:30:18 UTC