[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: atom:updated not editable by the client?



On 7/13/05, Eric Scheid <eric.scheid@xxxxxxxxxxxxxxx> wrote:
> 
> 
> In the table at section 6.2, it says atom:updated is a Round Trip element,
> which is defined as
> 
>    Round Trip Element - An element of an Atom Entry whose value is
>    enforced by the server and not editable by the client.
> 
> Surely that is an error.

As I understand it (I'm a relative newcomer), the server would change
the value of  atom:updated when the client does a PUT to update the
value... but the new value is determined by the server, not the client
(i.e. it isn't the value in the PUT entry, but a server-determined
timestamp based upon the time of the PUT).

The atom:updated value provided with the PUT entry can be (must be?)
used to prevent issues around simultaneous updates of the same entry. 
If the client simply echoes back the atom:updated value received via a
GET, then the server can check to see that the current updated on the
entry matches the value the client provides.  If they don't match, the
server can assume this is an attempt to put a "stale" entry and reject
it.

If the above usage is correct, it seems like one thing that would be
beneficial would be if the server somehow returned that set
atom:updated value in the PUT response.   This would enable the client
to do a subsequent PUT w/out an intermediate GET of the entry (to read
back the updated value).  This would be useful in cases where the
client can reasonably assume that is primary owner of the entry value.
  Even in that case, though they have to be ready to handle the
rejection scenario above...

Someone please chime in if I've misunderstood/misinterpreted...

-- Kyle