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

Keith Moore <moore@network-heretics.com> Fri, 27 November 2020 01:58 UTC

Return-Path: <moore@network-heretics.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 1D1C53A0FAE for <ietf@ietfa.amsl.com>; Thu, 26 Nov 2020 17:58:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.918
X-Spam-Level:
X-Spam-Status: No, score=-1.918 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NONE=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=messagingengine.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 dBxOXv-tzpvg for <ietf@ietfa.amsl.com>; Thu, 26 Nov 2020 17:57:59 -0800 (PST)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 411BA3A0F49 for <ietf@ietf.org>; Thu, 26 Nov 2020 17:57:59 -0800 (PST)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 658905C01EB for <ietf@ietf.org>; Thu, 26 Nov 2020 20:57:58 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 26 Nov 2020 20:57:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=q0NYrJ Qog4fjrDLrSWLFrMlMtXL0zIsP/hCHh+hevS4=; b=n4phAmr7l+rUa1ff6a0SsH dFUutAPE1IVlqkobrCzNN/uwWtLdQCifuhbM7D6J8SzUwsjUozFYS2DSOKpyrkd2 TpDH5ocFIx5a67VUQ9RSVsWYDLqCG7j4kB0khjrVOSL/yMPxtuRly0WQ+sJoApY6 6QIQM/dXcnAIMcAxLsoFtItsGVS3NJZnR6ik51DO3jj45wMfbH8oXmOhZdj1iZWK jHKVJxNi/DMd3RuH5msBwNQqlk9fb7PpEIpL3RIrrBS/xnWhgs5YdT58U31PyWnJ SRIF7eJcReIQ9R5HoaaP2AY9xoAxGVX5cppeMLdH7e4HlA8nR6n/Q5y/Ekd50pIQ ==
X-ME-Sender: <xms:JV3AX67B1p9RCgrmiddZZNQfue-MoQZXV_EUViIAhbow28Sk0RQpbg> <xme:JV3AXz7n0LhCZoV3qzcEUD4fHpaBZuYYPHmGZ66llGZjQI2huwVmmhpy0BlcHf1iG eX957RC6J7WLw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudehfedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlqddutddmnecujfgurhepuf fvfhfhkffffgggjggtsegrtderredtfeejnecuhfhrohhmpefmvghithhhucfoohhorhgv uceomhhoohhrvgesnhgvthifohhrkhdqhhgvrhgvthhitghsrdgtohhmqeenucggtffrrg htthgvrhhnpefhueelvdehgeeitddttdeuveeuffevieevveeifedtjeetvdehtdekffel jeejfeenucffohhmrghinheplhhotgdrghhovhenucfkphepuddtkedrvddvuddrudektd drudehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhoohhrvgesnhgvthifohhrkhdqhhgvrhgvthhitghsrdgtohhm
X-ME-Proxy: <xmx:Jl3AX5eBPEmxKFtDVVi6HDp-FHO8FGViXqSarKa6qgETtD9DthpRDA> <xmx:Jl3AX3JDSDkbuUg1qod7Z93HJTHbbudXrCipp172coRZrcZqJj1ZqQ> <xmx:Jl3AX-LnuJXrTz4Rr5QxF7j0Utz2WB29gDbe00DeOnSeLPPA2-B3lw> <xmx:Jl3AX1ZzmD-YuYFhqH31H-9tihySgQIcxr_nmaufIoG-0DikJ0LyWA>
Received: from [192.168.1.85] (108-221-180-15.lightspeed.knvltn.sbcglobal.net [108.221.180.15]) by mail.messagingengine.com (Postfix) with ESMTPA id B9581328005D for <ietf@ietf.org>; Thu, 26 Nov 2020 20:57:57 -0500 (EST)
Subject: Re: [wasm] sqlite as rfc-spec'd web-interchange-format?
To: ietf@ietf.org
References: <CALPJ4700ueNSZvBfRjsD82X6dkGxTO8RaJYXrs4uC2oH8MTa9A@mail.gmail.com>
From: Keith Moore <moore@network-heretics.com>
Message-ID: <d84000f3-a59f-28a8-664d-5e8df30be130@network-heretics.com>
Date: Thu, 26 Nov 2020 20:57:56 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <CALPJ4700ueNSZvBfRjsD82X6dkGxTO8RaJYXrs4uC2oH8MTa9A@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------0A58ED75332823D8DEB7EF63"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/da9WXMv0UX7_st3Jt88seWZF0RE>
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: Fri, 27 Nov 2020 01:58:01 -0000

On 11/26/20 7:08 PM, kai zhu wrote:
> i'm noob to mailing-list, and if you think there's more appropriate 
> place for subject, please let me know.
>
> motivation:
> as product-developer, i waste huge amount of time reinventing 
> error-prone serializers/revivers to exchange complex-datasets across 
> web.  standardizing sqlite's file-format would reduce 
> integration-headaches between me / teammates / 3rd-parties, since we 
> could more easily agree to use wasm-sqlite's standard 
> serializers/revivers (instead of everyone reinventing their own for 
> the web).
>
> why sqlite as web-interchange-format?
> 1.
> wasm-sqlite's serializers/revivers are opensource and accessible to 
> web-clients
> 2.
> The [U.S.] Library of Congress Recommended Formats Statement (RFS) 
> includes SQLite as a preferred format for datasets 
> <https://www.loc.gov/preservation/resources/rfs/data.html>. [1]
> 3.
> sqlite's last file-format (v4) remains stable and unchanged since 2006
> 4.
> all sqlite file-formats since 2004 (v1, v2, v3, v4) are intended to be 
> forward-compatible with future sqlite releases
> 5.
> sqlite is the "Most Widely Deployed and Used Database Engine" (and 
> perhaps second most widely deployed software library, after libz). [2]
>
> the spec for sqlite's file-format is here [3].  i'm no expert at 
> reading it, but am wondering how feasible to translate it to an 
> rfc-spec (minus the journaling part)?
>
> -kai

I've been badly burned by the sqlite library more times than I can 
count.  Unless it's been fixed fairly recently, it is lousy at handling 
concurrent queries, so for that reason alone promoting the file format 
might be a disservice.

But maybe it makes some sense as a database interchange format. Maybe.   
In my experience a lot gets lost in translation between sqlite tables 
and other databases, but maybe not so much that it's useless as a way to 
convey datasets. It's probably a useful format for use in information 
transfer and maybe even simple single-user queries, but beware of using 
the sqlite library to make any kind of services providing concurrent 
access to more than one process.

I'm also not sure whether IETF can attract enough of the right kind of 
expertise to do a good job at this.

But I do suspect there's a need for something like this to be 
standardized, by someone.

Keith