Re: [Tzdist] Comments on timezone-service-11 sections 1 thru 4

Ken Murchison <murch@andrew.cmu.edu> Thu, 21 August 2014 12:05 UTC

Return-Path: <murch@andrew.cmu.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 3D5541A6F0E for <tzdist@ietfa.amsl.com>; Thu, 21 Aug 2014 05:05:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.567
X-Spam-Level:
X-Spam-Status: No, score=-2.567 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.668] 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 dk6XeFnDfVIK for <tzdist@ietfa.amsl.com>; Thu, 21 Aug 2014 05:05:39 -0700 (PDT)
Received: from smtp.andrew.cmu.edu (SMTP.ANDREW.CMU.EDU [128.2.157.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A780A1A6F0D for <tzdist@ietf.org>; Thu, 21 Aug 2014 05:05:39 -0700 (PDT)
Received: from localhost.localdomain (cpe-76-180-151-43.buffalo.res.rr.com [76.180.151.43]) (user=murch mech=PLAIN (0 bits)) by smtp.andrew.cmu.edu (8.14.8/8.14.8) with ESMTP id s7LC5bDh023760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <tzdist@ietf.org>; Thu, 21 Aug 2014 08:05:38 -0400
Message-ID: <53F5E091.4080804@andrew.cmu.edu>
Date: Thu, 21 Aug 2014 08:05:37 -0400
From: Ken Murchison <murch@andrew.cmu.edu>
Organization: Carnegie Mellon University
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: tzdist@ietf.org
References: <53F52888.1010007@cs.ucla.edu> <53F53124.9010809@lsces.co.uk> <53F5443B.5000502@andrew.cmu.edu> <53F5B160.5080409@lsces.co.uk>
In-Reply-To: <53F5B160.5080409@lsces.co.uk>
Content-Type: multipart/alternative; boundary="------------090001070200030400050506"
X-PMX-Version: 6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.8.21.115419
X-SMTP-Spam-Clean: 32% ( SXL_IP_DYNAMIC 3, TO_IN_SUBJECT 0.5, BODYTEXTH_SIZE_10000_LESS 0, DATE_TZ_NA 0, FROM_EDU_TLD 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_RESIDENTIAL 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, __ANY_URI 0, __BAT_BOUNDARY 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_HTML 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __RDNS_POOLED_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __TAG_EXISTS_HTML 0, __TO_IN_SUBJECT 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0)
X-SMTP-Spam-Score: 32%
X-Scanned-By: MIMEDefang 2.74 on 128.2.157.39
Archived-At: http://mailarchive.ietf.org/arch/msg/tzdist/SkcRtuCB8PJ6Wwgy8XFqcUudwsY
Subject: Re: [Tzdist] Comments on timezone-service-11 sections 1 thru 4
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: Thu, 21 Aug 2014 12:05:53 -0000

On 08/21/2014 04:44 AM, Lester Caine wrote:
> On 21/08/14 01:58, Ken Murchison wrote:
>>> Some actions return iCalendar packages and others return JSON packages.
>>>
>>> Just seems a mess?
>> I disagree.  All response bodies in this protocol are JSON with the
>> exception of the response to a get action, which can be whatever
>> supported format the client requests (defaulting to iCalendar).  As with
>> any other HTTP-based protocol, success and errors are signaled using
>> HTTP response codes.  In the case of errors, this protocol provides more
>> detailed info on the error in a structured JSON response body.  Seems
>> pretty simple and straightforward to me.
> It's not so obvious when one is coming to this cold ;)
>
> So actually what we are missing is the JSON definition for a get return,
> which could then follow the format of the other returns with a dtstamp
> for consistency? I think I've identified what I was  missing below ...

A client can certainly request format=application/calendar+json if it 
wants a JSON response.  In either case, the server will return an ETag 
which the client can use in a conditional request to see if the timezone 
data has changed.


>
> Again still on a learning curve here ... why is there no provision to
> return at least 'expand' as an icalendar format list? I can see how the
> capabilities can be expanded, but it seems to me if there is an option
> to return XML or iCalendar in addition to a base of JSON then all
> functions should provision that rather than having to add those details
> outside the core specification?

Interesting idea.  This would have to be iCalendar using just RDATEs and 
not RRULEs, since the point of expand is for the server to expand 
recurrences, not the client.  I don't know if this is any better than 
the existing JSON response.


> CalDAV and iCalendar are data consumers, and just need a subset of data,
> in the right format, appropriate to there applications. Building a
> mirror server is not particularly bothered by the format of how the data
> is transferred, but for scalability and speed of propagating changes the
> function I am looking to create for the base tz data as an 'update'
> function that will only pass those timeoneid's which have changes and if
> those changes will affect already archived data. Even current day
> scheduling needs the ability to identify and report short notice changes
> to DST activity which there have been several examples of already in the
> past few months. The 'changedsince' action buried in expand SHOULD also
> be an integral part of 'get' for server updates?

Updating a secondary server is covered in section 4.1.3 
<http://tools.ietf.org/html/draft-douglass-timezone-service-11#section-4.1.3> 
of the draft.  The secondary requests the list of timezones that have 
changedsince its last update and then fetches them with get actions.


> In the case of a 'light' consumer where the local diary has recorded a
> meeting for next week, if the user accesses that data and uses a new
> lookup on the tzdist, the dtstamp may flag that there has been a change
> but identifying if that change has affected the current lookup would be
> difficult locally. In this case I am not sure if the 'changedsince' is
> sufficient, but I think it can be used with the right workflow. Kicking
> out the '304 HTTP' at least identifies there is no need to do anything
> and the server just needs a fast way of calculating that.

In this case, if the client had a done previous expansion around the 
given date, it could use the ETag from that response and do a 
conditional expand request with the same parameters, which will either 
result in a 304 (nothing changed) or a 200 with the updated set of 
occurrences.

-- 
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University