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

Indicate entry in Collection Feed is full representation



Hi all, I'm using atompub to publish some light-weight entry data. So,
it works fine to return a list of entries in a feed, where each entry
is a complete representation.

When updating an entry, I wish to keep it simple with minimal network
round trips:
0) (assume the client already has the feed)
1) client verify an entry in the feed is up-to-date, if not retrieve
the latest copy.
2) client modify the entry and put back to server.

I was thinking of using the 'etag' attribute defined in Jame's Link
Extensions draft [1]. The idea is to add an etag attribute in "edit"
atom:link, so that a client can perform an If-Non-Match GET before
start modifying the entry. E.g.,

<feed xmlns="http://www.w3.org/2007/app";
 xmlns:le="http://purl.org/atompub/link-extensions/1.0";>
 <entry>
   <link rel="edit" href="/entries/2" le:etag="xyyz"/>
   ..
 <entry>
</feed>

But I began to realize, if the current spec states: "Clients MUST NOT
assume that an Atom Entry returned in the Feed is a full
representation of an Entry Resource", then what does the le:etag
attribute in an "edit" atom:link indicate? If the client performs an
If-Non-Match GET and 304 Not Modified is returned, does it mean the
entry in the feed is up-to-date, hence implying that the entry is a
full representation? I would like to assume that's true ;-) but I'm
not sure.

I just need a simple two-step update as mentioned above. So, is it
fine to use le:etag in this way? or is there another way to indicate
an entry in a Collection Feed is a full representation?

[1] http://tools.ietf.org/html/draft-snell-atompub-link-extensions-02

Thanks,
-- 
Teo Hui Ming