Search the web
Sign In
New User? Sign Up
rest-discuss · REST Discussion Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Appropriate status code when creating a lock fails?   Message List  
Reply | Forward Message #13085 of 14029 |
Re: [rest-discuss] Appropriate status code when creating a lock fails?

Leaving aside the question of whether pessimistic locking over the web
is a good or bad, I would expect a lock at the end of this operation.
This of course, leads to the pattern that the author(s) of RETRO tried.

Subbu

On Jul 4, 2009, at 4:08 PM, Jan Algermissen wrote:

>
> On Jul 4, 2009, at 7:04 PM, Subbu Allamaraju wrote:
>
>> Just curious - why would the server want to offer such a
>> functionality
>> as locking to its clients?
>
> Because it is (currently) a requirement of the owners of the system
> to use a pessimistic locking strategy, IOW, not HTTPs conditional
> write approach with If-Match.
>
> Jan
>
>
>
>>
>> Subbu
>>
>> On Jul 3, 2009, at 7:01 PM, Jan Algermissen wrote:
>>
>>>
>>>
>>> Hi,
>>>
>>> suppose a situation where clients know that creating a lock on some
>>> resource
>>>
>>> http://www.example.com/docs/1234
>>>
>>> is done by PUTing to
>>>
>>> http://www.example.com/properties/1234?lock
>>>
>>> I see two ways how to address the situation that the lock can alreay
>>> exist and that the
>>> request should then fail:
>>>
>>> a) PUT /properties/1234?lock
>>> If-None-Match: *
>>>
>>> 304 Precondition Failed
>>>
>>> b) PUT /properties/1234?lock
>>>
>>> 409 Conflict
>>>
>>> The former bears the question what the server should do when the
>>> client does not make
>>> the request condtional (-> 409??) and regading the latter I am not
>>> sure if the semantics
>>> are correct.
>>>
>>> Can anybody provide a clue?
>>>
>>> Jan
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------
>>
>> Yahoo! Groups Links
>>
>>
>>
>




Sat Jul 4, 2009 11:22 pm

sallamar
Online Now Online Now
Send Email Send Email

Forward
Message #13085 of 14029 |
Expand Messages Author Sort by Date

Hi, suppose a situation where clients know that creating a lock on some resource http://www.example.com/docs/1234 is done by PUTing to ...
Jan Algermissen
algermissen1971
Offline Send Email
Jul 4, 2009
2:02 am

Doh - got things mixed up 304 should obviously have been 412 ....
Jan Algermissen
algermissen1971
Offline Send Email
Jul 4, 2009
2:20 am

if a concurrency header is required, but missing I usually return 412 with additonal text reminding of the requirement. ... -- mca http://amundsen.com/blog/...
mike amundsen
mamund
Offline Send Email
Jul 4, 2009
3:29 am

Just curious - why would the server want to lock a resource? Subbu...
Subbu Allamaraju
sallamar
Online Now Send Email
Jul 4, 2009
10:57 pm

Just curious - why would the server want to offer such a functionality as locking to its clients? Subbu...
Subbu Allamaraju
sallamar
Online Now Send Email
Jul 4, 2009
11:04 pm

... Because it is (currently) a requirement of the owners of the system to use a pessimistic locking strategy, IOW, not HTTPs conditional write approach with...
Jan Algermissen
algermissen1971
Offline Send Email
Jul 4, 2009
11:10 pm

Leaving aside the question of whether pessimistic locking over the web is a good or bad, I would expect a lock at the end of this operation. This of course,...
Subbu Allamaraju
sallamar
Online Now Send Email
Jul 4, 2009
11:23 pm

... Use WebDAV LOCK http://msdn.microsoft.com/en-us/library/aa142897%28EXCHG.65%29.aspx Bill...
Bill de hOra
bdehora
Offline Send Email
Jul 5, 2009
10:38 am

... Or <http://greenbytes.de/tech/webdav/rfc4918.html#METHOD_LOCK>. BR, Julian...
Julian Reschke
JulianReschke
Offline Send Email
Jul 6, 2009
1:07 pm

... For my current application (cloud infrastructure API) there are a number of places where such locking would be useful - for example when dealing with ...
Sam Johnston
sam.johnston...
Offline Send Email
Jul 6, 2009
12:34 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help