unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: martin f krafft <madduck@madduck.net>
To: notmuch@notmuchmail.org
Subject: Re: Git as notmuch object store (was: Potential problem using Git for mail)
Date: Mon, 25 Jan 2010 20:43:33 +1300	[thread overview]
Message-ID: <20100125074332.GA9417@lapse.rw.madduck.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1001250009500.27181@localhost>

[-- Attachment #1: Type: text/plain, Size: 3224 bytes --]

also sprach Asheesh Laroia <asheesh@asheesh.org> [2010.01.25.1819 +1300]:
> You say "Ouch" but you should know Dovecot *already* does this. I
> don't mind interoperating with that.
>
> See http://wiki.dovecot.org/MailboxFormat/Maildir, section "Issues
> with the specification", subsection "Locking". I term this theQ
> famous readdir() race.

Yikes. IMAP (including dovecot) just SUCKS.

> Without this lock, Maildir is fundamentally incompatible with IMAP
> -- one Maildir-using process modifying message flags could make
> a different Maildir-using process think said message is actually
> deleted. In the case of temporary disappearing mails in Mutt
> locally, that's not the end of the world. For IMAP, it will make
> the IMAP daemon (one of the Maildir-using processes) send a note
> to IMAP clients saying that the message has been deleted and
> expunged.
[…]
> Just don't fall into the trap of thinking Maildir is compatible
> with IMAP. It's not, because as I understand things, the
> filesystem doesn't guarantee that you can actually iterate across
> a directory's files if another process is modifying the list of
> files.

This is all perfect reason to concentrate even more on designing
a store that could potentially make IMAP obsolete once and for all!

The current idea is to sync Git downstream only, and find a way to
keep multiple copies of a tagstore in sync, by way of the "server
instance" (where mail is received/delivered). Deleting messages
would then be something like setting the notmuch::deleted tag, which
clients would honour; on the server, a cleanup process would run
regularly to actually delete the blobs associated with deleted
messages. This would then propogate the next time one pulls from
Git.

Whether to store history (commit objects) or just collections (tree
objects) needs to be investigated.

> >But there are still good reasons why you'd want to have IMAP
> >capability too, e.g. Webmail. Given the atomicity problems that
> >come from Git, maybe an IMAP server reading from the Git store
> >would make sense.
> 
> It wouldn't be too hard to write a FUSE filesystem that presented
> an interface to a Git repository that didn't allow the contents of
> files to be modified. Then Dovecot could think it's interacting
> with the filesystem.

Yes, a FUSE layer (which adds a daemon), or a lightweight access
API via libnotmuch. Probably the former using the latter. ;)

> Aww, I like Maildir flags, but if there's a sync tool, I'm fine
> with that.
[…]
> I'm not sure, but maybe it's safe if you refuse to ever modify
> a message's flags in the filename.

The main point is that there is nothing really in Maildir filenames
that you couldn't equally (and possibly better) represent in the
notmuch::* tag namespace, and then there is benefit in only having
one used primarily (which means notmuchsync can do whatever it
wants without affecting or messing with notmuch).

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"if I can't dance, i don't want to be part of your revolution."
                                                        - emma goldman
 
spamtraps: madduck.bogus@madduck.net

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-01-25  7:46 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 22:19 Idea for storing tags martin f krafft
2010-01-12  3:44 ` Scott Robinson
2010-01-12  4:06   ` martin f krafft
2010-01-12  4:51   ` Potential problem using Git for mail (was: Idea for storing tags) martin f krafft
2010-01-12 19:38     ` Jameson Rollins
2010-01-12 19:55       ` martin f krafft
2010-01-14  8:12     ` Asheesh Laroia
2010-01-14 20:37       ` martin f krafft
2010-01-21  6:28         ` Asheesh Laroia
2010-01-25  0:46           ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-25  5:19             ` Asheesh Laroia
2010-01-25  7:43               ` martin f krafft [this message]
2010-01-25 13:49             ` Sebastian Spaeth
2010-01-25 16:22               ` Mike Kelly
2010-01-25 21:46                 ` tag dir proposal [was: Re: Git as notmuch object store] Jameson Rollins
2010-01-26 16:32                   ` Scott Robinson
2010-01-26 17:03                     ` Jameson Rollins
2010-01-28  5:12                       ` martin f krafft
2010-01-28  5:28                         ` James Westby
2010-01-28  5:34                           ` martin f krafft
2010-01-28  6:22                             ` James Westby
2010-01-28  9:55                             ` martin f krafft
2010-01-28  5:10                   ` martin f krafft
2010-01-28 12:32                     ` Servilio Afre Puentes
2010-01-28 20:39                       ` martin f krafft
2010-01-28 20:49                         ` Ben Gamari
2010-01-28 21:11                           ` martin f krafft
     [not found]                             ` <1264713802-sup-620@ben-laptop>
     [not found]                               ` <20100128221735.GE8942@lapse.rw.madduck.net>
2010-01-28 23:30                                 ` Ben Gamari
2010-01-28 21:16                           ` Jed Brown
2010-01-25 19:49               ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-27  9:00               ` Sebastian Spaeth
2010-02-15  0:51             ` Stewart Smith
2010-01-12  4:11 ` Idea for storing tags Scott Morrison
2010-01-13  1:24   ` martin f krafft
2010-01-13  5:39     ` Scott Morrison
2010-01-13  5:52       ` martin f krafft
2010-01-14  1:37       ` Carl Worth
2010-01-12 21:39 ` David A. Harding
2010-01-14  1:32 ` Carl Worth
2010-01-14  8:04   ` martin f krafft
2010-01-14 22:24     ` Carl Worth
2010-01-14 22:32       ` martin f krafft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100125074332.GA9417@lapse.rw.madduck.net \
    --to=madduck@madduck.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).