Re: A structured format for dates?

David Benjamin <davidben@chromium.org> Wed, 24 August 2022 15:42 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 080CFC1524B2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2022 08:42:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.63
X-Spam-Level:
X-Spam-Status: No, score=-5.63 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wYKNgxRaHMbn for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2022 08:42:53 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 11F90C14CF06 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 24 Aug 2022 08:42:52 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1oQsU9-00C4l4-9r for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Aug 2022 15:40:05 +0000
Resent-Date: Wed, 24 Aug 2022 15:40:05 +0000
Resent-Message-Id: <E1oQsU9-00C4l4-9r@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <davidben@google.com>) id 1oQsU7-00C4k6-Qu for ietf-http-wg@listhub.w3.org; Wed, 24 Aug 2022 15:40:03 +0000
Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by titan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <davidben@google.com>) id 1oQsU6-0047qZ-70 for ietf-http-wg@w3.org; Wed, 24 Aug 2022 15:40:03 +0000
Received: by mail-qv1-xf33.google.com with SMTP id b2so13145573qvp.1 for <ietf-http-wg@w3.org>; Wed, 24 Aug 2022 08:40:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=qPg5VWA6Od+aVwAewpHsltuuKFUqKpZfrRn2w1RMHs4=; b=L2a7s23GR6VPcQxpAJek1eMIlVPvgj6PYmVxpfHgZjlCcefVAo3yWKrM1QrZUa7pF3 3X+ovY6vCiqGah33zoPSMUnk9flJ51JBbuXH1TZ9QmjlUU8HlTmEljoD0ikDTbX/DcYn 0CDBmZXbfwEBVR69lCe4RfHIUj1YIlhhoH+Uo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=qPg5VWA6Od+aVwAewpHsltuuKFUqKpZfrRn2w1RMHs4=; b=K7hiGmGdqOuwPGXHqapTjs0BtGGKXHcv6YMybibrXsOhPX7SJhwzjDAtidFI/fo+Ty Er4TbqlGGBjO9Yx9zJCmQ5Yht4+tcSUVZkLx5XdqzRsC60avuo0Hq1QltQL27G9S5Oxu JZJG7N58CKD9lvLmlTrhps0ktL3uqj8O4alZaJy+hk7GpFkul7IZ+KFW7tEtEBUAVbeS Y9eOu9qJ9wsituuB3nMUe5WlJr7QuBn67N+72/PbK4DGWnIkd1JS9UXwRx4v53/Sx3Y0 X5VPXPqRXgmZSn345ZCBH8sSuQJ82tuTyfr8BVEObJDDa24Z9aNxcT4a4RJSVrRY0j5g ftlA==
X-Gm-Message-State: ACgBeo2yMzCpIcILHUCBFIb3QyGdvgj4q2baz4VCR8CN04zgcAhfUWdn qQvpCNcmgFNSl4i/UDM89N/RA7xGt4o1lIgEY8K6
X-Google-Smtp-Source: AA6agR7q7qb+/Egp5VzoPPU6BzdNOOAEpthG9AVZlh9UWXyREjYoLZKvFYM/ayoJLG8I6qKPS1x9vrJV1gRnMNGqQhY=
X-Received: by 2002:a05:6214:d66:b0:496:d9c0:3134 with SMTP id 6-20020a0562140d6600b00496d9c03134mr15935692qvs.109.1661355590328; Wed, 24 Aug 2022 08:39:50 -0700 (PDT)
MIME-Version: 1.0
References: <202208231056.27NAuWFY015133@critter.freebsd.dk> <7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com> <685890F9-9F68-41EF-AC8C-86ACAD074A38@mnot.net> <202208240838.27O8c6eE021749@critter.freebsd.dk> <CAJ_4DfRQJCj-fQnTKhdfqt58BWg=zDb_2cHtjERSF5YjzQpDdw@mail.gmail.com>
In-Reply-To: <CAJ_4DfRQJCj-fQnTKhdfqt58BWg=zDb_2cHtjERSF5YjzQpDdw@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Wed, 24 Aug 2022 11:39:32 -0400
Message-ID: <CAF8qwaAYJXNytB0Q0kRJC3G28uwMzxn6xxTMUEP4bMnyoELqDw@mail.gmail.com>
To: Ryan Hamilton <rch@google.com>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Mark Nottingham <mnot@mnot.net>, Tommy Pauly <tpauly@apple.com>, Roberto Polli <robipolli@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000cf14fb05e6fe7d4d"
Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=davidben@google.com; helo=mail-qv1-xf33.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=davidben@google.com domain=chromium.org), signature is good
X-W3C-Hub-Spam-Status: No, score=-11.3
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1oQsU6-0047qZ-70 68473891444360f73571aad6b1510740
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/CAF8qwaAYJXNytB0Q0kRJC3G28uwMzxn6xxTMUEP4bMnyoELqDw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40351
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

+1 on the integer format. Every boundary between every pair of existing
HTTP-based systems handles the textual representation of HTTP headers.
Boundaries between systems are hard to change, so we should expect binary
structured fields will, at best, succeed in a few key boundaries where
we're willing to put the effort into migrating. The rest will pay the costs
of the textual representation, from size to complexity to interop risk.
(It's not too hard to accidentally accept, say, June 31st as an alias for
July 1st. Calendar math is messy.)

On Wed, Aug 24, 2022 at 9:55 AM Ryan Hamilton <rch@google.com> wrote:

> I'm sold on the arguments that an integer format is the way to go.
>
> On Wed, Aug 24, 2022 at 1:41 AM Poul-Henning Kamp <phk@phk.freebsd.dk>
> wrote:
>
>> --------
>> Mark Nottingham writes:
>>
>> > IMO the only reason we'd choose an integer textual representation is if
>> we
>> > didn't believe that [binary structured fields are going to happen].
>>
>> I disagree.
>>
>> First, we are never going to get 100% penetration for a binary
>> serialization,
>> and it will take about five years for any significant uptake of it.
>>
>> Second, the efficiency arguments are invariant of the existence of
>> binary serializations, because most of the actual HTTP header
>> processing HTTP headers will not operate on the binary serialization
>> in the first place.
>>
>> Third, there are many efficiency arguments for integer textural
>> representation,
>> even without considering binary serializations:
>>
>> * takes up less space in files and on the wire
>> * compresses better.
>> * is faster and uses less instructions/energy to produce and parse
>> * is easier and less error-prone to produce and parse
>>
>> So I really dont see binary structured fields as particularly relevant
>> for this
>> decision, if anything, they just add one more efficiency argument:
>>
>> * is faster/uses less instructions/energy and easier to (de)serialize as
>> binary.
>>
>> Poul-Henning
>>
>> --
>> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
>> phk@FreeBSD.ORG         | TCP/IP since RFC 956
>> FreeBSD committer       | BSD since 4.3-tahoe
>> Never attribute to malice what can adequately be explained by
>> incompetence.
>>
>>