-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Migrate Orbit FS stores to flat-file databases, internalizing attachments as blobs #243
Comments
Unfortunately, React Native makes this difficult. None of the SQLite native modules support BLOBs. And in fact, the (traditional) Native Modules bridge doesn't support marshaling binary data at all, so we'd have to move to a library which uses the newer JSI bridge, like https://github.com/ospfranco/react-native-quick-sqlite. I filed an issue about BLOB support: ospfranco/react-native-quick-sqlite#11. It'd probably be a rabbit hole, but we could probably add support ourselves if need be. Still, all this makes me less enthusiastic about moving in this direction. More work than I want to spend right now. |
180-ing here: |
…internalizing attachments as blobs Now need to implement support for loading the URL scheme in the React Native clients.
Alright, this is now implemented. @ZanderKasanjian, I think you're the only one using Orbit on your local machine, but I'll note this publicly in case any others will be affected. With these changes, you'll need to do a "full sync" of your Orbit account to your machine; I didn't bother implementing a migrator because there are so few local users. Please:
|
@andymatuschak Thanks for the alert! Followed the steps with no issues. |
Orbit's on-disk file format is presently a bundle: a folder containing a SQLite database and a folder of attachments files. Flat-file formats are so much easier to deal with, though. Want to copy or back up your database? Just one file. Likewise, serving bundles over HTTP is a pain. And you've gotta keep your database and your associated files in sync. Most apps that go the bundle route usually end up developing a parallel .zip-based file format (in fact, Anki has done so!)
I'm persuaded by the arguments in SQLite As An Application File Format that we'd probably be better off just moving the attachment blobs into SQLite and using a single flat file as the data format. In many cases, this will actually be faster to boot!
The text was updated successfully, but these errors were encountered: