couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Hobson <...@ianhobson.co.uk>
Subject Re: couchdb sync with dropbox?
Date Sat, 06 Aug 2011 09:24:13 GMT
On 05/08/2011 18:10, Holger Protzek wrote:
> Hi,
>
> I would like to use couchdb on a android and a ios application, to store alle data locally
in the database. So long no problem, but I would also like to sync these couchdb databases.
>
> As far as I know, this can be acomplished with a central couchdb server instance, but
I would like  to use for the syncronisation/replication a dropbox account.
>
> Is this possible? or only a bad idea :-)
>
>
I think using dropbox is a bad idea.

Both Dropbox and Couchdb need exclusive access to the database files in 
order to make changes - which is a fundamental incompatibility.

When the local couch has made changes, dropbox cannot upload them until 
after couch has released the file, and that is unlikely to be before the 
app is closed., and may not be until much later.

When a change has to be received, couch will hold the database open, 
stopping dropbox from delivering the change. Once couch releases the 
file there is a database level conflict, and the changes to one or other 
databases will be lost.

Every time couch updates the database, however small the change is, 
dropbox will have to copy the whole of the filet. Couch may well update 
the database, just to record the time it last checked the indexing was 
current. This is at least wasteful, and if you are paying for bandwidth 
on your Android, expensive.

Compare that to couch replication - any conflict will be at the document 
level, and easy to fix. Changed data is moved as soon as it is 
available, and the replication process is activated - in short is under 
control. Only changes are moved. You can have replication working while 
the app is working, and it will pick up the latest changes as soon as 
received.

Regards

Ian




Mime
View raw message