Re: [core] SenML JSON syntax (with multiple base objects)

Carsten Bormann <cabo@tzi.org> Tue, 27 October 2015 08:15 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 935031B37D4 for <core@ietfa.amsl.com>; Tue, 27 Oct 2015 01:15:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.549
X-Spam-Level:
X-Spam-Status: No, score=-1.549 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, HTML_MESSAGE=0.001] 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 TZH77KOhfWLX for <core@ietfa.amsl.com>; Tue, 27 Oct 2015 01:15:25 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (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 B9BBD1B37CC for <core@ietf.org>; Tue, 27 Oct 2015 01:15:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [134.102.201.11]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id t9R8FGQo005694; Tue, 27 Oct 2015 09:15:17 +0100 (CET)
Received: from nar.local (93-63-151-242.ip28.fastwebnet.it [93.63.151.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3nlQnW5qxnz2D8S; Tue, 27 Oct 2015 09:15:07 +0100 (CET)
Date: Tue, 27 Oct 2015 09:12:55 +0100
From: Carsten Bormann <cabo@tzi.org>
To: Cullen Jennings <fluffy@iii.ca>, core <core@ietf.org>
Message-ID: <etPan.562f3207.2001ece.168ed@nar.local>
In-Reply-To: <3CEB5B46-504F-4F4C-B3B8-294625FAF6EA@iii.ca>
References: <58C4BBDD-895C-4946-983A-405C6E5B760D@ericsson.com> <DAFB7C72-CF08-438E-B681-10918717A5D5@gmail.com> <20151020184630.GI5451@hephaistos.amsuess.com> <956423E0-BA70-4F4F-B0CD-6423203BC2BD@gmail.com> <3CEB5B46-504F-4F4C-B3B8-294625FAF6EA@iii.ca>
X-Mailer: Airmail (329)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="562f3207_1db19386_168ed"
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/eS5DV0Z1XE8UB-zpOEYOzeuhWks>
Cc: "draft-jennings-core-senml@tools.ietf.org" <draft-jennings-core-senml@tools.ietf.org>, Christian Amsüss <c.amsuess@energyharvesting.at>
Subject: Re: [core] SenML JSON syntax (with multiple base objects)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Oct 2015 08:15:29 -0000
X-List-Received-Date: Tue, 27 Oct 2015 08:15:29 -0000

Maps (JSON objects) are not fully compatible with streaming processing — you don’t know in which order the map elements will arrive.
So this is OK if the assumption is that each element of the top level array will be fully ingested before acting on it.
(Yes, we already have this problem with the other metadata in the measurements objects.)

I still like the two-level structure*) that we have been discussing, as it allows processing the elements of the measurements arrays knowing there is no serial dependency between their entries.  Might *look* more complicated, but actually is simpler, because the code can focus positionally on either processing base information or on processing measurements.

Grüße, Carsten

*) as in [+(base, [+measurement])]
On 27 October 2015 at 07:06:56, Cullen Jennings (fluffy@iii.ca) wrote:

If a base name is found in the the object, it applies to all the values in that object