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
Sync local <> external database #195
Comments
Levelgraph should work with any levelup-compatible storage interface that handles encoding as well, so it doesn't care if you use level-mem, level or something completely custom. While I haven't tested it myself, it should be feasible to write a custom leveldown adapter for indexedDb (or whatever you fancy) which saves created/updated timestamps, allowing you to sync the underlying storage with a remote machine. Is there a specific use-case you might need such functionality for over pouchdb? |
Thanks for your reply @finwo. Regarding use-case: I would like to use levelgrah in an offline-first electron app for project management. At the beginning, I want to save data locally only but would like to keep open the possibility (and lay the groundwork) for server-side sync for collaborative features. |
For an offline-first electron app, I'd probably go with PouchDB (which in turn runs on top of leveldb as well). If you really want to use levelgraph for that purpose, you could look into the level/awesome#shared-access list, which should provide common level interfaces compatible with levelgraph. Levelgraph itself does not support replication in any way, as that is not part of the scope of the library (triple storage and queries). |
Thanks for the suggestion, Robin!
Levelgraph is really awesome as a client/serverside DB, but what I think would really bring value was the sync between both.
I was thinking on using rxDB which has replication functionality. Unfortunately, I have no experience yet with levelDB. Is there a resource you could point me to or a rough concept you could describe how to hook up shared-access ?
Thank you
… On 18 Dec 2021, at 14:48, Robin Bron ***@***.***> wrote:
For an offline-first electron app, I'd probably go with PouchDB <https://pouchdb.com/api.html> (which in turn runs on top of leveldb as well).
If you really want to use levelgraph for that purpose, you could look into the level/awesome#shared-access <https://github.com/Level/awesome#shared-access> list, which should provide common level interfaces compatible with levelgraph.
Levelgraph itself does not support replication in any way, as that is not part of the scope of the library (triple storage and queries).
—
Reply to this email directly, view it on GitHub <#195 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVUVG4BVEFOZVBIJIEQM3TURSGLJANCNFSM5J2IMX6A>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.
|
@MentalGear Did you find a solution for this? |
First: Thank you for this amazing graph database. It's awesome that it is usable local as well as server-side, however, I have been wondering how to sync a local and a server-side levelgraph database?
For example, I would like to have an offline-first local/browser levelgraph db that syncs (auto-magically) when online with a levelgraph node.js backend.
Would this be possible with levelgraph, or through an integration with rxdb / pouchdb possible maybe ?
The text was updated successfully, but these errors were encountered: