On 30.11.2011 09:44, Thomas Mueller wrote:
Hi,

Another proposed addition is a 'test' line:

= "/swiss/lx 38/availableSeats": 100
^ "/swiss/lx 38/availableSeats": 99

The meaning of the 'test' line (the one starting with '=') is: before
applying the rest of patch, the value is verified. If it does not match,
then the subsequent line(s) will not be applied. The exact semantics are
not yet defined however and will most likely be implementation specific -
for example it is undefined whether a mismatch will result in an exception
or not, and whether all following lines of the commit belong to the same
atomic operation or not.

This addition allows to construct atomic commits - see also
http://en.wikipedia.org/wiki/Test-and-set

I agree that this might be useful, but a simpler approach is to use HTTP's If-Match header. Of course that requires having a sane strategy to compute ETags.

Best regards, Julian

Reply via email to