Re: [Tzdist] tzdist examples

Paul Eggert <eggert@cs.ucla.edu> Mon, 05 January 2015 15:45 UTC

Return-Path: <eggert@cs.ucla.edu>
X-Original-To: tzdist@ietfa.amsl.com
Delivered-To: tzdist@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 32B451A020B for <tzdist@ietfa.amsl.com>; Mon, 5 Jan 2015 07:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Level:
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 vLIxD-hzDBOx for <tzdist@ietfa.amsl.com>; Mon, 5 Jan 2015 07:45:37 -0800 (PST)
Received: from smtp.cs.ucla.edu (smtp.cs.ucla.edu [131.179.128.62]) by ietfa.amsl.com (Postfix) with ESMTP id 027FF1A0197 for <tzdist@ietf.org>; Mon, 5 Jan 2015 07:45:37 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AF025A60024; Mon, 5 Jan 2015 07:45:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L7+Z3AsSSigT; Mon, 5 Jan 2015 07:45:31 -0800 (PST)
Received: from [192.168.1.9] (pool-173-55-11-52.lsanca.fios.verizon.net [173.55.11.52]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BD9A1A60022; Mon, 5 Jan 2015 07:45:31 -0800 (PST)
Message-ID: <54AAB197.5040102@cs.ucla.edu>
Date: Mon, 05 Jan 2015 07:45:27 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: Cyrus Daboo <cyrus@daboo.name>, tzdist@ietf.org
References: <9E54BBDC7F272E0E5799E1FE@cyrus.local> <CACzrW9D2UGZPPqEjrUdSZ28AXTc=RCfUzq5HBLPMSUMPg1ijgA@mail.gmail.com> <C3F1BA4B3DCB5656A683870D@cyrus.local> <5499D3B4.1000507@cs.ucla.edu> <B95F454529942901A2C436A7@cyrus.local>
In-Reply-To: <B95F454529942901A2C436A7@cyrus.local>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/tzdist/WicmDDO9QSLb8fMcQ-iaO5KifoI
Subject: Re: [Tzdist] tzdist examples
X-BeenThere: tzdist@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <tzdist.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tzdist>, <mailto:tzdist-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tzdist/>
List-Post: <mailto:tzdist@ietf.org>
List-Help: <mailto:tzdist-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tzdist>, <mailto:tzdist-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Jan 2015 15:45:39 -0000

Cyrus Daboo wrote:

> So 5(b) is a win for reducing the size of the response in the case where a small
> number of time zones change when using an incremental publisher.

Yes, I can see that.  Currently there are 588 names and aliases in the TZ 
database, containing 8439 bytes total; if we assume 10000 bytes to represent all 
the names, then under the same assumptions as my earlier message 
<http://www.ietf.org/mail-archive/web/tzdist/current/msg01086.html>, a 
request-response pair without changedsince will be ((600 + 200) + (600 + 10000)) 
bytes for the initial request and 587 * ((600 + 200) + 600) no-change requests 
and 1 * ((600 + 200) + (600 + 4000)) change request, for a total of 838600 
bytes, which is pretty large and slow.  In contrast, 5b) shrinks this to ((600 + 
200) + (600 + 200)) + ((600 + 200) + (600 + 4000)) = 7000 bytes, which is 
considerably better.

The increased efficiency does not help small clients, as they're interested in 
only one zone anyway.  It helps only intermediate servers that are republishing 
the entire databases, or fat clients that always want the full database.  If we 
assume ten updates per year, the savings is (838600 - 7000) * 10 * 8 / (365.25 * 
86400) = 2.1 b/s per intermediate server.  So the question is whether a 2.1 
bits-per-second-per-fat-client optimization is worth complicating the protocol. 
  I can see cases where it might be.

This underscores, by the way, the need for a cheap way to download the entire 
database.  Since the entire tz database can be represented in 26 KB it still 
seems odd to me that we're spending all this time worrying about optimizing 
incremental updates.  But perhaps this can wait until v2 of the protocol.

> ETag does not allow for just the set of changed time zone meta-data to be
> returned in list action.

Sure it does: just ask for the changes since a previous ETag.  I think you 
mentioned this possibility earlier.  That is, the tzdist protocol needn't invent 
its own "dtstamp" attribute that is a confusing alternative to ETag; it can just 
use ETag.  That is, changedsince=XXX should use an ETag for XXX.

One other thing.  It should be acceptable for a server, for whatever reason, to 
ignore changedsince=XXX, and simply pretend that everything has changed and to 
list all the time zones.  This might occur when a server is replaced or its time 
zone publisher changes, or it could merely be a cheap server.  That is, the 
changesince= optimization should be optional on the server side.

With these two improvement to the protocol I think changedsince= would be OK.