> On Aug 8, 2016, at 10:12 AM, Brendan Duddridge <[email protected]> wrote:
> 
> But many of my customers would prefer to use something like iCloud or Dropbox 
> for syncing. In fact, I just released the new version of my app after a year 
> in development switching over to Couchbase Lite and I've been roasted in the 
> app reviews because I dropped support for iCloud and Dropbox syncing.

You can never please all the users…

> 
> But I was wondering what the viability of using that method would be to 
> provide a file based sync solution? What I mean by that is I would take 
> incremental snapshots of the changes made since the last time a sync 
> operation occurred, then I would store the change file in iCloud Drive or 
> Dropbox and then on the other device, read the changes file and process it 
> using putExistingRevisionWithProperties.

Yeah, building some kind of “change archive” like this wouldn’t be hard. Run an 
all-docs query sorted by sequence starting just past the last sequence you 
synced, then for each document write its current revisions' JSON and all 
attachment bodies whose revpos is equal to the current revisions’ generation. 

A Zip archive would be a convenient way to store this, where the internal 
filename is either the docID or “docID/attachmentname”.

But you’d have to write and upload a new snapshot every time you sync. A device 
coming online has to read each snapshot that’s newer than the latest one it’s 
read. So it’s not clear how you can ever delete old snapshots.

—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/444AACCC-FAFB-46E5-95EA-39343657C397%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to