Re: [Tzdist] Ticket #22

Ken Murchison <murch@andrew.cmu.edu> Thu, 28 August 2014 20:02 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 A00951A8917 for <tzdist@ietfa.amsl.com>; Thu, 28 Aug 2014 13:02:20 -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 I_7w_BaqI686 for <tzdist@ietfa.amsl.com>; Thu, 28 Aug 2014 13:02:16 -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 30E9F1A017D for <tzdist@ietf.org>; Thu, 28 Aug 2014 13:02:16 -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 s7SK2DLT031925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <tzdist@ietf.org>; Thu, 28 Aug 2014 16:02:14 -0400
Message-ID: <53FF8AC5.8010803@andrew.cmu.edu>
Date: Thu, 28 Aug 2014 16:02:13 -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: <53FDC7C7.5090601@andrew.cmu.edu> <53FDCC59.5030709@lsces.co.uk> <53FDD001.1030509@andrew.cmu.edu> <53FDD6AB.2040108@lsces.co.uk> <1A53EA915BFC18CE7032D937@caldav.corp.apple.com> <53FDEC6D.7010700@lsces.co.uk> <2C63A61739282D507903E4C7@caldav.corp.apple.com> <53FE0A55.1090206@lsces.co.uk> <EF49B4409B8CFD53FCD254F0@caldav.corp.apple.com> <CADZyTkmpqGtb9CXEcyQCirr0D29Bt2BD+JkKQi_a5k4y5L4Vhw@mail.gmail.com>
In-Reply-To: <CADZyTkmpqGtb9CXEcyQCirr0D29Bt2BD+JkKQi_a5k4y5L4Vhw@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------050301020302040804060608"
X-PMX-Version: 6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.6.13.92118
X-SMTP-Spam-Clean: 33% ( SXL_IP_DYNAMIC 3, TO_IN_SUBJECT 0.5, HTML_NO_HTTP 0.1, BODY_SIZE_10000_PLUS 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, __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_PATH 0, __URI_NS , __USER_AGENT 0)
X-SMTP-Spam-Score: 33%
X-Scanned-By: MIMEDefang 2.74 on 128.2.157.39
Archived-At: http://mailarchive.ietf.org/arch/msg/tzdist/tBhk3Pj2uCmFL5-0KLlgSPD21mU
Subject: Re: [Tzdist] Ticket #22
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, 28 Aug 2014 20:02:21 -0000

I agree that ETag + "changedsince" is sufficient.


On 08/28/2014 03:59 PM, Daniel Migault wrote:
> Do we have consensus that using Etag and "changedsince" for tz data 
> synchronization is sufficient for the use cases we are considering?
>
> My understanding is is that it may not address all use cases, but most 
> of them. An appropriate synchronization would involve modifying the 
> data format which is another topic.
>
> I believe we will need to make similar trade-off considering POSH/TLS.
>
> BR,
> Daniel
>
>
>
> On Thu, Aug 28, 2014 at 4:16 PM, Cyrus Daboo <cyrus@daboo.name 
> <mailto:cyrus@daboo.name>> wrote:
>
>     Hi Lester,
>
>
>     --On August 27, 2014 at 5:41:57 PM +0100 Lester Caine
>     <lester@lsces.co.uk <mailto:lester@lsces.co.uk>> wrote:
>
>         OK this is filling in my mistakes ... I'd not considered
>         relying only on
>         the ETag caching given the qualification on it's use in the get
>         definition? Re-reading it of cause , there SHOULD only be one
>         timezone
>         specified so under what condition would it not?
>
>
>     I think that text is left over from a time when we allowed
>     multiple time zones to be returned in a single GET, but we later
>     decided that was overkill and broke HTTP caching to an extent we
>     were uncomfortable with. I will fix that text.
>
>
>         I'm more used to data replication which is transactional. I'm
>         normally
>         doing all of this in databases. It's just different mindsets.
>         I would
>         just be replicating the change rather than resending the whole
>         data
>         package. But we are not reliant on a single data source which
>         is what
>         ETag is enforcing? Having said that, since the data IS well
>         defined why
>         would the generated ETag values be different between servers?
>
>
>     ETags are opaque tokens generated by the HTTP server. There is no
>     requirement that different servers use the same method to generate
>     those - some may choose an md5 hash, others sha1, and others
>     something completely different. So ETags are not meant to
>     represent state across servers - they only represent the state of
>     the one resource they are "attached" to.
>
>
>         The race condition I'm more concerned about here is that of a
>         secondary
>         server, but rethinking things, it's more a case here of what
>         is used to
>         feed that servers clients? While the server is downloading and
>         processing each new get, what is it's response to it's
>         clients? Is each
>         new change used as it's downloaded, and IT'S list package
>         changed each
>         time, or as I proposed previously does the whole update get
>         processed
>         and then made active .. as I would expect the distributor to
>         be doing.
>
>         I can see now why you may have such a diverse spread of
>         versions while
>         I'm looking to maintain data that is NOT necessarily being
>         used on the
>         same machine that the normalizing has been processed on so I
>         NEED a
>         stable version identity for other machines to work with! I need
>         something that can be stored with the archived data and
>         verified later,
>         which is what a properly managed last-modified provides.
>
>
>     By choosing to allow individual time zones to be downloaded, as
>     opposed to the entire database all in one go, we do introduce the
>     possibility of race conditions. In the case of a secondary server
>     replicating what is on a primary, the secondary can achieve some
>     level of integrity by using action=list&changedsince,action=get
>     operations up to a point where the list+changedsince returns no
>     results.
>
>     As far as clients go, they too are subject to this race - they too
>     could repeat a list+changedsince immediately after doing a
>     list/get sync to verify they have the latest.
>
>
>             Now, I do think the current draft is lacking in discussion
>             of the
>             ETag-condition action=get behavior, and I propose adding
>             text to Section
>             6.3 to cover that. I would also be willing to add a
>             (non-mormative)
>             appendix describing an example client sync procedure such
>             as the one I
>             outlined above, but I really want it to be in the most
>             general of terms
>             because client implementors really need to think carefully
>             about that
>             themselves.
>
>
>         This is not exactly obvious to a new reader :(
>         My own experience of caching can be somewhat hit and miss as
>         the routing
>         and data proxies change. We have to design the mobile applications
>         around here so they work reliably off-net until a mobile
>         connection can
>         be restored, and I'm not yet convinced that ETag can work in that
>         situation? A local database/webserver maintains operation
>         until it can
>         replicate that back to the main service.
>
>
>     ETag together with list+changedsince is the equivalent of what we
>     do in CalDAV - there clients also use ETag together with the
>     webdav sync REPORT to cache data from the server. Those client are
>     all capable of working in an offline mode - and in fact a more
>     complex mode in that changes made on the client whilst
>     disconnected need to be sync'd up to the server when they
>     re-connect, i.e., a two-way sync is involved. So I am confident
>     what we have now is sufficient for a one-way sync from primary to
>     secondary or server to client, though I am not confident I have
>     convinced you of that fact yet :-)
>
>     -- 
>     Cyrus Daboo
>
>
>     _______________________________________________
>     Tzdist mailing list
>     Tzdist@ietf.org <mailto:Tzdist@ietf.org>
>     https://www.ietf.org/mailman/listinfo/tzdist
>
>
>
>
> -- 
> Daniel Migault
> Orange Labs -- Security
> +33 6 70 72 69 58
>
>
> _______________________________________________
> Tzdist mailing list
> Tzdist@ietf.org
> https://www.ietf.org/mailman/listinfo/tzdist


-- 
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University