Replicate without using HTTP


#1

I have a rather unique problem in an Android application I’m developing. Long story short, the application maintains a local database that has to periodically sync with a database on a flash drive, and I was hoping to leverage CB’s built-in support for replication. Obviously I can’t use an HTTP replicator for this, and a read through the documentation makes it look like there’s no built in support for what I want. So, is there any easy way to go about replicating like that?

Thanks in advance for any help.


#2

Right now on Android, local-to-local replication is not supported yet. Here is a ticket with a discussion about it:


#3

Thanks for the info. Do you have any idea when this feature will be complete?


#4

I’m not sure if Couchbase Mobile is the right hammer for this particular nail. The key question, I think, is whether the flash drive will be ‘paired’ with only one device, or whether it will be shared between different computers/devices that will each sync with it.

If the drive is used with one device, then Couchbase Mobile is going to be overkill. There’s no possibility of conflicts, and the goal is just to copy and delete the minimum amount of data to bring the data on the drive into sync with what’s on the device. A tool like rsync can do this pretty efficiently.

If the drive is shared, though, then you do have the kind of situation where Couchbase Lite is useful, since it’s multiple users (or even the same user) collaborating, and this requires tracking revisions and managing conflicts.


#5

Yes, it’s definitely shared between multiple users, and that fact is one of the main reasons I selected Couchbase; it seems like it’s built for this sort of thing (except for the part where it doesn’t actually let me sync local-to-local).