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

Re: Syncing and partial (truncated) results




Ezra Cooper wrote:

Hmm. I'm curious about the use case here. Is this aiming for sync
behavior?


Let me start here, because I have a very specific protocol approach in mind, but I think it might cover 90% or more of the likely uses.

...
1. Request range: LastSyncDate thru ThisSyncStartDate
2. Let "MarkDate" be the date of oldest item in result--is it older than LastSyncDate?
3. If so, we're done--we have a full list of all the items that were updated between LastSyncDate
4. If not, request range LastSyncDate thru MarkDate.
5. Repeat from 2.


...

The crux of this is that, since we're working backward in time, no surprises can come once we begin the sync. Also, since we're using date ranges, a series of ranges is guaranteed to pick up everything in that range; using ordinal indices, the meaning of a range request would change whenever anything changes in the list, leading to duplicated or missing items.

OK, I think I understand how this works.


It would be really helpful if you could document an example series of requests and responses. Check out the "Examples" section of PaceServiceError[0] which shows "Interaction of a server with three clients ('Client A','Client B', and 'Client C') over time".

Something like that could clear up a lot of misunderstandings.

Robert Sayre

[0] http://www.intertwingly.net/wiki/pie/PaceServiceError