Adding server syncing later?

49 views
Skip to first unread message

Ragu Vijaykumar

unread,
Apr 19, 2014, 9:40:43 PM4/19/14
to mobile-c...@googlegroups.com
I noticed this caveat with regards to the SyncGateway:

"It cannot operate on pre-existing Couchbase buckets with app data in them because Sync Gateway has its own document schema and needs to create and manage documents itself. You can migrate existing data by creating a new bucket for the gateway and then using the Sync REST API to move your documents into it via PUT requests. You can’t make changes to the Couchbase bucket directly. You have to go through the Sync Gateway API."

However, if I release a CouchbaseLite ios app to the appstore that only works to store data locally, can I later sync databases created on the mobile apps to a server without using the Sync REST API? Is there anything special that I need to configure so they can later be synced properly?

Thanks for all your help!
Ragu

Jens Alfke

unread,
Apr 19, 2014, 10:30:48 PM4/19/14
to mobile-c...@googlegroups.com

On Apr 19, 2014, at 6:40 PM, Ragu Vijaykumar <ra...@scrxpt.com> wrote:

However, if I release a CouchbaseLite ios app to the appstore that only works to store data locally, can I later sync databases created on the mobile apps to a server without using the Sync REST API? Is there anything special that I need to configure so they can later be synced properly?

I’m confused by the word “without” there. Was that a typo? You can always sync a database from Couchbase Lite to the gateway (or to CouchDB for that matter.) It uses the sync API, of course.

What the docs are saying is a warning for people who are already Couchbase Server users and have buckets containing data they now want to sync with mobile clients. Unfortunately those buckets can’t be used directly as Sync Gateway storage because they don’t have the right metadata. That warning has nothing to do with Couchbase Lite.

—Jens

Ragu Vijaykumar

unread,
Apr 19, 2014, 11:03:28 PM4/19/14
to mobile-c...@googlegroups.com
Ah thanks. I just meant whether we needed to write additional network code that first uses the Sync REST API to send the existing data first, or whether the native ios push/pull replication code would work for previously existing ios databases and we just merely need to "turn it on" and point it to our server. This clarifies that.

Cheers,
Ragu

Jens Alfke

unread,
Apr 19, 2014, 11:35:17 PM4/19/14
to mobile-c...@googlegroups.com

On Apr 19, 2014, at 8:03 PM, Ragu Vijaykumar <ra...@scrxpt.com> wrote:

Ah thanks. I just meant whether we needed to write additional network code that first uses the Sync REST API to send the existing data first, or whether the native ios push/pull replication code would work for previously existing iOS databases

Those terms (in boldface) refer to the same API.

—Jens

Ragu Vijaykumar

unread,
Apr 19, 2014, 11:45:16 PM4/19/14
to mobile-c...@googlegroups.com
Ah, I didn't realize that. Thanks for the clarification. 

J. Chris Anderson

unread,
Apr 21, 2014, 8:11:58 AM4/21/14
to mobile-c...@googlegroups.com
For people finding this thread via searches for "add syncing later" or similar, probably the next thing you want is to understand the sync function API for access control and routing of sync data.

Chris
Reply all
Reply to author
Forward
0 new messages