Subject: Re: [lemonade] WGLC Search Within

From: Ken Murchison <[email-masked]>
Date: Wed, 03 Jan 2007 10:12:59 -0500

Eric Burger wrote:
> I thought it was done, but it really needed serious editing.  The authors
> timed out, but considering it is a 20-line draft, *I* re-wrote it.  The only
> normative change I made was making the interval seconds, not hours.

Maybe I've had too much egg nog, but the description of how OLDER and 
YOUNGER operate (section 2, paragraph 4) seems backwards to me.  Am I 
correct in assuming that OLDER is analogous to BEFORE and YOUNGER is 
analogous to SINCE?

Arnt's example from November appears to confirm this (the change from 
hours to seconds notwithstanding):

"a SEARCH UNSEEN OLDER 1 YOUNGER 2" is a valid command in the current 
draft: IMAP search has an implicit AND and all three conditions must be 
true, so that commmand finds unseen mail that's 1-2 hours old.

If so, then for OLDER, messages match if the INTERNALDATE is less recent 
(earlier, smaller time value, etc) than the calculated time (current 
time - specified value).  By my reading, the draft says the exact opposite.

For clarity, I'm viewing OLDER and YOUNGER as sown below.  if my premise 
is wrong, please correct me.

      0 (1970)            spec'd time                    cur time
      |                       |                             |
time +-----------------------+-----------------------------+-->
                              |
       <----------- OLDER ----|---- YOUNGER --------------->

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University

_______________________________________________
lemonade mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/lemonade

---

From: Dave Cridland <[email-masked]>
Date: Wed, 03 Jan 2007 17:02:34 +0000

On Wed Jan  3 15:12:59 2007, Ken Murchison wrote:
> Maybe I've had too much egg nog, but the description of how OLDER 
> and YOUNGER operate (section 2, paragraph 4) seems backwards to me.

Agreed, it looks backwards to me too.

I'm also concerned with the rules in the second and third paragraphs. 
My major concern is that a client might decide to use a search using, 
for example, YOUNGER 1800. According to the third paragraph, this 
might be treated as YOUNGER 0, which is going to consistently match 
nothing, and be somewhat surprising. Also, making the hour-level 
precision a MUST requires that a server be able to calculate a date 
and time a precise number of hours ago. I think a SHOULD is good 
enough here - we're providing a yardstick of acceptability rather 
than a hard and fast rule.

I think both of these may be addressed by text something like:

For both the OLDER and YOUNGER search keys, the server calculates a 
target date and time by subtracting the interval from the current 
date and time of the server. The server then compares the target time 
with the INTERNALDATE of the message, as specified in IMAP [2]. For 
OLDER, messages match if the INTERNALDATE is less recent than, or 
equal to, the target time. For YOUNGER, messages match if the 
INTERNALDATE is more recent than, or equal to, the target time.

In some cases, the server may be unable, or unwilling, to use a 
precision of a single second. This is expected to be the case 
particularly for dynamically updated searches. In these cases, 
servers are permitted to reduce the precision used for date 
calulcations and comparisons, but SHOULD ensure that a precision of 
no less than an hour (3600 seconds) is used. This might mean 
re-running the search criteria only every hour for a dynamic search, 
for example. Clients MUST be aware that search results, whether 
viewed directly or through some other mechanism, MAY not be accurate 
as a result.

[text ends]

Dave.
-- 
Dave Cridland - mailto:[email-masked] - xmpp:[email-masked]
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

---

From: Ken Murchison <[email-masked]>
Date: Thu, 04 Jan 2007 17:50:13 -0500

A few editorial nits and one suggestion:

- Abstract

OLD: "... OLDER and YOUNGER, differs from SINCE ..."

NEW: "... OLDER and YOUNGER, differs from BEFORE and SINCE ..."

- Section 1

"The server calculates the time of interest by subtracting the time 
interval presented by the client, ..."

Subtract the interval from what?

- Section 2

OLD: "... the server calculates a date and time by subtracting the 
interval on the current date and time of the server."
          ^^

NEW: "... the server calculates a date and time by subtracting the 
interval from the current date and time of the server."
          ^^^^

[NOTE that this is already fixed in Dave's suggested text]

- Section 3: The reference to ABNF incorrectly points to RFC 2119.  A 
normative reference to RFC 4234 needs to be added.

- Section 4: It might be nice if the example listed some message numbers 
and their INTERNALDATEs (along with the server's current date/time), 
otherwise it only shows the correct syntax and not any of the 
YOUNGER/OLDER logic.