> On Apr 12, 2017, at 2:35 PM, Brendan Duddridge <[email protected]> wrote:
> 
> Umm... are you serious? No support for syncing with anything other than a 
> Couchbase Sync Gateway server? That's definitely a deal breaker for me. :(

First off I want to say that I sympathize. I really appreciate the 
contributions you’ve made, Brendan, and I feel bad about causing problems for 
you. There are times when moving forward requires breaking compatibility, and 
that can suck for some users. I wish it didn’t have to be that way, but after 
working with the CouchDB replication protocol for years it became clear that we 
had to move to something else.

> Why would you do that? My app syncs with IBM Cloudant and Apache CouchDB 2.0 
> plus peer-to-peer syncing.

In short: For reasons of performance, code size, reliability, and 
cross-platform compatibility.

We've been using the CouchDB replication protocol for over five years, and 
found that it has serious problems due to its design. A lot of that comes from 
being built on HTTP. REST is great for general-purpose APIs, but replication 
needs throughput, and the overhead of making all those HTTP calls adds up. 
Being dependent on platform HTTP libraries also means that we get subtly 
different behaviors depending on how they handle things like cookies, chunked 
encoding, MIME, authentication, etc. And the way the replication protocol 
handles attachments is really troublesome. (Just sneak up behind any Couchbase 
Lite engineer and say "revpos!", and watch them scream.)

I know that common protocols and interoperability are good things. I've been a 
big believer in compatibility and a voice for it at Couchbase. But we're being 
held back by it. As a big decentralized open-source project, Apache CouchDB 
moves slowly. (It took them four or five years to integrate the clustering 
extensions that Cloudant developed, and release CouchDB 2.0.) I don’t think it 
would have been effective to build a new protocol through that organization. 
The new protocol is open 
<https://github.com/couchbase/couchbase-lite-core/wiki/Replication-Protocol>, 
and IMHO a lot easier to implement fully than the old one; we’d be happy for 
other software to adopt it.

[For what it's worth: Damien Katz, who created CouchDB and was a founder of 
Couchbase, is totally in favor of what we're doing. He told me (paraphrasing) 
"Oh yeah, I had no idea what I was doing when I made up that protocol ten years 
ago; you should totally make a second generation one."]

> I guess I'm going to be on 1.4 forever then. Either that or I'll have to go 
> through a whole new migration process. Maybe to Realm or YapDatabase or 
> something like that.


We're going to be maintaining & supporting Couchbase Lite 1.4 for at least 
another year. (We have service contracts to customers that guarantee that.) And 
of course, since it’s open source you or anyone else can continue to maintain 
or develop it.

My (biased) opinions on migration:

Realm has a nice client API, but their replication support is brand-new and I 
have doubts about it. You have to install and run their server (it's not hosted 
AFAIK), and the server is not free and not open source. The replication 
protocol is a black box too. Another factor is that Realm's database has a 
rigid schema, like SQLite or Core Data — I don't know how they're going to 
reconcile that with replication, because if the client hasn't migrated to the 
same schema version as the server, data interchange is a mess.

I haven't looked at YapDatabase closely. On paper it sounds nice (and a lot 
like Couchbase Lite!) I'm not sure how well syncing via Apple's CloudKit will 
work in practice, especially with conflicts, and there's the obvious factor 
that it completely rules out supporting any non-Apple OS.

(A final thought:t it would be a Simple Matter Of Programming™ for someone to 
build a CouchDB-compatible replicator on top of Couchbase Lite 2.0. Just pull 
the replicator code out of any platform of 1.x, change the API calls to fit 
2.0, and superglue it on. OK, it wouldn’t be simple, but not rocket science 
either.)

—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/99AEC955-43C1-455F-8444-24F311E006BC%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to