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

Research | Test couchdb/pouchdb as a replacement for the current db backend #8

Open
idncsk opened this issue Apr 21, 2024 · 0 comments
Assignees
Labels
Research Research / eval task

Comments

@idncsk
Copy link
Member

idncsk commented Apr 21, 2024

Canvas was originally using LevelDB as its main in-process DB, later RocksDB and currently LMDB .. for reasons ..

As we are moving to a more distributed, server-client architecture where a canvas-server instance will most likely be sitting either in a DC, and/or a beefy local workstation and/or on your NAS, we should start looking into some good sync libraries.

Canvas is meant to be a local/offline-first app and there are many good reasons for that, but you may also want to make your global context tree (with all indexes) available remotely so that you can get your work-life-balance trashed again by continuing your work seamlessly cross-device while traveling from office to your home for example.

With couchdb and its JS incarnation pouchdb,

  • you get a lot of the sync heavy-lifting for free!
  • master-master replication!
  • it uses leveldb when running under nodejs!
  • easy browser sync (could simplify our browser extension madness a lot)
  • Could simplify all the extension work (hyper, obsidian)
  • Definitely some other positive things!

Then again,

  • roaring bitmap indexes are stored in binary format, attachments for blob storage in pouch/couchdb look ugly
  • CouchDB leaves a lot to be desired in terms of features(then again, there are almost none with lmdb)
  • Don't remember why by I revisited this combo at least 2x over the last year+ and always returned to LMDB (but maybe it was just laziness 👍 )

References
[0] https://pouchdb.com/
[1] https://github.com/pouchdb/pouchdb-server
[2] https://couchdb.apache.org/

@idncsk idncsk added the Research Research / eval task label Apr 21, 2024
@idncsk idncsk self-assigned this Apr 21, 2024
@idncsk idncsk added this to Canvas Apr 21, 2024
@idncsk idncsk moved this to Todo in Canvas Apr 21, 2024
@idncsk idncsk added this to Canvas Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Research Research / eval task
Projects
Status: No status
Development

No branches or pull requests

1 participant