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

RE: Sorting by app:edited & Concurrency



A. Pagaltzis wrote:
> * Brian Smith <brian@xxxxxxxxxxxxxx> [2007-11-14 02:55]:
> > (b) Assuming that the server correctly implements the 
> app:edited and 
> > page order requirements from RFC 5023, how can a client 
> catch up with 
> > a collection feed, using the minimum number of requests?
> 
> Just page backwards until you see an entry that you already 
> have in your cache, whose app:edited value on the server 
> matches its value in your cache. (This is in fact the point 
> of sorting the collection feed by app:edited -- efficient
> synch.)

This does not work. First, in the example I gave, assume that the client POSTing is different than the client polling the feed. The client polling the feed would never see entry A using the technique you describe, because in step 6, it would stop when it saw entry B. Also, as Eric pointed out, it does not work when multiple entries have the exact same app:edited timestamp.

> > (c) In step 4, is the server required to include entry B in 
> > the feed? Does the collection feed need to be updated
> > immediately, or can it be updated asynchronously? For example,
> > would it be legal for server to update the feeds once every
> > five minutes, regardless of how many POST, PUT, and DELETE
> > requests are received in the interim?
> 
> Asynch updates are fine, I think. I don't think we have any 
> language in the spec that allows a client to expect immediate 
> collection feed updates.
> 
> Note that clients that have POSTed or PUT an entry should 
> synch by GETting the `edit` link from the entry in the response 
> body.
> *That* should in fact be updated immediately. So clients can 
> always get an updated version of the entry they’re currently 
> interested in.

<snip>

> So the only practical consequence of updating collection 
> feeds asynchronously is that clients cannot keep *realtime* 
> synch with the *entire* collection on the server by 
> *continuous* polling.

That seems to be the case. But, it is a little surprising to post an entry and not have it show up in the feed (for a while). 

Thanks,
Brian