aksiksi / vaulty

A service that allows users to send email directly to a cloud storage service.
https://vaulty.net
4 stars 0 forks source link

Restructure Email and Attachment #5

Closed aksiksi closed 4 years ago

aksiksi commented 4 years ago

Problem

Right now, each Email maintains a list of Attachment. This reduces parallelism, as all attachments need to be download before processing can occur.

Proposed Solution

Idea: make Attachment point to a copy of the Email. Handle Email processing if needed (e.g., scrapbook), and handle each Attachment separately. We can also just take relevant fields from the Email (sender + recipient?).

We then modify the "handler" APIs to take in either an Email or an Attachment for processing.

Also, let us add a trait on Attachment for fetching.

Benefits

Attachment fetching and uploading can happen independently, thereby improving parallelism.