-
Notifications
You must be signed in to change notification settings - Fork 69
Sqlite storage #1117
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
base: develop
Are you sure you want to change the base?
Sqlite storage #1117
Conversation
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Signed-off-by: AlexMikhalev <[email protected]>
Hey Alex! Thanks for this :) I must admit I never really considered using SQLite as a KV store - wasn't even aware they had it! My big question is probably: how does it compared to sled? I'm OK with paying some minor performance price, and some binary size price, to have the stability of SQLite, but how much? Mozilla did a benchmark on KV stores and found SQLite to have pretty bad performance, as in orders of magnitude slower than LMDB. Sequential reads (which AtomicServer does on every atom, for every commit!) are about 200 times slower. I'm not sure what this would mean for real-world performance impact, but my hypothesis is that if we populate Atomic with a realistic set of resources and watched queries, the commit time will skyrocket. |
Two things: you can store trie in SQLite, not only KV and second- original benchmarks only add few milliseconds to add_resource with all resources fetched under 20 ms. I didn't run benchmarks on dedicated hardware, worth re-running. |
Related Issues
closes #443
Checklist
After experimenting with open dal, my conclusion is that the best replacement for sledge is SQLite in WAL mode. This is an implementation of it, including a connection pool which will take care of multi-node deployment.
With SQLite instead of sled an Atomic server can be deployed on top of Turso or Cloudflare durable objects which will minimise infrastructure management - and allow standard backup and recovery tools.
On the dev side, we can remove Tantivy and make a multi-criteria collection - the issue with export/import is a tantivy lock.