[dnsoverhttp] DNS wireformat in JSON draft

Martin Thomson <martin.thomson@gmail.com> Thu, 22 September 2016 05:56 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: dnsoverhttp@ietfa.amsl.com
Delivered-To: dnsoverhttp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B437F12D0A8 for <dnsoverhttp@ietfa.amsl.com>; Wed, 21 Sep 2016 22:56:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 cMt7qzT6Xd2G for <dnsoverhttp@ietfa.amsl.com>; Wed, 21 Sep 2016 22:56:38 -0700 (PDT)
Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 641D012BF57 for <dnsoverhttp@ietf.org>; Wed, 21 Sep 2016 22:56:37 -0700 (PDT)
Received: by mail-qt0-x22b.google.com with SMTP id 38so33403453qte.1 for <dnsoverhttp@ietf.org>; Wed, 21 Sep 2016 22:56:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=5p3QkxFgEoRk03P8+F6aNCY7xvBJZyl1SibaG5VjEYU=; b=RTT28E6lsku0AAOHd0ZKAf7DjA2yf7qB06D0XOnfRvqCVpZlWKoxaPH+kiNyTuOyue dFMC9uYYoCCr/pgcfg367beFtP+BjzTc95iwOmg2RUdnKArVao31G/Pvxa8Zzhl0lcH5 n834piKAVK+2Zqz+H+WAtjFi+33eEUKoQSKvw/4tXA89YRu6kdrmjwzulH1npv0D+YYN bZkm7gHFhZZlZc+pVF7/Lra1zTUrRTviOetvt7p5G2m4YCxIBmeIXkSZxIeuMcuYno/7 jjd/MceZGoh59pZtpqHNr6NzW3pTx2/IIcyzKQ8v3oIhwAAwk/03bHiEXqkH1z+Cnh/Z liXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5p3QkxFgEoRk03P8+F6aNCY7xvBJZyl1SibaG5VjEYU=; b=QVwp762Xsq3jmJVhy2v9UjLQXgE1Iqw+IaZchZPf8NWTauTY4bjdD8cb8AlTm9CR47 IWz9OvVhJzR02RaO1nYfWBK1q/TM9gKVeQvMQ5lqxpfNQ4+QKTZmk+81xboCGYURwhxR rJ0C6LE45NiDvtUeFrCVBdXGsOZuya59a5VDPDw2vpegUrMgJ8abX5cGMmDzPALnFZwL qktxQkQJZr/LUmsJFFjmUb8TjhD2Ja647uvW7sqEKDu+RGjvXLccpEMTM2oVAkBQfXCT M4sMvuKr7Vcfezk6qEivBMuis1NvB4htEsdpMTFDq9X+Tlx5fKWI5ODzmCbzdDdO3T+G 97Ag==
X-Gm-Message-State: AA6/9RnAODXQSMhiKHosqNhhbki3crlSx2Mi2TXGl3jAzSb97KQ8qvako6cIXW6SbKzfd7UIrBmmf68ygIYEEg==
X-Received: by 10.237.45.39 with SMTP id h36mr173574qtd.155.1474523796490; Wed, 21 Sep 2016 22:56:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.22.146 with HTTP; Wed, 21 Sep 2016 22:56:36 -0700 (PDT)
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 22 Sep 2016 15:56:36 +1000
Message-ID: <CABkgnnVyvgL27pED13zgkcs9z8TKpiE7dpXWUVVnaTfiw+hstw@mail.gmail.com>
To: Paul Hoffman <paul.hoffman@icann.org>, dnsoverhttp@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsoverhttp/ppX0us8eqo1zPaZBOUXBlWRD69k>
Subject: [dnsoverhttp] DNS wireformat in JSON draft
X-BeenThere: dnsoverhttp@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Discussion of DNS over HTTP <dnsoverhttp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsoverhttp>, <mailto:dnsoverhttp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsoverhttp/>
List-Post: <mailto:dnsoverhttp@ietf.org>
List-Help: <mailto:dnsoverhttp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsoverhttp>, <mailto:dnsoverhttp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Sep 2016 05:56:40 -0000

(Starting a new thread for this stuff)

>> Frankly, I don't think that the JSON spec is anywhere near as ready as
>> your proposed protocol spec, so I'm surprised to hear you want to push
>> it out with an RFC number on it.
>
> As I keep saying, I'm quite open to comments on it. I've gotten plenty from the DNS community over the past few years, but we could have missed stuff you're seeing.

Here you go then:

What draft-hoffman-dns-in-json describes is worse than having to parse
the DNS wire protocol.

This is because it assumes that you have name compression, and all the
crap that the DNS wire protocol includes, PLUS the added complicates
of JSON and base64 (and base16).  If the goal here is to make this
format accessible in a way that DNS never has been, you can't just do
a mechanical translation of the wire format.  That does no one a
service - application developers find the format unusable and the DNS
people want their wire format back.  With what you have, you might as
well go with the binary format and leave people to mess with
ArrayBuffers and the like.  That would be a shame.

On the other hand, if you want to make this usable, then make it
usable. Ditch the name compression.  Translate the contents of the
common RRtypes into usable forms, don't just dump RDATA on people.
Don't use "*" or "!" in your names.  Don't use both base64 and base16.
Don't use \DDD encoding.  Don't use 0/1 for boolean fields.  All of
these things are very hostile to application developers.

Then you can include defaults for fields and look at other usability
improvements.  Then you might have something that an application
developer will want to look at.

In the end, you are making the server do more work to produce a usable
format, but do it right and it's fairly easy.  There are a lot more
producers than consumers in this space and the consumers will thank
you for it.