Re: [core] Designs to resolve streaming issues in SenML
Michael Koster <michaeljohnkoster@gmail.com> Tue, 26 January 2016 13:28 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 A74011A89F0 for <core@ietfa.amsl.com>; Tue, 26 Jan 2016 05:28:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.099
X-Spam-Level:
X-Spam-Status: No, score=-1.099 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, HTML_MESSAGE=0.001, J_CHICKENPOX_44=0.6, MIME_8BIT_HEADER=0.3, SPF_PASS=-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 4dtaEclyE_jw for <core@ietfa.amsl.com>; Tue, 26 Jan 2016 05:28:36 -0800 (PST)
Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (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 27CD11A89D3 for <core@ietf.org>; Tue, 26 Jan 2016 05:28:36 -0800 (PST)
Received: by mail-pa0-x232.google.com with SMTP id ho8so97605446pac.2 for <core@ietf.org>; Tue, 26 Jan 2016 05:28:36 -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 :message-id:references:to; bh=cvicYIEp7qGL7AJ9fk6R72/nthKjVeqKLZeymCRLOKE=; b=ekeLedAASLOvSNOt2Of9ThWVReyiBx/RWUUzohVKJRODqIaSxB4eQUxV+EDhwt2Mbm EnBPC6ZhbWSlrA1lf0oeP9FE+keznBz9eFV9ZO+D64eomJI1EB/Z3kkwwRsVDdNj6buO NKNwFLTMyjukvT4lshMqFZxxqIFzcf5sodpdG0zIw1/1AW15UWW+rL3nrNDJOGtE6dM5 ZXn1SpqUOzs6FMxEYAPi3Mv9OSBtrGQITzfutQU51EoyjcN1Y5Bb3zscBN5hGSz1wU1L yhZMPzEhdenoIn87qfQDh4pKh9NnfSoSq0PAs22SO1/LnxzFUWaY22zxiGLaA71CbxBi vVHQ==
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:message-id:references:to; bh=cvicYIEp7qGL7AJ9fk6R72/nthKjVeqKLZeymCRLOKE=; b=McpWPQiM4X5e9sZhN5nb/IAEnlqi2AUselbE2ntPZL1hoNt5tROkZkOYseuxlTSNQq T5Be+a511OWiXFnzuE1uVyR/YsFC0hqpFhlRrgDqLQXPRNMQ64hZqF0sCM98LgHt09A4 Y06wA0wZq0Bvc/ufIrvE6zK3Ey/oE7SvbdazIaPpcCX88TEkkvPdW7yLrlTr/qwWdvXX Q2sUJ+rGnKSMWCKUU8unoZ+qW8kqADPYGKQoWbGpUEGGn1yc7YK8sJr9ujPl0Dz0S5zi UxuXCph6vXGNiYXtaCGu+470ijcxS81kOvQpKU5rBrn/S1aU/kNTKpZ85AjDy88sLVBN iN7Q==
X-Gm-Message-State: AG10YORy6tHGl4L4hxIJJu5+XkkU21j/PTq9C10TqOqXIExMIqqg7DlNjMnyJe76+xUjpQ==
X-Received: by 10.66.119.71 with SMTP id ks7mr7703088pab.151.1453814915755; Tue, 26 Jan 2016 05:28:35 -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 v86sm1973527pfa.83.2016.01.26.05.28.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jan 2016 05:28:34 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_C7CC2C72-C742-40EC-90B3-7C5840EB5353"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <20160126120126.GD7789@hephaistos.amsuess.com>
Date: Tue, 26 Jan 2016 20:28:31 +0700
Message-Id: <E9C89242-C1D4-4426-B018-566FA2FC35BC@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>
To: Christian Amsüss <c.amsuess@energyharvesting.at>
X-Mailer: Apple Mail (2.2104)
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/I4ROb611-ECzjmL_0UGZFCFVtOU>
Cc: "Cullen Jennings (fluffy)" <fluffy@cisco.com>, core <core@ietf.org>
Subject: Re: [core] 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: Tue, 26 Jan 2016 13:28:39 -0000
Hi Christian, I'm not sure how you expect the document conversion to work, but I used a JSON-LD context to transform a SenML-draft-01 format file to semantic triples in Nquads using the processor at http://json-ld.org/playground/ <http://json-ld.org/playground/> . The JSON-LD is simply the SenML file with the @context statement inserted after the opening bracket. The SenML is a representation of an IPSO Smart Object: { "@context" : "http://thingschema.org", "bn":"/3303/1/", "i":[ {"n":"5700","v":"31.3","u":"Cel"}, {"n":"5701","sv":"Cel"}, {"n":"5602","v":"87.1","u":"Cel"}, {"n":"5601","v":"18.3","u":"Cel"}, {"n":"5605"}, {"n":"5603","v":"0","u":"Cel"}, {"n":"5604","v":"260","u":"Cel"}, {"n":"5750","sv":"Inboard Bearing"} ], "l":[ {"href":"","rel":"self","rt":"temperature","u":"Cel"}, {"href":"5700","rt":"currentValue","u":"Cel"}, {"href":"5701","rt":"units"}, {"href":"5602","rt":"maxValue","u":"Cel"}, {"href":"5601","rt":"minValue","u":"Cel"}, {"href":"5605","rt":"resetMaxMin"}, {"href":"5603","rt":"minRange","u":"Cel"}, {"href":"5604","rt":"maxRange","u":"Cel"}, {"href":"5750","rt":"appType"} ] } And here are semantic triples generated from the SenML, having used http://json-ld.org/playground/ <http://json-ld.org/playground/> to process the elements into RDF subjects, properties, and values and serialize into N-quads. _:b0 <http://thingschema.org/schema#baseName> "/3303/1/" . _:b0 <http://thingschema.org/schema#hasItem> _:b1 . _:b0 <http://thingschema.org/schema#hasItem> _:b2 . _:b0 <http://thingschema.org/schema#hasItem> _:b3 . _:b0 <http://thingschema.org/schema#hasItem> _:b4 . _:b0 <http://thingschema.org/schema#hasItem> _:b5 . _:b0 <http://thingschema.org/schema#hasItem> _:b6 . _:b0 <http://thingschema.org/schema#hasItem> _:b7 . _:b0 <http://thingschema.org/schema#hasItem> _:b8 . _:b0 <http://thingschema.org/schema#hasLink> _:b10 . _:b0 <http://thingschema.org/schema#hasLink> _:b11 . _:b0 <http://thingschema.org/schema#hasLink> _:b12 . _:b0 <http://thingschema.org/schema#hasLink> _:b13 . _:b0 <http://thingschema.org/schema#hasLink> _:b14 . _:b0 <http://thingschema.org/schema#hasLink> _:b15 . _:b0 <http://thingschema.org/schema#hasLink> _:b16 . _:b0 <http://thingschema.org/schema#hasLink> _:b17 . _:b0 <http://thingschema.org/schema#hasLink> _:b9 . _:b1 <http://thingschema.org/schema#resourceName> "5700" . _:b1 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b1 <http://thingschema.org/schema#value> "31.3" . _:b10 <http://thingschema.org/schema#href> "5700" . _:b10 <http://thingschema.org/schema#resourceType> "currentValue" . _:b10 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b11 <http://thingschema.org/schema#href> "5701" . _:b11 <http://thingschema.org/schema#resourceType> "units" . _:b12 <http://thingschema.org/schema#href> "5602" . _:b12 <http://thingschema.org/schema#resourceType> "maxValue" . _:b12 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b13 <http://thingschema.org/schema#href> "5601" . _:b13 <http://thingschema.org/schema#resourceType> "minValue" . _:b13 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b14 <http://thingschema.org/schema#href> "5605" . _:b14 <http://thingschema.org/schema#resourceType> "resetMaxMin" . _:b15 <http://thingschema.org/schema#href> "5603" . _:b15 <http://thingschema.org/schema#resourceType> "minRange" . _:b15 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b16 <http://thingschema.org/schema#href> "5604" . _:b16 <http://thingschema.org/schema#resourceType> "maxRange" . _:b16 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b17 <http://thingschema.org/schema#href> "5750" . _:b17 <http://thingschema.org/schema#resourceType> "appType" . _:b2 <http://thingschema.org/schema#resourceName> "5701" . _:b2 <http://thingschema.org/sv> "Cel" . _:b3 <http://thingschema.org/schema#resourceName> "5602" . _:b3 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b3 <http://thingschema.org/schema#value> "87.1" . _:b4 <http://thingschema.org/schema#resourceName> "5601" . _:b4 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b4 <http://thingschema.org/schema#value> "18.3" . _:b5 <http://thingschema.org/schema#resourceName> "5605" . _:b6 <http://thingschema.org/schema#resourceName> "5603" . _:b6 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b6 <http://thingschema.org/schema#value> "0" . _:b7 <http://thingschema.org/schema#resourceName> "5604" . _:b7 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . _:b7 <http://thingschema.org/schema#value> "260" . _:b8 <http://thingschema.org/schema#resourceName> "5750" . _:b8 <http://thingschema.org/sv> "Inboard Bearing" . _:b9 <http://thingschema.org/rel> "self" . _:b9 <http://thingschema.org/schema#href> "" . _:b9 <http://thingschema.org/schema#resourceType> "temperature" . _:b9 <http://thingschema.org/schema#unitsOfMeasure> "Cel" . I think this result is quite useful to be able to use the information in the context of fully qualified references and nodes of triples that describe the original SenML. Best regards, Michael > On Jan 26, 2016, at 7:01 PM, Christian Amsüss <c.amsuess@energyharvesting.at> wrote: > > On Mon, Jan 18, 2016 at 09:30:47AM -0800, Michael Koster wrote: >> “bn": {"@id": “some:baseURI", "@type": "@id"} >> “n": {"@id": “some:baseURI", "@type": "@id”} > > I think that this is one point where any of the existing SenML drafts > fail to produce meaningful statements for arbitrary SenML documents; > with a context as sketched above, the bn would be ignored completely, > and the value of the event's n would be a concatenation of the document > URI and the n. > > After processing this into RDF, there wouldn't even be enough > information left to post-process bn into the names even if that were > somehow more practical than pre-processing the JSON. > > Unless we go full JSON-LD by changing "bn" into "@base" in some way, or > JSON-LD is extended to allow something like {"@base":{"@query": > "[0].bn"}} (like xpath for json, no idea if something exists or is > feasible), I don't see how we can have the semantics of SenML > transformed into RDF by JSON-LD. > > We could probably describe a subset of SenML that works for a specific > context (for example by completely ruling out bn), but how useful would > that be out in the wild? > > (Similar issues exist with the whitespace separated fields in the rt > field in link-format. draft-ietf-core-links-json-04 mentions JSON-LD, > but at the same time makes "[n]o attempt [...] to decode the possibly > space-separated values for rt=" -- as long as neither links-json nor > JSON-LD deals with string splitting, we can't have JSON-LD parsing for > generic link-format). > > > To compare this to RDFa which could probably work with the XML > serialization as JSON-LD could work with the JSON one: To have support > for the HTML base element, RDFa had to specify (X)HTML+RDFa as a "host > language" to cover the base tag -- which basically means that whatever > processes HTML+RDFa needs to do preprocessing. > > Unless those issues can be managed in any way, I don't see much point in > engineering the SenML standard towards JSON-LD convertibility. How do > you overcome them in your own applications? > > Best regards > Christian > > -- > 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
- Re: [core] Designs to resolve streaming issues in… Carsten Bormann
- [core] Designs to resolve streaming issues in Sen… Cullen Jennings (fluffy)
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Carsten Bormann
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Carsten Bormann
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Carsten Bormann
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- Re: [core] Designs to resolve streaming issues in… Cullen Jennings (fluffy)
- Re: [core] Designs to resolve streaming issues in… Cullen Jennings (fluffy)
- [core] privacy issues (was: Re: Designs to resolv… Stephen Farrell
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Carsten Bormann
- Re: [core] Designs to resolve streaming issues in… Christian Amsüss
- Re: [core] Designs to resolve streaming issues in… Michael Koster
- [core] SenML and link-format in RDF (was: Re: Des… Christian Amsüss
- Re: [core] SenML and link-format in RDF (was: Re:… Michael Koster
- Re: [core] SenML and link-format in RDF (was: Re:… Christian Amsüss
- Re: [core] SenML and link-format in RDF (was: Re:… Michael Koster
- Re: [core] SenML and link-format in RDF (was: Re:… Christian Amsüss
- Re: [core] SenML and link-format in RDF (was: Re:… Michael Koster
- Re: [core] SenML and link-format in RDF (was: Re:… Michael Koster
- Re: [core] SenML and link-format in RDF Carsten Bormann
- Re: [core] SenML and link-format in RDF (was: Re:… Michael Koster