-
Notifications
You must be signed in to change notification settings - Fork 17
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
Specify Consumer Discovery Process #274
Conversation
So, several points to discuss in our next meeting:
|
We MAY want to be more particular about what it means for a Consumer to "support Discovery". In particular I waffled a lot about whether requiring the ability to read a TD from an HTTP URL should be included, but it seemed overly exclusive. CoAP consumers (without an HTTP client) may not be able to read from a Directory (which only has an HTTP API), but can do other things, such as use .well-known. I have an ed note about that. |
To be clear, Architecture only has the following assertion at this point, which makes Discovery optional:
So Discovery is NOT mandatory for all Consumers. |
@k-toumura makes a good point (see issue #272): the D-Consumer may not be a Consumer. There are clients, like Toumura's Node-RED implementation, that may use Discovery but not itself be a Consumer. So we need another term. I want to avoid "Discoverer" (we have used it for something else) so maybe "Discovery Client" (D-Client for short). |
@k-toumura I made some changes to the PR to address your point. I add an additional definition, "Discovering Client" or "D-Client", defined as "A client that supports Discovery". I still have Discoverying Consumers (D-Consumers), but these are a subclass of D-Clients that can also interact with the affordances exposed by a TD etc. There is some overlap: a D-Client does need to interpret certain parts of TDs, e.g. the @type (to figure out if it is a Directory or Thing Link) and also it needs to extract the URL from the form of the "listing" affordance in Directories. It may also need to interpret some of the security information provided by Directory TDs. But it's true it's not a "full" Consumer. But a D-Consumer is always a D-Client. I have rewritten all the assertionts to apply to D-Clients. |
index.html
Outdated
than at the exact URL provided by the Introduction. Sets allows for single URLs to expand | ||
into multiple Thing Descriptions without needing to use a Thing Description Directory. | ||
Such sets are only appropriate for small static lists of Thing Descriptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is leftover text in the Arch intro that I need to delete still. See comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see updated version. I believe I have resolved this now.
index.html
Outdated
</ul> | ||
</section> | ||
<section id="consumer-process" class="normative"> | ||
<h1>Discovering Clients and Consumers</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest keeping this under chapter 4. Architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will consider. The intention is that Architecture is a general overview, this is about clients, then we have introductions and exploration services. I think personally that detailed discussion of client and server features should be at the same level.
BTW the text under "Architecture" needs revision and I will update it soon. What's there is just a copy of what I had in the Thing Link PR and is not 100% appropriate. The diagram was updated to remove the Thing Link but maybe I should not have, since we DO need to resolve them, but only "describedby" relations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not moved, but I have changed the name
A D-Client MUST support fetching a TD from least one URL provided as part of the Introduction process.</span> | ||
In other words, not only must a D-Client accept URLs pointing at TDs, it must be | ||
able to fetch that TD, for example by using a GET for an HTTP URL or by reading it from a file | ||
specified by way of a file URL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specified by way of a file URL. | |
specified by way of a file URI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking of removing mention of file URLs/URIs completely and pointing out (see below) that Consumers that just read TDs from files are fine and ok, but should not be considered as implementing Discovery. Maybe I should also explicitly allow D-Consumers to ALSO allow reading of additional TDs from files and include them in the "Discovery" set... File URIs are a pain in the neck anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File URI/URL might come to play when you have TDs that are referring to other TDs. Taking again the TD resulting for the composition process, if you are developing that locally you'll probably reference sub-parts using file URLs (since you have to put an URL in the href
of links). However, most of the time these URLs will be relative so it might not really be a useful use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought I fixed this, let me checked (won't merge suggesting in case it screws up my other commits... but will take into account in my edits)
Things noted during Discovery mtg:
|
index.html
Outdated
We will use the term <a>D-Consumer</a> to refer to a WoT Consumer supporting WoT Discovery, | ||
and D-Client as a more general term relating to any client supporting WoT Discovery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distinction between the two terms is not clear. I'm really not sure we need the two terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls read Toumura's comments, which I was trying to address. The other path we could take is calling things like Node-RED plugins scanning for TDs Consumers. They are, after all, able to do at least minimal interpretation of TDs and need to call specific affordances (listing) on Directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 cents: probably having these two terms would help describe the discovery process in the Scripting API. We can use the term D-Client to indicate Servients runtimes that support the discovery and the D-Consumer to applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components of a system can be named arbitrarily. I can argue that I need a Discovery Parser which parses the TD object only. I can also argue that a TD is too large to pass around and should be transported and consumed incrementally (we have assertions for these).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the problem is that "Discoverer" sounds like "an entity capable of doing Discovery" which is not, however, its definition. We could
- Use "Discoverer" rather than "D-Consumer" and "D-Client" and use another term for the current meaning (e.g. "Registerer")
- Leave it as is.
- Get rid of D-Client (since formally, since D-Clients need to process TDs, they are in fact D-Consumers). However, definition of Consumer implies interactions with Things, including endpoint Things (not just directories, so @k-toumura would prefer different terms).
Consensus: do 1, and also use this to resolve 3 (say a Discoverer MAY be a Consumer, but not necessarily).
index.html
Outdated
<li><span class="rfc2119-assertion" id="consumer-fetch-links">A D-Client MAY fetch source TDs from the targets of the links in a Thing Link | ||
described in its initial set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from a Thing Link to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> | ||
<li><span class="rfc2119-assertion" id="consumer-fetch-iteration">A D-Client MAY fetch additional TDs iteratively from any Thing Link or | ||
Exploration mechanism described in its set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from a Thing Link to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the second assertion referring to processing of nested links in TDs extracted from Thing Links? It is not very clear. There is another assertion two items below saying the same thing clearly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some cut-and-paste errors here. Will try to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @farshidtz it can be improved.
index.html
Outdated
The above process supports a simple way to let Directories reference other Directories without duplicating their TDs: | ||
a Directory wanting to reference other Directories should include a Thing Link with a "describedby" relation to the | ||
TD of the other Directory service. Then the above process would expand the Thing Link to obtain the actual TD of the Directory, | ||
and then (optionally) use the appropriate Directory affordance to access the contents of the linked Directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some points:
- Referencing a large TD is one of the documented use cases for Thing Link, but the TD of a directory isn't always large.
- As mentioned in Add a Directory to a Directory #271 (comment), the directories aren't always self-describing, so the TD of a directory may not be available anywhere other than in the master directory.
- The process via Thing Link is only possible if all those self-describing things have their TD available to the consumer. There could networking limitations and other security requirements making them less practical in most production settings. So recommending their use for federated directory linking may not be appropriate.
- This often means an external reference, which is not suggested for consumers in another assertion above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I now have assertions saying external references do not have to be followed; indeed, dereferencing external links is a privacy risk
- I added a little text clarifying (I hope) that directories do not need to be self-describing, but will scan for other places where this might be implied
- More comments after I read the discussion in the above issue...
Fixed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added several inline comments.
I also suggest moving the Thing Link and Thing Directory type definitions along with the ontology from 6. Exploration Mechanisms to somewhere under chapter 4. Architecture, because there are now forward referenced.
Introductions, Exploration, Directories etc. are mentioned in Architecture so that would be a good place to formally introduce these terms. We could also put formal definitions into Terminology. I definitely do need to talk about them in Clients. I also talk about the specific I could also just introduce an explicit forward reference (e.g. "defined in Section xxx") for |
Some of the use cases for Thing Links (mentioned down much farther in the text) are bugging me. I don't want to touch that part of the spec with this PR as it would cause conflicts, but at some point let's review those use cases. |
That's also okay. But those types don't currently have a section for themselves that are directly refencable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to give my point of view about the current status which is already fine. Some additional points:
- a D-Client may fail to fetch some of the discovered URLs, should it abort the process or continue? is it the process still successful or not?
- I would also mention the fact that D-Client will probably need some "credential bootstrapping" to access TDs hosted at particular URLs. How should a D-Client behave if a fetch operation fails due to an
Unauthorized
response?
index.html
Outdated
We will use the term <a>D-Consumer</a> to refer to a WoT Consumer supporting WoT Discovery, | ||
and D-Client as a more general term relating to any client supporting WoT Discovery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 cents: probably having these two terms would help describe the discovery process in the Scripting API. We can use the term D-Client to indicate Servients runtimes that support the discovery and the D-Consumer to applications.
index.html
Outdated
multiple TD links. | ||
This is why in the following we allow any protocol to be used, even though | ||
our Directory exploration mechanisms require HTTP. | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly agree with this ed note, will this stay thereafter publication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I misread this at first as "disagree"; but you actually "agree" with "not limiting to HTTP". But as discussed below, I think limiting Discovery to HTTP will make things more interoperable. I can see both sides, but I think dealing with CoAP/CBOR etc. right now is not entirely feasible.
index.html
Outdated
As described in section <a href="#architecture"></a>, WoT Discovery has two phases, Introduction | ||
and Exploration. In the following sections we will give details on various Introduction and Exploration | ||
mechanisms. | ||
However, <em>all</em> Introduction mechanisms result one or more URLs which can be used to fetch TDs by | ||
a D-Client. | ||
Some of these TDs, however, may link to | ||
TDs stored elsewhere (Thing Links) or describe web services that manage sets of TDs (Thing Description Directories, or TDDs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to read text.
As described in section <a href="#architecture"></a>, WoT Discovery has two phases, Introduction | |
and Exploration. In the following sections we will give details on various Introduction and Exploration | |
mechanisms. | |
However, <em>all</em> Introduction mechanisms result one or more URLs which can be used to fetch TDs by | |
a D-Client. | |
Some of these TDs, however, may link to | |
TDs stored elsewhere (Thing Links) or describe web services that manage sets of TDs (Thing Description Directories, or TDDs). | |
As described in section <a href="#architecture"></a>, WoT Discovery has two phases, Introduction | |
and Exploration. In the following sections we will give details on various Introduction and Exploration | |
mechanisms. | |
Remember that <em>all</em> Introduction mechanisms result in one or more URLs that can be used to fetch TDs by a D-Client. Moreover, some of these TDs, may link to TDs stored elsewhere ( via Thing Links) or describe web services that manage sets of TDs (Thing Description Directories, or TDDs). |
Or something similar. In particular, the sentence "However, all Introduction mechanisms feels disconnected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point noted, and will try to incorporate your changes, but I already merged another change from Farshid already here so can't apply your patch without some edits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally reorganized this part to try and make things flow better
index.html
Outdated
As described in section <a href="#architecture"></a>, WoT Discovery has two phases, Introduction | ||
and Exploration. In the following sections we will give details on various Introduction and Exploration | ||
mechanisms. | ||
However, <em>all</em> Introduction mechanisms result one or more URLs which can be used to fetch TDs by | ||
a D-Client. | ||
Some of these TDs, however, may link to | ||
TDs stored elsewhere (Thing Links) or describe web services that manage sets of TDs (Thing Description Directories, or TDDs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Thing Description Directories, or TDDs).
Isn't the acronym defined somewhere else? I think a reference should be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to look at the order of the text. Generally I want to expand acronyms on first use, but I'm not sure if this is the first use or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think I will leave this for now, then we need another pass to clean up terminology. I also use "Directory" in a lot of places where I should probably be using TDD.
index.html
Outdated
A D-Client MUST support at least one Introduction mechanism.</span> | ||
The simplest Introduction mechanism, Direct, simply provides a single URL of a target TD. | ||
This assertion results in different minimal requirements depending on | ||
which Introduction mechanism is selected out of the several available. | ||
For example, when Direct is used as the sole Introduction mechanism, | ||
at a minimum a D-Client must be able to accept a single URL pointing at a TD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a consequence of the editor's note above, we don't have any requirements for the URL scheme. Is a D-Client able to fetch TDs only from ftp
URLs compliant? or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Discovery spec should specify the minimum requirements for D-Clients. It's already pretty loose ("any one Introduction") but we had a similar discussion with the Profile group about forcing clients to support HTTP. A more realistic example than ftp is a Client that only supports CoAP. Can it follow CoAP links to get TDs? Yes, it won't work for Directories, but what about direct peer-to-peer access?
Let's discuss today. Directories though need to be specifically for HTTP, so any use cases that need to use Directories won't work for other protocols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pros of requiring HTTP: Discovery is more interoperable, avoiding fragmentation into different verticals supporting different protocols.
Cons: only relatively powerful clients can implement HTTP (although to be honest, any client that can parse a TD can probably implement HTTP without too much trouble, even if they use other protocols for other things).
So a Consumer only support CoAP would not be a Discoverer according to this spec. CoAP also tends to go along with CBOR but we don't formally define that for TDs...
index.html
Outdated
Note that even if only one Introduction mechanism is supported multiple results might be | ||
produced. This assertion states that the overall output of the Introduction phase is | ||
a single set of URLs. | ||
The word "set" is used here in the mathematical sense: the results are unordered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mathematically speaking the results should be also unique. In principle, this would imply what is asserted above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... true, duplicate removal is also implied by "set". I think that is ok and what we want, but maybe it could be emphasized here. I still think I want to explicitly state duplicate removal in an assertion and not depend on the mathematical definition of "set".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added "unordered and unique"
index.html
Outdated
<li><span class="rfc2119-assertion" id="consumer-fetch-links">A D-Client MAY fetch source TDs from the targets of the links in a Thing Link | ||
described in its initial set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from a Thing Link to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new results do not delete the original TD describing the Exploration mechanism.
Is a ThinkLink an exploration mechanism or is this a copy&paste artifact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should change "original TD describing the Exploration mechanism" to "TD describing the Thing Link". We could also delete them when resolved but I'm worried about extra metadata being carried along in Thing Links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy-and-paste issue. Cleaned up in revision.
index.html
Outdated
<li><span class="rfc2119-assertion" id="consumer-fetch-links">A D-Client MAY fetch source TDs from the targets of the links in a Thing Link | ||
described in its initial set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from a Thing Link to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> | ||
<li><span class="rfc2119-assertion" id="consumer-fetch-iteration">A D-Client MAY fetch additional TDs iteratively from any Thing Link or | ||
Exploration mechanism described in its set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from a Thing Link to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @farshidtz it can be improved.
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> | ||
<li><span class="rfc2119-assertion" id="consumer-termination">A D-Client MAY terminate fetching additional TDs at any point or for | ||
any reason.</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have something that distinguishes a successful terminated discovery process from something that is not. Otherwise, D-Consumers will never be sure that what they got from the D-Client is really complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we CAN define termination since in theory a set of results could point out into the open web and have a recursive set of links that pull in more and more results. I think the application just has to decide when to stop in such cases. There will, however, be cases when there are no more links to resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have a specific assertion that lets a Discoverer stop for any reason (for instance, they could simply have hit a time limit or a memory limit). This will make discovery a bit inconsistent between implementations, but it would be anyway given the other variations allowed (e.g. types of intros).
index.html
Outdated
The D-Client can fetch additional TDs in any order from any Exploration mechanism and is not | ||
required to use all of them. | ||
</li> | ||
<li><span class="rfc2119-assertion" id="consumer-track">A D-Client MUST track (by id) which TDs describing links or Exploration mechanisms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is id
mandatory for ThingLinks and ThingDirectories? cause, if my mind is not failing me, it is not for generic TDs. For TMs loop cycle detection we are using the href
of links as an ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, good point. A Thing Link or a Thing Directory without an id would be a pain. I guess we could add "or href, if no id is available".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to just say that loops should be detected, not how. Could also use full-result hashes, but I think this is an implementation decision, not a requirement.
The WoT discovery process is designed using a two-phase approach. | ||
In the first phase, one or more of a set of "Introduction" mechanisms may be used to | ||
generate a set of candidate URLs. These URLs do not themselves contain metadata, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the process of discovering a single Thing? Why more than one Intro mechanism is used? How do the clients decide between the candidate URLs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WoT Discovery gives back a set of TDs. The application then needs to decide what to do with them (Consume them all, pick one and Consume it, etc). We do not define what clients do with the results of Discovery, just the Discovery process itself.
Note that the discovery process can produce a <em>set</em> of URLs following | ||
its Introduction phase, even if only one Introduction mechanism is used, | ||
and the final output after the Exploration phase | ||
can be a <em>set</em> of Thing Descriptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as last comment. If the process is to discover one Thing, why is there a "set of URLs" after Intro, even if only one mechanism is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some Intro mechanisms can return multiple results (CoreRD, DID, DNS-SD, etc). Will discuss today.
index.html
Outdated
are only available to clients that support this protocol. However, use of HTTP (and Directories) | ||
is not in fact a requirement of the WoT Discovery process: it is possible to discover multiple | ||
TDs using just Introduction mechanisms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the TD is part of exploration. That is possible with or without a directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, true. Wording needs some tweaking. Should say "without using Directories".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded in update
index.html
Outdated
We will use the term <a>D-Consumer</a> to refer to a WoT Consumer supporting WoT Discovery, | ||
and D-Client as a more general term relating to any client supporting WoT Discovery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components of a system can be named arbitrarily. I can argue that I need a Discovery Parser which parses the TD object only. I can also argue that a TD is too large to pass around and should be transported and consumed incrementally (we have assertions for these).
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
To do |
I think the last use case is not really "describedby" but "extends" or similar. I propose we remove it: A device intends to publish an entire TD which contains private and public parts: publish one TD (Thing Link) with only the public information referencing another TD which contains the full description. Comment from Farshid: "Not having extra metadata" should not be a consequence of ThingLink itself, but of the describedby relation." McCool: think it is cleaner if ThingLink does one thing. Private/public decisions are an access control policy, and should be decided when the TD itself is delivered. However, my proposal is to delete the use case, but not disallow extra metadata at this time (and my other descriptions of the resolution process keep Thing Links around, just in case they DO have metadata...). Consensus:
|
Update: just as we were closing the meeting Farshid said he would be ok in adding an assertion that Thing Links using the "describedby" relation should not have affordances. So I'll add an assertion of that nature (such an assertion would not forbid Thing Links with other relation types from having affordances). I would personally, however, like to extend this to say "should not have affordances or other metadata". This would cover things like locations (or other random metadata using an extension), version info, security definitions, etc. My goal is to allow a Discoverer to discard a Thing Link (using a describedby relation, anyway) once it is resolved. |
Did the following:
|
Haven't implemented #274 (comment) yet. It is probably still a good idea, but maybe we should handle it in a separate issue/PR, as we'll probably have to do some significant rewrites in that section, including removing/changing ALL the example use cases, which all seem to depend on partial TDs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think it is much clearer now. I still have some concerns but they aren't in assertions and can be addresses in future.
<li><span class="rfc2119-assertion" id="discoverer-fetch-iteration"> | ||
A Discoverer MAY fetch additional TDs iteratively from any Thing Link or | ||
Exploration mechanism described in its set of TDs and add them into the set of TD results.</span> | ||
This only adds the results of fetching TDs from an Exploration mechanism to the set of | ||
results. These new results do not delete the original TD describing the Exploration mechanism. | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this assertion adds to the previous two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussion: can treat as an improvement and do in a second round
<li><span class="rfc2119-assertion" id="discoverer-any-order"> | ||
A Discoverer MAY fetch additional TDs by following links or fetching | ||
additional TDs from Exploration mechanisms (e.g. TDDs) in any order.</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion is similar to the one on line 402:
A Discoverer MAY fetch additional TDs from any Exploration mechanism
described in its initial set of TDs (including, in particular, Thing Description Directories)
and add them into the set of TD results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer to later improvements; maybe merge with others
a Directory wanting to reference other Directories should include a Thing Link with a "describedby" relation to the | ||
TD of the other Directory service. Then the above process would expand the Thing Link to obtain the actual TD of the Directory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this is an informative recommendation. But it has two problems:
- Not all directories are self-describing. This basically says each directory should have a TD hosted somewhere, but not in another directory. This leaves us with self-describing directories or TDs served via an stand-alone web server.
- It adds an addition fetch operation which in practice is only to get the base path. All other affordances are already known to a Discoverer which knew how to read the first directory.
- Federated SPARQL requires depend on the URL of SPARQL which is not available in a Think Link but in the TD.
IMO, the directories should be allowed and even recommended to register their TDs into other directories. I don't understand the benefit of recommending the use of Thing Link with "describedby" relation. The Thing Link can be used (with another relation type) to register the TD partially if the whole object isn't needed. It is practical to register a Think Link for a directory, including the directory's base path, some metadata to describe this directory, and maybe the SPAQRQL endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we turn the above into an issue and deal with it in another PR?
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
Suggest we merge but create issues for the remaining problems and try to resolve them with focused PRs. |
Better describe and constrain what a consumer has to do to implement discovery.
Resolves Issue #272
WIP: Do not merge until all checkboxes below are complete.
Also added notes to README explaining requirements for SVG files, and notes on how to export from drawio in particular (specifically: embed fonts). This was because the SVG for the overview figure was broken (labels truncated), so I had to track down and figure out drawio, etc.
AddChange Terminology definitions forD-Consumer and D-ClientDiscovererPreview | Diff