> On Sep 9, 2014, at 8:10 AM, Zack Gramana <[email protected]> wrote:
> 
> A number of users are struggling to build user interfaces which indicate to 
> users which items are not yet sync'ed to a server. This is especially true 
> for devs that are using one-shot replications to limit radio battery drain, 
> or during significant partition events (airplane mode one, no usable wifi, 
> etc).

I was thinking about this yesterday (in a background task that didn't block 
access to my forebrain ;-)

The push replicator's checkpoint is the sequence number below which all 
revisions have been uploaded to the server. So we can test whether a doc has 
been pushed by comparing its current revision's sequence number to the 
checkpoint. The push replicator already runs a query of all revisions with 
sequence > checkpoint, to find out which revisions to push -- we could expose 
an API to such a query.

I started hacking on it on the train this morning. It's not much code at all. 
I've provisionally added a new property Replication.unpushedDocumentIDs that 
returns an NSSet of the IDs of all documents with un-pushed revisions. I'll 
check it in on a branch today.

--Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/F5569907-618A-48AA-BF63-F866497E61A7%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to