Partial Sync - Revisited

31 views
Skip to first unread message

Keith Hayes

unread,
Jan 14, 2015, 11:25:54 AM1/14/15
to mobile-c...@googlegroups.com
I have seen a few posts regarding partial sync with sync gateway and couchbase-lite. 2013 Roughly.
I was wonder if any solutions or work arounds have surfaced since then.

Here's the scenario.

 couchbase-lite user on IOS authenticates and subscribes to a channel called dogs.
The dogs channel has 1000 documents with channel_id set as dogs.
Synchronization works as advertised. All 1000 documents are pushed to the client.
As this can take some time so it would be nice to have some type of paging mechanism to sync documents 1-50, then 51-100 etc...

Would anyone know of away to achieve this?

I am running SG 1.0.3 and CB-lite 1.0.3 for IOS.

Thanks much.

--keith 

Jens Alfke

unread,
Jan 14, 2015, 12:03:26 PM1/14/15
to mobile-c...@googlegroups.com

On Jan 14, 2015, at 8:25 AM, Keith Hayes <layerx...@gmail.com> wrote:

Synchronization works as advertised. All 1000 documents are pushed to the client.
As this can take some time so it would be nice to have some type of paging mechanism to sync documents 1-50, then 51-100 etc...

It basically does that already; it's downloading all of the documents as fast as it can. So while the sync is running you'll have first 50 docs, then 100, etc.

If you want explicit control, then saying "1-50" begs the question of what order the docs should be sorted into. You're basically talking about running a remote query. On iOS there's a branch named feature/query that lets you do this — it adds a -createQuery method to CBLReplication. This isn't official yet but will probably appear in version 1.1 on iOS at least.

—Jens

Keith Hayes

unread,
Jan 14, 2015, 12:24:26 PM1/14/15
to mobile-c...@googlegroups.com
We are looking for this feature on both IOS and Android. Sounds like its a ways out.

Thankyou.

Keith
Reply all
Reply to author
Forward
0 new messages