couchbase lite support with other server

242 views
Skip to first unread message

Raheel Mateen

unread,
Sep 30, 2014, 7:49:19 AM9/30/14
to mobile-c...@googlegroups.com
Is this possible to use couchbase lite on mobile side and mongo db on backend side ?

Traun Leyden

unread,
Sep 30, 2014, 9:28:10 AM9/30/14
to mobile-c...@googlegroups.com
Yes it's theoretically possible, using Bucket Shadowing.  Some code would need to be written first, and nobody has tried this.


On Tue, Sep 30, 2014 at 4:49 AM, Raheel Mateen <raheel...@riksof.com> wrote:
Is this possible to use couchbase lite on mobile side and mongo db on backend side ?

--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/8912d304-d761-441d-808f-fae1f89ef172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raheel Mateen

unread,
Sep 30, 2014, 10:20:05 AM9/30/14
to mobile-c...@googlegroups.com
Theoretically or practically ? So as you said it is not possible ?

Traun Leyden

unread,
Sep 30, 2014, 11:31:44 AM9/30/14
to mobile-c...@googlegroups.com
It's possible, but what I'm saying is that this doesn't work "out of the box".  

You would need to dig into the Sync Gateway code related to bucket shadowing and adapt it for MongoDB.

--
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 mobile-couchba...@googlegroups.com.

Jens Alfke

unread,
Sep 30, 2014, 1:52:10 PM9/30/14
to mobile-c...@googlegroups.com

On Sep 30, 2014, at 4:49 AM, Raheel Mateen <raheel...@riksof.com> wrote:

Is this possible to use couchbase lite on mobile side and mongo db on backend side ?

No. Keep in mind that Couchbase is a for-profit company, the server is our revenue source (enterprise licenses, support contracts, consulting, custom development, etc.) and Mongo is our major competitor.

You can use Apache CouchDB on the back end, largely because the Couchbase Lite architecture and replication protocol are based on CouchDB's so they've been compatible since day one. (You lose a lot of the features you get with Sync Gateway, though, like channels and fine-grained access control.)


On Sep 30, 2014, at 6:28 AM, Traun Leyden <traun....@gmail.com> wrote:

Yes it's theoretically possible, using Bucket Shadowing.  Some code would need to be written first, and nobody has tried this.

I don't think that's what Raheel was asking about. Doing this with bucket shadowing would involve significant development work on the Sync Gateway, and you'd end up running the Gateway and Couchbase Server on the back end, as well as Mongo.

—Jens

Igor Ievsiukov

unread,
Oct 1, 2014, 3:57:41 AM10/1/14
to mobile-c...@googlegroups.com
Technically you can write a minimum API needed for replication: _changes feed + CRUD operations as a layer on a top of any database. In my understanding, sync_gateway does exactly the same for Couchbase server (don't mix it with Apache CouchDB!).

But realistically, I hardly see that working well without changing the way you store/operate the data in your current database (that be mongo, myself, oracle or whatever) and if you need to do this, IMHO it will be easier to migrate to Couchbase or CouchDB.

- Igor

Jens Alfke

unread,
Oct 1, 2014, 4:48:25 PM10/1/14
to mobile-c...@googlegroups.com

On Oct 1, 2014, at 12:57 AM, Igor Ievsiukov <igor.ie...@gmail.com> wrote:

Technically you can write a minimum API needed for replication: _changes feed + CRUD operations as a layer on a top of any database. In my understanding, sync_gateway does exactly the same for Couchbase server (don't mix it with Apache CouchDB!).

Yup. And speaking from experience, it's one of those things that sounds pretty easy and straightforward until you actually do it. There are a lot of subtleties. (In particular, the CouchDB-style replication protocol needs a lot of extra metadata on documents, like the revision history, so you have to find a place to put that.)

—Jens
Reply all
Reply to author
Forward
0 new messages