Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 274DF431FBD for ; Mon, 28 Apr 2014 00:45:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sKfCV94Iv2Ip for ; Mon, 28 Apr 2014 00:45:32 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9C14B431FBC for ; Mon, 28 Apr 2014 00:45:31 -0700 (PDT) Received: by mail-la0-f44.google.com with SMTP id b8so4829741lan.3 for ; Mon, 28 Apr 2014 00:45:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:from:to:subject:in-reply-to :references:date:message-id:user-agent:content-transfer-encoding; bh=KRjvpTdHENtY8cT7jLRGaeJ5xvh+nyfnqdGJplnHe/g=; b=HMfeKysZ3QJDjhJ3fRUwR7zI7mudfYjA86mFFetkWNvnmmHnuYfbjII/St+pdJtlJG HywfY5S/jDms0iBE0l6VHacuZ2UK+KGu7ujWuKTVPdgSGNVScmYrSm2n2F4A/HfV6lQ0 9vhIzJws9drtJXOy7cKU+Zm89qOAQBd5Qm64DOMAw+3Sg3oaKeJNoIcNBLMaY/p0sb3l p3GNmQwVRc1IWytLrOak6PuznKbTDa9pTCSeSDVADNjMHWtvpWSETjO+oE87lw24cYiT jFw8URbVKoWXCjY6Bmk6WYpE1PdsIqHc7AG1hSwIS6LUmIAj3+41lE9OXi+62SfmhrvP 2AoA== X-Gm-Message-State: ALoCoQmZLjwXFsGcdxjLVTltxVFUVZSjHShhSiUQKjWe5KRmjT6GXxPB+cal7dNQKOH7t73X67GM X-Received: by 10.112.46.225 with SMTP id y1mr17190437lbm.12.1398671128467; Mon, 28 Apr 2014 00:45:28 -0700 (PDT) Received: from localhost ([128.39.46.106]) by mx.google.com with ESMTPSA id kk4sm18023621lbb.22.2014.04.28.00.45.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Apr 2014 00:45:27 -0700 (PDT) Content-Type: text/plain; charset=UTF-8 From: Gaute Hope To: notmuch Subject: Re: github mirror In-reply-to: <87y4yq9g4d.fsf@ta.scs.stanford.edu> References: <87bnvn111h.fsf@Samskara.home> <20140427223717.GQ25817@mit.edu> <87y4yq9g4d.fsf@ta.scs.stanford.edu> Date: Mon, 28 Apr 2014 09:44:18 +0200 Message-Id: <1398670863-sup-1430@qwerzila> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 07:45:36 -0000 Excerpts from David Mazieres's message of 2014-04-28 07:29:06 +0200: > Austin Clements writes: > > > As for storing this information directly in messages, in general, the > > notmuch community is opposed to modifying messages. This causes many > > problems, and immutable messages are more robust and simplify so many > > things. IMAP assumes messages are immutable. Maildir assumes > > messages are immutable. Notmuch new would get dramatically slower if > > it had to check for messages modifications. What do you do if you > > change a tag and there are multiple copies of a message? What do you > > do if there are multiple copies and they disagree about the tags? How > > do you atomically update the tags stored in a message? From an > > engineering standpoint, it's much better to avoid mutable messages. > > The speed penalty would be very minor in the common case. Muchsync > scans directories (since it has to scan file contents) and the cost to > compute SHA-1 hashes of modified files is under 50 msec or something in > the common case. Extracting tags would be even cheaper. The reason is > that A) you only need to scan modified directories, and B) you don't > need to open the file unless the inode, mtime, or size has changed. > Originally I was going to implement an optimization to detect renamed > files and avoid computing SHA-1 again (for the case where maildir flags > have changed), but in the end this wasn't even worth it because the cost > is so small. > > That said, I agree that the complexity of altering files is not worth > it. Especially since most imap servers will not know about this. Also, > the question of what do you do with duplicate message IDs (which is > effectively what you have when the tags disagree) is a more general > problem still needing a solution, and would be exacerbated by embedding > important information like tags in the message. > > Really what you want is an imap server built on top of the notmuch > library. That way you could use notmuch from your desktop and then use > imap from your phone, and everything would stay perfectly in sync. > Implementing such a server wouldn't be that hard, but it would help if > notmuch made the _notmuch_message_get_doc_id and > _notmuch_directory_get_document_id functions semi-public. Then the imap > server could just use docids as uids. (Plus then muchsync wouldn't have > to go through gross contortions to get docids information...) That would be nice, but a solution where the user does not need to run his own server is in my opinion pretty essential. - gaute