[Json] JSON Sequence support for log files

Nico Williams <nico@cryptonector.com> Wed, 07 May 2014 21:42 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74D011A03AE for <json@ietfa.amsl.com>; Wed, 7 May 2014 14:42:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Level:
X-Spam-Status: No, score=-1.044 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, IP_NOT_FRIENDLY=0.334] autolearn=no
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 RiMi_aP79vck for <json@ietfa.amsl.com>; Wed, 7 May 2014 14:42:12 -0700 (PDT)
Received: from homiemail-a28.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id CC2631A03A6 for <json@ietf.org>; Wed, 7 May 2014 14:42:12 -0700 (PDT)
Received: from homiemail-a28.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTP id BB98F1B406E for <json@ietf.org>; Wed, 7 May 2014 14:42:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:date:message-id:subject:from:to:content-type; s= cryptonector.com; bh=bZvqqSkTYgulC2Pgw0QzeZcQqI8=; b=hA5itki/gt6 aA7Al4wBb4IwokAq0XMuye7/MZqEKqL37jAIe3SqtGwRur/IGsj9shtfFfVdo2b/ VBf1qjfDv1bDDE7hU6lY02K+He/ihc3KSkGER+HS308Jr7xyqm3TRx1gyBzZvslC Aoz7haFtyl+faAD0OwH3XTnWPFoF2Ah0=
Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTPSA id 6F7F41B4061 for <json@ietf.org>; Wed, 7 May 2014 14:42:08 -0700 (PDT)
Received: by mail-wi0-f179.google.com with SMTP id bs8so2109156wib.12 for <json@ietf.org>; Wed, 07 May 2014 14:42:07 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.180.160.166 with SMTP id xl6mr309789wib.42.1399498927223; Wed, 07 May 2014 14:42:07 -0700 (PDT)
Received: by 10.216.29.200 with HTTP; Wed, 7 May 2014 14:42:07 -0700 (PDT)
Date: Wed, 07 May 2014 16:42:07 -0500
Message-ID: <CAK3OfOjfr_KP+bu977CY2-8oCqO11fh_wfUDuj3LJ3JVrqCXaQ@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: "json@ietf.org" <json@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/NQ8dNAJUxD69B3xYXt4GUVaLw0s
Subject: [Json] JSON Sequence support for log files
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 07 May 2014 21:42:13 -0000

Appending to logfiles creates the need to recover from interrupted
writes (i.e., corrupted entries).  Therefore I propose the following
minor change to the JSON Sequence I-D:

a) add ASCII RS to the whitespace rule
b) RECOMMEND that logfile writers write either RS <entry> RS NL or
<entry-without-internal-newlines> NL

(producing entries with no internal newlines is trivial, as discussed
in other posts)

c) describe how to resynchronize by seeking to the next RS or NL when
a JSON text fails to parse, until a text that parses is found.

Nico
--