Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify expectations of writing a property #1146

Open
danielpeintner opened this issue May 19, 2021 · 8 comments
Open

Clarify expectations of writing a property #1146

danielpeintner opened this issue May 19, 2021 · 8 comments
Labels
Defer to TD 2.0 Has Use Case Potential The use case can be extracted and explained Needed by other TF An issue or UC from another TF to fullfill a requirement in their spec or gap Needs discussion more discussion is needed before getting to a solution Property Affordance topics about property affordance

Comments

@danielpeintner
Copy link
Contributor

I think the TD spec is currently silent about the expectation of writing properties. Many ideas are floating around

  • writing a property returns no value
  • writing a property may return a value of type DataSchema
  • writing a property may return a value different of type DataSchema (see Philips HUE, currently not describable.)
  • ...

see also w3c/wot-scripting-api#193

I think the TD spec ought to be more precise.

@danielpeintner
Copy link
Contributor Author

Not sure if the discussion in #875 is sufficient. IF so please feel free to close this issue as duplicate of #875.

@relu91
Copy link
Member

relu91 commented May 19, 2021

As I said on call I think this topic should be moved to https://github.com/w3c/wot-architecture where we are defining the WoT Interaction model. For example in this section we are listing and defining the operation types. I would go there and improve the text rather than describe it here.

@benfrancis
Copy link
Member

For example in this section we are listing and defining the operation types.

I've been looking for this table! I really think this table should be in the WoT Thing Description specification since it's not just about architecture design, it's defining the semantics of a Thing Description.

@egekorkan
Copy link
Contributor

Ah I was even about to create a PR with that table that is also in the Binding Templates spec :D Thus, +1 to the comment of @benfrancis

@zolkis
Copy link

zolkis commented May 19, 2021

As listed in comment, the TD spec/DataSchema should deal with values precision and eventually step size (it is already dealing with range), for instance this is standard for all CRUDN-capable resources used in OCF.

On a side note, perhaps it would make sense to create TDs for the standard devices listed in the OCF Device Specification, in order to test the TD spec is able to describe those. We should do the same for other protocols as well. Something that could be tested on plugfests.

Then we need use case examples on how actually the return values for writes are used in various IoT protocols. The ones I've seen in OCF:

  • just testing equality, which could be encapsulated by implementations
  • listing valid options for the interaction, for error resolution - which could be covered by the TD.

I agree the TD spec should clarify the interactions, e.g. if return values are allowed also on writes (arguably should be allowed, since I've seen a lot of swagger files specify return value on "post", all of them also specifying the structure of the return value). So the TD spec should say that a content type and/or DataSchema should be specified if the interaction returns data (it might be already the case, in general terms). But writes should be clarified specifically.

@relu91
Copy link
Member

relu91 commented May 19, 2021

For example in this section we are listing and defining the operation types.

I've been looking for this table! I really think this table should be in the WoT Thing Description specification since it's not just about architecture design, it's defining the semantics of a Thing Description.

Ah I was even about to create a PR with that table that is also in the Binding Templates spec :D Thus, +1 to the comment of @benfrancis

It seems that we had some redundant information in the wrong places 🤣 . Now I am a bit confused, I thought that the Interaction Model is an Architectural concept. Like an interface that is then serialized in a Thing Description.

@egekorkan
Copy link
Contributor

Also see https://w3c.github.io/wot-thing-description/#sec-op-data-schema-mapping. This is still not a full clarification though

@egekorkan egekorkan added the Needs discussion more discussion is needed before getting to a solution label Jun 15, 2022
@egekorkan egekorkan added Property Affordance topics about property affordance Defer to TD 2.0 labels Nov 23, 2023
@lu-zero lu-zero added the Has Use Case Potential The use case can be extracted and explained label Jan 26, 2024
@lu-zero
Copy link
Contributor

lu-zero commented Jan 26, 2024

This covers some aspects that should be part of the whole interaction affordance overhaul.

@danielpeintner danielpeintner added the Needed by other TF An issue or UC from another TF to fullfill a requirement in their spec or gap label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defer to TD 2.0 Has Use Case Potential The use case can be extracted and explained Needed by other TF An issue or UC from another TF to fullfill a requirement in their spec or gap Needs discussion more discussion is needed before getting to a solution Property Affordance topics about property affordance
Projects
None yet
Development

No branches or pull requests

6 participants