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

Support for peer-to-peer data sync #242

Open
nblum37 opened this issue Nov 16, 2021 · 4 comments
Open

Support for peer-to-peer data sync #242

nblum37 opened this issue Nov 16, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@nblum37
Copy link

nblum37 commented Nov 16, 2021

Hi :)

Is there a way to export a document, e.g. as a binary List format, and import it to another database instance including the metadata like revisionId? The idea behind this would be to send a document over e.g. BLE within an offline environment to another device.
Thank you :)

@blaugold
Copy link
Member

blaugold commented Nov 16, 2021

Hey @nblum37,

there is no way to export and import documents, but there is a feature called peer-to-peer data sync, which allows data sync between two databases on different devices over any available transport channel.

Other Couchbase Lite SDKs (e.g. for iOS/macOS, Java, etc.) support this feature, but not the one for C, at least not currently. The Couchbase Lite C SDK is the one used, under the hood, by this package. So, if and when peer-to-peer sync becomes available for the C SDK, cbl could support it. I don't know about the plans of Couchbase for this feature and the C SDK, though.

Also peer-to-peer sync is an enterprise feature.

@nblum37
Copy link
Author

nblum37 commented Nov 16, 2021

Ah ok, thank you very much for your fast reply!
I was just wondering whether there might be any possibility to directly access the memory space of the documents after they were loaded or before they were saved. I know, that Couchbase Lite C SDK does not support the "official" way, yet, so I was looking for any kind of workaround.
Currently, we transfer the id & the content and let the replicator overwrite the offline transmitted document later as soon as wifi is available. But that is of course a very ugly way including some drawbacks...

@blaugold
Copy link
Member

I see, sorry I don't have better news 😬
The biggest problem I see with transferring the documents like that, is that conflict resolution doesn't work like usual, but maybe that's OK or you can work around that, for now, for your use case.

I've reached out to Couchbase to see what their plans are for peer-to-peer sync.

@blaugold blaugold changed the title Export and import a document including meta data Support for peer-to-peer data sync Nov 16, 2021
@blaugold blaugold added the enhancement New feature or request label Nov 16, 2021
@nblum37
Copy link
Author

nblum37 commented Nov 16, 2021

Ok, thank you :) Let's see, how they'll continue feature development.

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

No branches or pull requests

2 participants