Re: [wasm] sqlite as rfc-spec'd web-interchange-format?

John Levine <johnl@taugh.com> Sat, 28 November 2020 22:02 UTC

Return-Path: <johnl@iecc.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2E3123A03F3 for <ietf@ietfa.amsl.com>; Sat, 28 Nov 2020 14:02:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.851
X-Spam-Level:
X-Spam-Status: No, score=-1.851 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=iecc.com header.b=lgaCjNDy; dkim=pass (2048-bit key) header.d=taugh.com header.b=d8nRcfvv
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 CYMWBogJ2T_n for <ietf@ietfa.amsl.com>; Sat, 28 Nov 2020 14:02:57 -0800 (PST)
Received: from gal.iecc.com (gal.iecc.com [IPv6:2001:470:1f07:1126:0:43:6f73:7461]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56FBF3A03F4 for <ietf@ietf.org>; Sat, 28 Nov 2020 14:02:55 -0800 (PST)
Received: (qmail 98049 invoked from network); 28 Nov 2020 22:02:54 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=iecc.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:cleverness; s=17efe.5fc2c90e.k2011; bh=99Xr1spr6UEv5UpqbES2Ult+fEVUL8ccAslHskmGsGA=; b=lgaCjNDyLCsRrlmbbMSV7y7BYH+10NHBZCDIc6bs9kUFVFNnEp4i3qK65PUazFNCk7nncMIibm5Hi0ZyyyWL//vHKVLO5EF6nLUr0U9B1eYRFbyk5SW718fovuz2R8KjjU3+V7t8V9AObQnSsUE9KsPKc1sXyJYBdd04QMYLEO+FsX3Sq+gfO3+6poj7pGj25KtnvUSYesSBqTmv7rCuCHxv3hmCTUe8PqarBMIj16kuwjRYt8H9yoSxK6HJdNF21CYEVxv6rHuLbkTyoqG1TrTpNAvZ3admtaR1F8zqpVNQy3ZR5LcNUJf5PmnfDvjY2wTxXtorhspZBUeir8/EqQ==
DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=taugh.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:cleverness; s=17efe.5fc2c90e.k2011; bh=99Xr1spr6UEv5UpqbES2Ult+fEVUL8ccAslHskmGsGA=; b=d8nRcfvv3smWg0uq/CQxaym6yRG+0C2hd7f4ehzfC7jty+PMLQjAlOv2Png5vqlhxvsx/S++hjSkpBy6U+rBFaQKpntADmBSHJfwpF3x/Z83fsPASqUUTX3ad2cDjQGuHD7+MO8nBz6azy7J4ho6MtQTviynL06kXNMnflkJ2shdKUrpATU+nh/CpQc7NZbiTVySVmUHrBIzmDdtO/P/p+M5n7Ri/dwdlz4e2brl++yoSH59sjnlnprN1NPpthKvZ862nn3XGELgXolHqHXJSwpbSxnv/ngB3BIzVhYTRmORIFr+X4cBllet7Iyn8dTveSm5DKzec+125uXNNOrqyw==
Received: from ary.qy ([IPv6:2001:470:1f07:1126::78:696d:6170]) by imap.iecc.com ([IPv6:2001:470:1f07:1126::78:696d:6170]) with ESMTPS (TLS1.2 ECDHE-RSA AES-256-GCM AEAD) via TCP6; 28 Nov 2020 22:02:53 -0000
Received: by ary.qy (Postfix, from userid 501) id 73CFC28653DA; Sat, 28 Nov 2020 17:02:53 -0500 (EST)
Date: Sat, 28 Nov 2020 17:02:53 -0500
Message-Id: <20201128220253.73CFC28653DA@ary.qy>
From: John Levine <johnl@taugh.com>
To: ietf@ietf.org
Cc: mcr+ietf@sandelman.ca
Subject: Re: [wasm] sqlite as rfc-spec'd web-interchange-format?
In-Reply-To: <4866.1606544057@localhost>
Organization: Taughannock Networks
X-Headerized: yes
Cleverness: minimal
Mime-Version: 1.0
Content-type: text/plain; charset="utf-8"
Content-transfer-encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/qpwTo_R2iEPTEwK0DunUuyq_s5s>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2020 22:02:59 -0000

In article <4866.1606544057@localhost> you write:
-=-=-=-=-=-
>It's an interesting idea.
>
>There are quite a number of other serialization formats out there including:
>bincode, msgpack, protobuf, and of course, IETF's CBOR RFC7049.  Also JSON.
>For "opendata" we've would up with CSV, which I really dislike.
>{So funny that the UK's data problem with COVID rates was due to some
>data flow that went CSV->XLS->database, fixed when they went CSV->XLSX->database,
>when there was never a reason to use XLS* at all. So perhaps this argues your
>case}

The sqlite format is extremely complex. It bundles together a schema,
modified B-trees with overflow and free list pages to store keyed
data, and some multiple access locking flags that the description said
aren't used any more. (Sqlite originally didn't support multiple
access but that was a long time ago.)

It looks to me like the vast majority of sqlite applications use the C
library from sqlite.org and it's not clear that there's another full
implementation. This raises the question of whether the real
definition is the spec or the code.

I think sqlite is fine for what it does but it doesn't make sense as a
serialization format for the Internet. It is simultaneously too
complicated with all of the SQL schema features that support for
database update in place, and too semantically limited as jck pointed out.

There are a lot of widely used data format that the IETF and other
SDOs haven't blessed, like FITS which is a widely used format for
multidimensional numeric data, but whose definition is maintained by
the astronomers who originally designed it. I think sqlite is like
that, fine for what it does, perfectly reasonable to transmit as files
over the Internet, but not appropriate for IETF standardization.

R's,
John