Skip to content
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

Refactor imapsql blob storage interface to use modules framework #303

Closed
Tracked by #279
foxcpp opened this issue Nov 28, 2020 · 7 comments
Closed
Tracked by #279

Refactor imapsql blob storage interface to use modules framework #303

foxcpp opened this issue Nov 28, 2020 · 7 comments
Assignees
Labels
ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele
Milestone

Comments

@foxcpp
Copy link
Owner

foxcpp commented Nov 28, 2020

No description provided.

This was referenced Nov 28, 2020
@jmthackett
Copy link

jmthackett commented Apr 7, 2021

Hey, I'm interested in this and #304 and thinking about doing some work on it. I'm assuming that this file (and especially, the linked struct) are the key ones for this:

type Storage struct {

Am I right in saying the idea here would be to make the backend more generic, with an end result being that maddy's index stays in an rdbms but the message bodies (which I think are stored as blobs?) can go into a backend which might be a database or might be s3?

Edit: sorry, just saw #279, will look at go-imap-sql

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 7, 2021

This issue is about changing how ExternalStore is set in Init method in the file you referenced.

My idea is to use module framework circuitry since that will give the most flexibility and the most clean separation.

This is a pretty complicated change that requires good knowledge of maddy inner workings.

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 7, 2021

Basically, it boils down to the following:

  1. Add needed interface to framework/module package (copy go-imap-sql interface?)
  2. Add helper function to framework/config/module/interfaces.go
  3. Update imapsql's Init function to read some config directive as a module reference using helper added at step 2 (see how other modules do that for inspiration?)
  4. Write needed modules implementing needed kinds of "stores"
  5. Add hacks to Init for backward compatibility with existing configs

If you are willing to try working on it - feel free to ask guidance on any part. Or just let me know and I will try to take a look at it this weekend (probably leaving S3 store support only which should be then trivial to add).

@jmthackett
Copy link

I'll have a go at this over the next few days I think; those instructions are enough to start with. I'll open a WIP PR as soon as I can. I'm not amazingly confident but I'll try to get something working.

@jmthackett
Copy link

It feels reasonable to say I've not had chance to work on this yet, life has somewhat got away from me. I'm now going to move house too, so probably won't have chance to revisit this for a while. Sorry!

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 29, 2021

Okay. Take your time.

@foxcpp foxcpp added this to the 0.5 milestone Jul 5, 2021
@foxcpp foxcpp self-assigned this Jul 11, 2021
@foxcpp foxcpp added the ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele label Jul 11, 2021
@foxcpp
Copy link
Owner Author

foxcpp commented Jul 11, 2021

Necessary changes are done, the remaining bit is adding new store implementations.

@foxcpp foxcpp closed this as completed in 09393ae Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele
Projects
None yet
Development

No branches or pull requests

2 participants