Re: [Extra] Discussing SNIPPET

Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> Tue, 18 September 2018 07:47 UTC

Return-Path: <jeff.sipek@dovecot.fi>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B9D9F130DED for <extra@ietfa.amsl.com>; Tue, 18 Sep 2018 00:47:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3f1txzJ98NIj for <extra@ietfa.amsl.com>; Tue, 18 Sep 2018 00:47:23 -0700 (PDT)
Received: from mx4.open-xchange.com (alcatraz.open-xchange.com [87.191.39.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D2E09130DDE for <extra@ietf.org>; Tue, 18 Sep 2018 00:47:22 -0700 (PDT)
Received: from open-xchange.com (imap.open-xchange.com [10.20.30.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx4.open-xchange.com (Postfix) with ESMTPS id 8E42A6A330; Tue, 18 Sep 2018 09:47:20 +0200 (CEST)
Received: from meili (alcatraz.oxoe.int [192.168.32.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by open-xchange.com (Postfix) with ESMTPSA id 323E83C1842; Tue, 18 Sep 2018 09:47:20 +0200 (CEST)
Date: Tue, 18 Sep 2018 10:47:21 +0300
From: Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
To: Chris Newman <chris.newman@oracle.com>
Cc: Bron Gondwana <brong@fastmailteam.com>, extra@ietf.org, Michael Slusarz <michael.slusarz@open-xchange.com>
Message-ID: <20180918074720.GB1384@meili>
References: <0a9f6019-776c-49ff-a800-af494374ce59@sloti22d1t06> <3E644603-F6E1-438E-841C-B4DE45DD8136@oracle.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <3E644603-F6E1-438E-841C-B4DE45DD8136@oracle.com>
User-Agent: Mutt/1.8.3 (2017-05-23)
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/oTeHVQgegVaJFY8m8Z63kr7yv98>
Subject: Re: [Extra] Discussing SNIPPET
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email mailstore and eXtensions To Revise or Amend <extra.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/extra>, <mailto:extra-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/extra/>
List-Post: <mailto:extra@ietf.org>
List-Help: <mailto:extra-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/extra>, <mailto:extra-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Sep 2018 07:47:25 -0000

On Mon, Sep 17, 2018 at 17:31:23 -0700, Chris Newman wrote:
> On 17 Sep 2018, at 4:52, Bron Gondwana wrote:
...
> > b) Cache Invalidation. Ho hum. Is this an immutable property? If so,
> > what happens if the server implementation changes? I'm quite happy to
> > call it "softly immutable" myself - it might not be exactly the same
> > bytes, but you can use the old version without major problems.
> 
> The 'softly immutable' option works for me. However, I'll propose an
> alternative so we can contrast two reasonable options. We could add a way to
> fetch a FUZZY algorithm identifier for a given folder. Something like:
> 
> C: A043 STATUS blurdybloop (FUZZYALG)
> S: * STATUS blurdybloop (FUZZYALG ("ocms:8.0"))
> 
> A cached PREVIEW=FUZZY (SNIPPET=FUZZY) from that folder is immutable unless
> the FUZZYALG string changes. This has some non-trivial server implications,
> but if clients really need predictable PREVIEW caching behavior, this is a
> protocol model I'd be willing to implement to provide that.

For what it's worth, in Dovecot we cache the generated snippet/preview along
with a version number and take the 'softly immutable' approach.  For
example, an email with body of "foobar" would turn into "1foobar" in the
cache file.  When a client FETCHes it, we strip the version.  We haven't had
the need to up the version yet, but at least in theory it should provide us
with a way to tweak the snippet algo and know which cached values are stale.

I'm not fully caught up on the discussions here so maybe I'm missing
something, but I was under the impression that the algo can be selected per
*email* so wouldn't it really have to be a FETCH * FUZZYALG?.  I don't quite
understand what the above STATUS accomplishes; I guess it is something like
a uidvalidity for snippets in a folder but I'm not convinced that it is
worth it.  If you want to have the latest snippet, just FETCH it.

Jeff.

-- 
mainframe, n.:
  An obsolete device still used by thousands of obsolete companies serving
  billions of obsolete customers and making huge obsolete profits for their
  obsolete shareholders. And this year's run twice as fast as last year's.