Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing between 2 local databases currently possible? #22

Closed
rsebbe opened this issue Mar 18, 2013 · 4 comments
Closed

Syncing between 2 local databases currently possible? #22

rsebbe opened this issue Mar 18, 2013 · 4 comments

Comments

@rsebbe
Copy link

rsebbe commented Mar 18, 2013

Hi,

Do you know if having 2 local databases (one sync'ed from Dropbox on the local filesystem and another 'reference' one also on the local filesystem) is a possible use-case for the CBLDatabase -push/pull API? Couldn't find out how to setup this with current API. Thank you!

@snej
Copy link
Contributor

snej commented Mar 18, 2013

There is some partial support between syncing two local databases, but they have to be known to CBL already, i.e. both in the app’s database-manager directory. If the database is someplace external, you’d need to copy it into that directory first.

Putting a database in a Dropbox is kind of a weird idea. I assume you’re doing it to try to sync between devices, but then why wouldn’t you just use CBL’s replicator to do that?

@rsebbe
Copy link
Author

rsebbe commented Mar 18, 2013

OK, interesting. I'm not too familiar with CBL concepts. Using CBL replicator means having a server hosting the database, right? Our scenario here was to not have any hosted database, but instead only local ones. Then a user on a device could decide to share an object list (a DB subset) with another user (send by mail, Dropbox, whatever), who makes some changes, and then send it back to the orignal user for merging. Does that make any sense with CBL? Thank you.

@snej
Copy link
Contributor

snej commented Mar 18, 2013

The replicator handles peer-to-peer. If you want two devices to sync with each other, you start a listener on (at least) one of them, then the other one starts a replication to its address/port. I think there’s some description of it on the wiki.

@rsebbe
Copy link
Author

rsebbe commented Mar 18, 2013

Thank you. The copy file to db-manager probably makes more sense here, but I'll review the other one (peer-to-peer) too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants