OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] A question about REST and transaction isolation

[ Lists Home | Date Index | Thread Index ]

"K. Ari Krupnikov" wrote:

>"Bullard, Claude L (Len)" <clbullar@ingr.com> writes:
>
>  
>
>>I'm not sure what you are trying to achieve.
>>    
>>
>
>User A GETs a resource and edits it. User B GETs a resource and edits
>it. User A PUTs the modified resource back. User B PUTs her version of
>the modified resource back, unaware of A's edits. A's edits are lost
>without anyone noticing. What I want to happen is B to get a 409
>"Conflict" or some such.
>  
>
Take a look at the ETag (RFC2616 14.19)and If-Match (14.24).  In the 
request, you would get back an ETag value (which might be the timestamp 
of the resource, some GUID, etc.)  When PUTting the updated resource, 
you use If-Match.  If the resource has been updated in the interim (and 
therefore has a new ETag), then you get back a 412 "Precondition Failed" 
(10.4.13) response.

>>REST isn't a good idea for isolating a transaction unless that
>>transaction is expressed as a document.
>>    
>>
>
>A lockfile is a document. Just not one I would have thought should be
>exposed to the user :=)
>  
>
I'm not sure that I would equate a "transaction resource" to a "lockfile 
document".

Seairth Jacobs





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS