Re: [core] SenML and link-format in RDF (was: Re: Designs to resolve streaming issues in SenML)

Michael Koster <michaeljohnkoster@gmail.com> Wed, 27 January 2016 11:24 UTC

Return-Path: <michaeljohnkoster@gmail.com>
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 4C11D1A6FBE for <core@ietfa.amsl.com>; Wed, 27 Jan 2016 03:24:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.699
X-Spam-Level:
X-Spam-Status: No, score=-1.699 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, MIME_8BIT_HEADER=0.3, SPF_PASS=-0.001, WEIRD_QUOTING=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 UuV7Y2lAoSEJ for <core@ietfa.amsl.com>; Wed, 27 Jan 2016 03:24:15 -0800 (PST)
Received: from mail-pa0-x244.google.com (mail-pa0-x244.google.com [IPv6:2607:f8b0:400e:c03::244]) (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 D6C651A6FBC for <core@ietf.org>; Wed, 27 Jan 2016 03:24:14 -0800 (PST)
Received: by mail-pa0-x244.google.com with SMTP id gi1so294837pac.2 for <core@ietf.org>; Wed, 27 Jan 2016 03:24:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IgOxojI7fe7GrxO2RditCZxJqAyXzXt9TOkImAkhlZI=; b=OgK1tdEIRMaQXrxavf0JVsCXyW5jNlpNOoFkNuaSXGdgQcAtO706imutSFgOn1d6aV yeQZM09fBx6SkwXrf0Br94OfqUideYK7IEzlt+Lq2ZylcuuFd0gahAMYRu+ty30Cuslq /P9shAMJfKhxkibRjjbNoCeE8j/G/DClWyRjnmHSCymAja20GHcwuo9Yom/0WaSirI/o pnYIrw/ZkiTcKUW+OVpnI1cusXii9+IT+fPSNwLpfa8tdDKUPrKJ19BJ3fH/pRMFvLIQ wM1TscGOEDcXg9tT23lmrABxVEUygQfjoH3meGHGsF1hMhGQaVqNwTUYpL1ak/0GCnpe FPLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=IgOxojI7fe7GrxO2RditCZxJqAyXzXt9TOkImAkhlZI=; b=e0EAIRPnspJybWywcfd/R9tLTu2+fWWOOiK6mMg7gSJXLj18sVj6j5v1bQUGKKGP02 GRVAXIdH0MF0e+UrR7VEfrC6dCEBo2K2dXbO37O1zsxnXx3Pf3WZ/aUiPZ1Bc9wbHLm7 ACPuBR+5rYL+ehDN3I2s6FWu6Rcg+w7Vl845Z8CyrrGxCur+BBZysEe/Nw4u9pVJHmRk otFoITdWwcN00sJcKCWyYLe+5nclk4I7n/FVNHI4bHZrWgXqJ5WkSQQxeL6NorVrZjev XB/09Qcnpp7L6Y/3UQlmchBnO7PioBn6VF7a5LRtpUZoGzwcgZBM58PGv9gArpkH9oDr GzcQ==
X-Gm-Message-State: AG10YORByhNdOoD8IESQ/trOK70qa8lzjv39ajaAcNlq/a6QEJH/CRG2W220XWx4tjs+yw==
X-Received: by 10.66.255.97 with SMTP id ap1mr41542798pad.135.1453893854455; Wed, 27 Jan 2016 03:24:14 -0800 (PST)
Received: from [172.27.14.129] (58-97-125-4.static.asianet.co.th. [58.97.125.4]) by smtp.gmail.com with ESMTPSA id r26sm8411072pfb.21.2016.01.27.03.24.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 03:24:13 -0800 (PST)
Content-Type: text/plain; charset="iso-8859-1"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <20160127081941.GY7454@hephaistos.amsuess.com>
Date: Wed, 27 Jan 2016 18:24:10 +0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <C9B07CA3-EAE9-45B9-AA2F-8A769C782A40@gmail.com>
References: <20160118110500.GA7789@hephaistos.amsuess.com> <1B2E05E6-1FA3-4AC4-95ED-E6045B6F94E0@gmail.com> <20160118165811.GF7454@hephaistos.amsuess.com> <EDC3E5A7-1577-4E03-8376-8766A1A65064@gmail.com> <20160126120126.GD7789@hephaistos.amsuess.com> <E9C89242-C1D4-4426-B018-566FA2FC35BC@gmail.com> <20160126164036.GE7789@hephaistos.amsuess.com> <786991F1-1E38-4337-BCB8-C6D6D0E6092C@gmail.com> <20160127070519.GF7789@hephaistos.amsuess.com> <2CD6395A-0B3B-4C48-B173-14FF8A90C2F0@gmail.com> <20160127081941.GY7454@hephaistos.amsuess.com>
To: Christian Amsüss <c.amsuess@energyharvesting.at>
X-Mailer: Apple Mail (2.2104)
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/jApKUyqFjc56qad7C8XoV3-k1FU>
Cc: "Cullen Jennings (fluffy)" <fluffy@cisco.com>, core <core@ietf.org>
Subject: Re: [core] SenML and link-format in RDF (was: Re: Designs to resolve streaming issues in SenML)
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: Wed, 27 Jan 2016 11:24:16 -0000

> On Jan 27, 2016, at 3:19 PM, Christian Amsüss <c.amsuess@energyharvesting.at> wrote:
> 
> On Wed, Jan 27, 2016 at 02:32:15PM +0700, Michael Koster wrote:
>>> That, and string splitting (when it comes to parsing the "l" entries'
>>> "rt" attributes).
>> 
>> I don't see where any string splitting is needed. The "l" entries are all JSON parseable, as are the rt attribute values.
> 
> The rt and if attributes of application/link-format requires that all
> resource types assigned to a resource be stored in a single rt=""/if=""
> attribute in a space separated fashion (rfc6690 3.1, as is also the case
> for rel per rfc5988), and draft-ietf-core-links-json-04 makes no attempt
> to split those up (2.2).
> 

Oh, I see. I think this is an omission in the document. As I understand, it is the 
intention for the JSON serialization of links with multiple attribute values to use 
JSON arrays to represent those values.

I will discuss with the draft editor and confirm this.

My examples are built from JSON serializations that use array type to represent 
multiple attribute values.

> If resource types were to be used in a way they can be queried in an RDF
> context, the statements produced from <x>;if="core.s some.delayable"
> should at least contain[1]
> 
> <x> <http://thingschema.org/schema#if> <http://thingschema.org/if#core.s> .
> <x> <http://thingschema.org/schema#if> <http://thingschema.org/if#some.delayable> .
> 
> because a statement like
> 
> <x> <http://thingschema.org/schema#if> "core.s some.delayable" .
> 
> would again mean shifting the load of string parsing into the RDF
> domain, where the expectation is that reasoning can be done based on URI
> metadata and not on string parsing. (Again, the analogy of the
> relational database comes into my mind: You wouldn't want to have
> resource types you'll query for in a space-separated text field of a
> database).
> 
> Also, again drawing the parallel to RDFa, when this HTML document
> test.html is parsed as RDFa (eg. using the rapper tool that is aware of
> the registered describedby relationship)
> 
> <html prefix="demo: http://example.com/demo"><link rel="demo:next describedby unspecified" href="./next-address" /></html>
> 
> then the resulting statements are
> 
> <./test.html> <./unspecified> <./next-address> .
> <./test.html> <http://example.com/demo#next <./next-address> .
> <./test.html> <http://www.w3.org/2007/05/powder-s#describedby> <./next-address> .
> 
> 
> Best regards
> Christian
> 
> 
> [1] If it turns out that JSON-LD is unsuitable for this task anyway, as
> I have the impression which I'm trying to convey, then I'd even propose
> introducing URI CURIEs into link-format, so we have strong meaning for
> some.temperature:
> 
> <http://example.org/some/v1#>,rel="ns",curie="some";
> <x>;if="core.s some.delayable";rt="some.temperature"
> 
> would be interpreted (for a predefined meaning of core) as
> 
> <x> <http://thingschema.org/schema#if> <http://thingschema.org/core#s> .
> <x> <http://thingschema.org/schema#if> <http://example.org/some/v1#delayable> .
> 
> but details of that are for if and when it turns out that I am right
> about JSON-LD's applicability.
> 
> -- 
> Christian Amsüss                      | Energy Harvesting Solutions GmbH
> founder, system architect             | headquarter:
> mailto:c.amsuess@energyharvesting.at  | Arbeitergasse 15, A-4400 Steyr
> tel:+43-664-97-90-6-39                | http://www.energyharvesting.at/
>                                      | ATU68476614