AW: thing descriptions

Hi Dave,

I think there is some misunderstanding here. Please let me try to make my points clear.

JSON-LD is perfectly fine with me, if it fulfils the needs.

My argument is more about the actual serialization format. JSON-LD defines the syntax based on JSON and that's where I think we are looking for a "better" representation.

Let's suppose you can use an ID to define xsd:boolean for highly constrained devices. You wouldn't need the "table of strings to identifiers" anymore that seem to have caused issues in your tests.
It is the job of the serialization format to transparently map IDs to "textual" type-names and vice-versa.

Hope these clarifies what I tried to say.

Thanks,

-- Daniel





________________________________

Von: Dave Raggett [dsr@w3.org]
Gesendet: Montag, 20. Juli 2015 12:11
An: Peintner, Daniel (ext)
Cc: Kaebisch, Sebastian; public-wot-ig@w3.org
Betreff: Re: thing descriptions


On 20 Jul 2015, at 11:05, Peintner, Daniel (ext) <daniel.peintner.ext@siemens.com<mailto:daniel.peintner.ext@siemens.com>> wrote:

Hi Dave, Sebastian, all,

I agree it is desirable for restricted devices to provide "shortcuts" for constrained devices. That said, I don't think we should allow “boolean” instead of “xsd:boolean" neither “uint32” instead of “xsd:unsignedInt”.

Please let me state the reasons.

First of all, introducing new names may shorten the message but on the other hand they also introduce more complexity. What if I still want to use “xsd:unsignedInt”? Is this forbidden, allowed, acceptable?

This sounds like a cultural issue, you are likely to find that web developers and embedded hardware hackers don’t agree with you. For highly constrained devices (i.e. very cheap devices) it is reasonable to limit the range of data types supported.


Second, if it is about message size, reducing the stream by some bytes only tackles the issue just half way.

Third, if we want facilitating highly resource constrained devices being part of the system we might consider using identifiers instead of strings. It is not only shorter but in addition it is also easy to switch according to identifiers compared to do string comparisons.

I have indeed explored this, but note that even that table of strings to identifiers is an issue as this takes significant space. My code discards the table as quickly as possible.


Fourth, I believe we should consider existing techniques offering those afore mentioned "shortcuts" for constrained devices instead of inventing it from scratch. One solution could be W3Cs EXI format but there could be more relevant techniques…

The JSON-LD specification already covers a lot of what we need.

—
   Dave Raggett <dsr@w3.org<mailto:dsr@w3.org>>

Received on Monday, 20 July 2015 14:28:14 UTC