Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confused on how to use CouchDB on Android

I want to get CouchDB running as the backend for my mobile app, replacing SQlite.

I have been incredibly confused as a newcomer to this technology because, in addition to all of similar sounding products released by Couchbase last year(Couchbase, Couchbase Single Server, Membase, Couchbase Mobile), they now seem to be dropping/combining all of them into a single project, Couchbase Server. But, that is actually Membase, not CouchDB. To top that off, the creator of CouchDB is no longer going to be working on CouchDB. Yet, there seems to be a very active community around CouchDB. Here is what I know:

  1. I understand that Couchbase, the company, no longer provides a distribution of CouchDB.

  2. I understand that Couchbase Server, the new focus of the Couchbase company, is really not CouchDB at all and it is not compatible with CouchDB. It does not implement the HTTP api that CouchDB uses, it's using a binary protocol that evolved from Membase.

  3. All of the recent information on CouchDB Mobile seems to point to Couchbase Mobile.

My questions boil down to:

Is it still possible to use CouchDB on an Android device? Specifically CouchDB, not Couchbase Server, because the APIs are not compatible

If it is still possible, how do I do it? Where is the source code? Any sample apps?

Sorry if my question gets confusing. To be honest, I am having a hard time wading through the vast collection of seemingly contradictory posts online. I just want to run CouchDB on Android! :)

like image 619
Jonathan Avatar asked Feb 18 '12 18:02

Jonathan


People also ask

What is the difference between couchbase and CouchDB?

Couchbase provides Eventual Consistency and Immediate Consistency methods to ensure consistency in a distributed system. CouchDB only provides Immediate Consistency method to ensure consistency in a distributed system.

Who uses CouchDB?

Here CouchDB is used as multi-node peer-to-peer offline-first database. IBM Cloud services are based at a fundamental level on CouchDB. United Airlines uses CouchDB for the in-flight entertainment systems in over 3,000 planes. Amadeus IT Group, for some of their back-end systems.

Is CouchDB couchbase compatible?

Meanwhile CouchDB is an actively maintained open-source project, Couchbase server is a completely separate project (it is a newer project but it is not a newer version of CouchDB - they are not even compatible) and since even new tools for creating CouchApps still keep being developed (eg.

What is couchbase Lite?

Couchbase Lite is the mobile SDK of the Couchbase Mobile suite that allows developers to easily integrate a NoSQL database into mobile applications.


1 Answers

as a co-founder of Couchbase I should be able to give you a clearer understanding. I'll take your questions in turn.

1) Correct. Couchbase Server is not CouchDB. It sacrifices some of the neat things CouchDB does (HTTP interface, master/master replication) so it can do other neat things (sub-millisecond latency, gigantic clusters.) In the long long run, we'd like to get back high-performance versions of the features we had to drop. For now, we are building the fastest most reliable NoSQL database (yay) but it's not answering the same use cases as CouchDB.

2) Maybe I just answered that? More info about Couchbase Server is here: http://www.couchbase.com/couchbase-server/overview

3) Couchbase continues to invest in mobile technology. We have well tested implementations available for Android and iOS. These are based on Apache CouchDB, so they will have the feature set you are looking for. Visit here to download them: http://www.couchbase.com/wiki/display/couchbase/Couchbase+Mobile+Syncpoint (see links for iOS and Android on that page)

Going forward, we are focussing on light-weight alternatives to actually running CouchDB-based code on the device. To get CouchDB to run on the device requires the Erlang virtual machine. While it is lightweight and respectful of battery life (for a VM), it is still a VM. So we are building more lightweight sync and storage engines for mobile. TouchDB for iOS can sync with Apache CouchDB. We also have a similar project for Android. If I were starting a new project, I'd take a look at these.

like image 128
J Chris A Avatar answered Sep 20 '22 07:09

J Chris A