unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC PATCH 00/14] modular mail stores based on URIs
@ 2012-06-25 20:41 Ethan Glasser-Camp
  2012-06-25 20:41 ` [RFC PATCH 01/14] All access to mail files goes through the mailstore module Ethan Glasser-Camp
                   ` (6 more replies)
  0 siblings, 7 replies; 31+ messages in thread
From: Ethan Glasser-Camp @ 2012-06-25 20:41 UTC (permalink / raw)
  To: notmuch

Hi guys,

Sorry for dropping off the mailing list after I sent my last patch series (http://notmuchmail.org/pipermail/notmuch/2012/009470.html). I haven't had the time or a stable enough email address to really follow notmuch development :)

I signed onto #notmuch a week or two ago and asked what I would need to do to get a feature like this one into mainline. j4ni told me that he agreed with the feedback to my original patch series, and suggested that I follow mjw1009's advice of having filenames encode all information about mail storage transparently, and that this would solve the problem with the original patch series of sprinkling mail storage parameters all over the place. bremner suggested that he had been thinking about how to support mbox or other multiple-message archives, and also commented that he wasn't crazy about so much of the API being in strings.

Based on this advice, I decided to revise my approach to this patchset, one that is based around the stated desire to work with mbox formats. This approach, in contrast to the mailstore approach that Michal Sojka proposed and I revised, encodes all mail access information as URIs. These URIs are stored in Xapian the way that relative paths are right now. Examples might be:

    maildir:///home/ethan/Mail/folder/cur/filename:2,S
    mbox:///home/ethan/Mail/folder/file.mbox#byte-offset+lenght
    couchdb://ethan:password@localhost:8080/some-doc-id

Personally, this isn't my favorite approach, for the following reasons:

1. Notmuch, at some point in its history, chose to store file paths relative to a "mail database", with the intent that if this mail database was moved, filenames would not change and everything would Just Work (tm). The above scheme completely reverses this design decision, and in general completely breaks this relocatability. I don't see any easy way to handle this problem. This isn't just a wishlist feature; at least two things in the test suite (caching of corpus.mail, and the atomicity tests) rely on this behavior.

2. Mail access information, i.e. open connections, etc. can only be stored in variables global to the mailstore code, and cannot be stored as private members of a mailstore object. This is more an aesthetic concern than a functional one.

Anyhow, the following (enormous) patch series implement this design. I used uriparser as an external library to parse URIs. The API for this library is a little idiosyncratic. uriparser supports parsing Unicode URIs (strings of wchar_t), but I just used ASCII filenames because I think that's what comes out of Xapian.

Patch 11 is borrowed directly from the last patch series.

The last four or five patches add mbox support, including a few tests. That part of the series is still very first-draft: I added a new config option to specify URIs to scan, and ">From " lines still need to be unescaped. However, we support scanning mbox files whether messages have content-length or not.

I will try to receive feedback on this series more gratefully than the last one. :)

Thanks again for your time,

Ethan

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2012-07-03  8:40 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 20:41 [RFC PATCH 00/14] modular mail stores based on URIs Ethan Glasser-Camp
2012-06-25 20:41 ` [RFC PATCH 01/14] All access to mail files goes through the mailstore module Ethan Glasser-Camp
2012-06-28 20:48   ` Mark Walters
2012-06-25 20:41 ` [RFC PATCH 02/14] Introduce uriparser Ethan Glasser-Camp
2012-06-25 20:41 ` [RFC PATCH 03/14] mailstore can read from maildir: URLs Ethan Glasser-Camp
2012-06-25 20:41 ` [RFC PATCH 04/14] Not all filenames need to be converted to absolute paths Ethan Glasser-Camp
2012-06-27  9:17 ` [RFC PATCH 00/14] modular mail stores based on URIs Mark Walters
2012-06-28  7:39   ` Ethan
2012-06-28 15:13     ` David Bremner
2012-06-28 20:41       ` Robert Horn
2012-06-28 20:45     ` Mark Walters
2012-07-01 16:02       ` Ethan
2012-07-01 16:39         ` [PATCH v2 0/8] URI-based modular mail stores Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 1/8] All access to mail files goes through the mailstore module Ethan Glasser-Camp
2012-07-01 19:48             ` Mark Walters
2012-07-01 16:39           ` [PATCH v2 2/8] Introduce uriparser Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 3/8] Not all filenames need to be converted to absolute paths Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 4/8] new: add "scan" option Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 5/8] notmuch-new: pull out useful bits of add_files_recursive Ethan Glasser-Camp
2012-07-01 19:55             ` Mark Walters
2012-07-01 16:39           ` [PATCH v2 6/8] mailstore: support for mbox:// URIs Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 7/8] Tests for mbox support Ethan Glasser-Camp
2012-07-01 16:39           ` [PATCH v2 8/8] new: Add scan support for mbox:// URIs Ethan Glasser-Camp
2012-07-01 16:48         ` [RFC PATCH 00/14] modular mail stores based on URIs Mark Walters
2012-07-03  8:40         ` Jameson Graef Rollins
2012-06-28 17:36 ` Jameson Graef Rollins
2012-06-28 18:39   ` Ethan
2012-06-28 22:00 ` Mark Walters
2012-06-29  6:43   ` Ethan
2012-06-29  7:00     ` Mark Walters
2012-06-29  7:43     ` Jani Nikula

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).