What's the difference between Sync REST API and Push/Pull Replicators?

78 views
Skip to first unread message

Federico Hernandez

unread,
Jan 9, 2015, 9:02:29 AM1/9/15
to mobile-c...@googlegroups.com
Hi everybody,

I'm working on a phonegap app implemeting the sync process. I've been reading through the docs and I couldn't see the difference between using the Sync REST API and the Push/Pull replicators, specifically when I have to get the changes from the remote db.

From the docs on couchbase:


"You use the Sync REST API to synchronize a local database with a remote database. ..."


"A Replication object represents a replication (or "sync") task that transfers changes between a local database and a remote one. ..."


Are both of them to do the same?

Thanks in advance,

Jens Alfke

unread,
Jan 9, 2015, 11:18:26 AM1/9/15
to mobile-c...@googlegroups.com

On Jan 9, 2015, at 6:02 AM, Federico Hernandez <fede.he...@gmail.com> wrote:

I'm working on a phonegap app implemeting the sync process. I've been reading through the docs and I couldn't see the difference between using the Sync REST API and the Push/Pull replicators, specifically when I have to get the changes from the remote db.

The Gateway's REST API is used by the Couchbase Lite replicator to get and put documents on the server, but you wouldn't call it yourself! Not unless you felt like re-implementing your own replicator, which I can tell you from experience would be a very large amount of work. :-p

"You use the Sync REST API to synchronize a local database with a remote database. ..."

Yeah, that description is pretty misleading. But that's obsolete documentation (there's a disclaimer about that at the top of the page.) The current Gateway REST API docs are here.

(How did you find those old docs, by the way?)

—Jens

Federico Hernandez

unread,
Jan 9, 2015, 12:10:30 PM1/9/15
to mobile-c...@googlegroups.com


On Friday, January 9, 2015 at 1:18:26 PM UTC-3, Jens Alfke wrote:

On Jan 9, 2015, at 6:02 AM, Federico Hernandez <fede.he...@gmail.com> wrote:

I'm working on a phonegap app implemeting the sync process. I've been reading through the docs and I couldn't see the difference between using the Sync REST API and the Push/Pull replicators, specifically when I have to get the changes from the remote db.

The Gateway's REST API is used by the Couchbase Lite replicator to get and put documents on the server, but you wouldn't call it yourself! Not unless you felt like re-implementing your own replicator, which I can tell you from experience would be a very large amount of work. :-p

Thanks Jens.
 

"You use the Sync REST API to synchronize a local database with a remote database. ..."

Yeah, that description is pretty misleading. But that's obsolete documentation (there's a disclaimer about that at the top of the page.) The current Gateway REST API docs are here.

(How did you find those old docs, by the way?)

 
Through a google search.
Reply all
Reply to author
Forward
0 new messages