-
Notifications
You must be signed in to change notification settings - Fork 99
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
Local messages store #32
Comments
I was exploring existing Node.js compatible embedded databases with built-in encryption support and have not really found solutions that would keep metadata encrypted as well. Means, it's possible to encrypt values of specific columns/fields, but metadata remains unencrypted. Metadata is for example information like how many rows in the database you have, what is the columns set, empty/filled cells, etc. But such information in some case can also be considered as sensitive. So I'm considering the following approach. App keeps all the messages in memory. App flushes these messages to the encrypted file with some interval and probably on some triggers. This file would be a brick of bytes, fully encrypted, including metadata, similar to how Database encryption key would be generated once and stored in |
I was exploring Tutanota's entity event batch stream and have realized how to efficiently utilize it in app. So it's going to be a complete offline emails storage, including the state syncing part. Messages fetching and syncing is already pushed into the master branch. |
Encrypted database persistence has just landed into the master branch. So backend logic is completely done for Tutanota and it works efficiently enough. Which means building minimal UI around the local messages store is only remaining blocker for releasing the feature. Alternatively, I'm considering releasing the feature only after the Protonmail also gets backend logic done. I've not even yet started researching Protonmail's Rest API though. |
I think before jumping into the UI building I will add contacts syncing. So emails, folders, and contacts will be stored in the local database. |
Contacts storing is now in the master branch, in addition to the mails and folders. |
I was exploring the possibility to enable conversation view mode for local store viewer, which is in general a demanded and not yet supported feature by the official Web Client, ref1 / ref2. And it looks like a quite possible thing to do with still remaining issues to sort out though (see the weird, 2nd-level, grayed out removed message): Conversation shown on the example screenshot is 3 level hierarchy conversation. Hierarchical tree-like displaying is possible because Tutanota keeps the conversation structure using nodes with parent/previous reference model. |
v2.0.0-beta.1 release has been published. |
Feature got enabled for |
Emails export feature has been enabled with v2.0.0-beta.4 release. |
Closing the issue as resolved. The final v2 release is going to be published soon. There will be new issues open if I decide to start working on the email attachments syncing/exporting or search in database view mode features. |
v4.7.0 is going to optionally enable the live attachments loading during the export process. So full batch export will be happening, including the attachments content. |
This is considered as a priority one missed major feature:
.eml
format.There potentially might be many email messages content getting options, like at least:
email view actions
happening in the email provider's UI, also very limited option. The good part is that it would work in a fully passive mode, not producing addition requests to the email provider's backend. But in JavaScript it's not always possible to listen/intercept all the needed actions happening, especially if the code is implemented with an intention to prevent interception happening. Besides going with such option we can only get content of the email message that has ever been explicitly opened/viewed by a user. The simplest in implementation option though.At the initial stage it's not going to be a comprehensive bridge-like thing, but more like email provider's web UI supporting thing. The initial implementation is not going to keep locally stored messages in sync with the server/actual state. Means it would be a one-off putting to local cache action, with no further message state updating (message got unread state, got removed, got changed folder/label, etc).
A brief workflow steps description:
lastFetchedEmailItemCreateTime
-like, portion size and sort order parameters, depending on the email provider's API endpoints format. ThatlastFetchedEmailItemCreateTime
parameter would be added as a portion start request parameter. So app doesn't fetch the same messages twice. If we go with fetching all the messages during each job iteration, we can keep locally cached messages in sync with the server/actual state, but a more optimal approach would be in going with message state changing queue. So app as a client gets notified about some message state change action happened and patches locally saved message accordingly, but this can't be implemented having no control on the backend, but looks like at least Tutanota has it implemented already (seeEntityEventBatchTypeRef
entities fetching).settings.bin
file.The text was updated successfully, but these errors were encountered: