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

Example TD and declarative protocol binding illustration - closes #90 #91

Closed
wants to merge 5 commits into from

Conversation

benfrancis
Copy link
Member

@benfrancis benfrancis commented Jul 21, 2021

This is an example Thing Description and corresponding declarative protocol binding to help illustrate the Core Profile Protocol Binding, as suggested in #90.


Preview | Diff


Preview | Diff

@mlagally
Copy link
Contributor

mlagally commented Aug 2, 2021

@benfrancis
It is very useful to have a complete TD example, I think we have to discuss if we really need two examples.
The canonical form could be the single format we chose as the normative representation format for profile compliant TDs.

@benfrancis
Copy link
Member Author

@mlagally Please see #90 for an explanation for the purpose of the two different examples and why both are needed. You indicated in #81 (comment) that you agreed with this general approach.

@benfrancis benfrancis marked this pull request as ready for review November 3, 2021 17:05
@benfrancis benfrancis changed the title Example TD and canonical TD for Core Profile - closes #90 Example TD and declarative protocol binding illustration - closes #90 Nov 3, 2021
@benfrancis
Copy link
Member Author

I think this is pretty much complete now and ready for review.

To recap, there are two example Thing Descriptions in this PR.

The first Thing Description is provided at the start of the Core Profile Protocol Binding section and provides an example TD for the Web Thing which is used in all the examples in the protocol binding specification text. This Thing Description is in the concise form that a Web Thing conforming to the Core Profile is able to use due to all the defaults and assumptions implied by setting the profile member of the TD to the Core Profile URI.

The second example is an illustration of what that Thing Description would look like if the full protocol binding was instead provided declaratively in the Thing Description, without all of the defaults and assumptions implied by the profile member.

The idea is to provide a concise Thing Description at the start to demonstrate what a conforming Web Thing would actually use in order to benefit from all of the defaults and assumptions, then an expanded form at the end which demonstrates what it would look like with all of those defaults and assumptions made explicit rather than being implied by the profile member.


Some open points for discussion around the second (expanded) example:

  1. There's not really a way to provide a declarative schema for the payload of the readallproperties and writeallproperties operations. In the Thing Description specification it says that these would be a map of all the properties, keyed by property name, but there's not really a way to show that explicitly as far as I can tell.
  2. The expanded example provides a schema member in ExpectedResponse objects, which is not currently included in the Thing Description specification but I'm expecting it to be added. There are many parts of the protocol binding which can't be described declaratively without this.
  3. The expanded example does not include all the possible error conditions. There are many possible error codes and it gets quite unweildy to list every possible error in every form. Is there a more concise way of expressing this?

@benfrancis
Copy link
Member Author

I've updated the PR to move the second example (the declarative protocol binding example) to an appendix, since it is only an informative example to illustrate the benefits of the profiling mechanism and is not required for implementation. I've also improved the descriptions of the two examples because I wasn't happy with the wording.

@mlagally
Copy link
Contributor

@benfrancis Please resolve the merge conflict.

@benfrancis
Copy link
Member Author

I've resolved the merge conflict, but these examples will require a re-think if #188 lands because events will be split out into a separate profile.

@benfrancis
Copy link
Member Author

Replaced by #195

@benfrancis benfrancis closed this Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants