Separate user data and network data into two SQLite databases #250
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The messages.dat SQLite database contains a lot of information, but most of it, in terms of storage during general use, is network data (the encrypted messages and public keys).
I believe we should separate user data from network data. This would allow users to back up their inbox, sent items and address book separately from the network data. It could also potentially improve performance in the future, by allowing the user and network data to be managed by two separate threads.
My thoughts are as follows:
messages.dat contains the following tables:
network.dat contains the following tables:
The settings table needs to be included in both to allow independant database version numbers and last vacuum timestamps.
I'm not certain about the 'pubkeys' table, due to 'usedpersonally' field.
I quite like the idea of two separate SQL threads being used, one per database.
What are people's thoughts?
Agree.
This. Especially as people start sending more messages, a single SQLite database is going to turn into a major bottleneck.
Agree!
Maybe we can add some NoSQL database support.
Maybe something like mongodb?
A document-based datastore could be nice for unstructured things like conversations but there aren't a lot of options for embedded NoSQL in python. (
shelve
could work, I suppose)