Skip to content

Commit 43d7206

Browse files
authored
Merge pull request #62 from core-wg/revert-61-pr-optim-attributes
Revert "Optimize use of rt,ct,obs attributes "
2 parents c3bf77a + dec5720 commit 43d7206

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

draft-ietf-core-coap-pubsub.md

+13-28
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ Topic-data interactions are publish, subscribe, unsubscribe, read, and delete. T
163163
The Broker exports one or more topic collection resources, with resource type "core.ps.coll" defined in {{iana}} of this document. The interfaces for the topic collection resource is defined in {{topic-collection-interactions}}.
164164

165165
A topic collection resource can have topic resources as its child resources, with resource type "core.ps.conf".
166-
Other child resource types are currently not defined for a topic collection resource.
167166

168167
# PubSub Topics {#topics}
169168

@@ -199,7 +198,7 @@ Publication and subscription to a topic occur at a link, where the link target i
199198

200199
A topic resource with a topic-data link can also be simply called "topic".
201200

202-
The list of links to the topic resources can be retrieved from the associated topic collection resource, represented as a Link Format document {{RFC6690}} where each link is a topic resource of type "core.ps.conf" as defined in this document.
201+
The list of links to the topic resources can be retrieved from the associated topic collection resource, and represented as a Link Format document {{RFC6690}}where each such link specifies the link target attribute 'rt' (Resource Type), with value "core.ps.conf" defined in this document.
203202

204203
## Topic Representation {#topic-resource-representation}
205204

@@ -236,11 +235,10 @@ The CBOR map includes the following configuration parameters, whose CBOR abbrevi
236235
## Discovery
237236

238237
A client can perform a discovery of: the broker; the topic collection resources and topic resources hosted by the broker; and the topic-data resources associated with those topic resources.
239-
Any server implementing a pubsub broker MUST support CoAP discovery with a query parameter as defined in {{Section 4.1 of RFC6690}} and as used in the examples in this section.
240238

241239
### Broker Discovery {#broker-discovery}
242240

243-
CoAP clients MAY discover brokers by using CoAP discovery, via multicast, through a Resource Directory (RD) {{RFC9176}} or by other means specified in extensions to {{RFC7252}}. Brokers MAY register with a RD by following the steps on {{Section 5 of RFC9176}} with the resource type set to "core.ps" as defined in {{iana}} of this document.
241+
CoAP clients MAY discover brokers by using CoAP Simple Discovery, via multicast, through a Resource Directory (RD) {{RFC9176}} or by other means specified in extensions to {{RFC7252}}. Brokers MAY register with a RD by following the steps on {{Section 5 of RFC9176}} with the resource type set to "core.ps" as defined in {{iana}} of this document.
244242

245243
The following example shows an endpoint discovering a broker using the "core.ps" resource type over a multicast network. Brokers within the multicast scope will answer the query.
246244

@@ -284,19 +282,15 @@ Example:
284282
Header: Content (Code=2.05)
285283
Content-Format: 40 (application/link-format)
286284
Payload:
287-
</ps>;rt="core.ps.coll",
288-
</other/path>;rt="core.ps.coll"
285+
</ps>;rt="core.ps.coll";ct=40,
286+
</other/path>;rt="core.ps.coll";ct=40
289287
~~~~
290288

291-
Note that the "ct" attribute is not included for the two collections in the returned link format document.
292-
This is because the content-format of each topic collection resource is implied by its resource type (rt="core.ps.coll") to be 40 ("application/link-format").
293-
294-
295289
### Topic Discovery {#topic-discovery}
296290

297291
Each topic collection is associated with a group of topic resources, each detailing the configuration of its respective topic (refer to {{topic-properties}}). Each topic resource is identified by the resource type "core.ps.conf".
298292

299-
Below is an example of discovery via /.well-known/core with query rt=core.ps.conf that returns a list of topics, as the list of links to the corresponding topic resources.
293+
Below is an example of discovery via /.well-known/core with rt=core.ps.conf that returns a list of topics, as the list of links to the corresponding topic resources.
300294

301295

302296
~~~~
@@ -312,19 +306,18 @@ Below is an example of discovery via /.well-known/core with query rt=core.ps.con
312306
Header: Content (Code=2.05)
313307
Content-Format: 40 (application/link-format)
314308
Payload:
315-
</ps/h9392>;rt="core.ps.conf",
316-
</other/path/2e3570>;rt="core.ps.conf"
309+
</ps/h9392>;rt="core.ps.conf";ct=TBD606,
310+
</other/path/2e3570>;rt="core.ps.conf";ct=TBD606
317311
~~~~
318312

319313
### Topic-Data Discovery
320314

321315

322316
Within a topic, there is the topic-data property containing the URI of the topic-data resource that a CoAP client can subscribe and publish to. Resources exposing resources of the topic-data type are expected to use the resource type 'core.ps.data'.
323317

324-
The topic-data key in the topic resource contains the URI of the topic-data resource for publishing and subscribing. So retrieving the topic will also provide the URL of the topic-data (see {{topic-get-resource}}).
318+
The topic-data contains the URI of the topic-data resource for publishing and subscribing. So retrieving the topic will also provide the URL of the topic-data (see {{topic-get-resource}}).
325319

326-
It is also possible to discover a list of topic-data resources by sending a request to the collection with query rt=core.ps.data resources as shown below.
327-
Any topic collection resource MUST support this query.
320+
It is also possible to discover a list of topic-data resources by sending a request to the collection with rt=core.ps.data resources as shown below.
328321

329322
~~~~
330323
Request:
@@ -338,12 +331,9 @@ Any topic collection resource MUST support this query.
338331
Header: Content (Code=2.05)
339332
Content-Format: 40 (application/link-format)
340333
Payload:
341-
</ps/data/62e4f8d>
334+
</ps/data/62e4f8d>;rt="core.ps.data";obs
342335
~~~~
343336

344-
Note that the "rt" attribute is not included in the returned link in the example response.
345-
This is because the query in the request already constrains all links in the response to be only of type "core.ps.data".
346-
347337
## Topic Collection Interactions {#topic-collection-interactions}
348338

349339
These are the interactions that can happen directly with a specific topic collection.
@@ -355,10 +345,6 @@ A client can request a collection of the topics present in the broker by making
355345
On success, the broker returns a 2.05 (Content) response, specifying the list of links to topic resources associated with this topic collection (see {{topic-resource-representation}}).
356346

357347
A client MAY retrieve a list of links to topics it is authorized to access, based on its permissions.
358-
The payload content-format 40 ("application/link-format") MUST be at least supported for the collection resource.
359-
Note that no "rt" or "ct" attributes are returned for the topic resources in the example payload, because
360-
the resource type (rt="core.ps.conf") is already implied by this specification for the topic collection and
361-
the content-format (TBD606) is implied by the resource type.
362348

363349
Example:
364350

@@ -373,7 +359,8 @@ Example:
373359
Header: Content (Code=2.05)
374360
Content-Format: 40 (application/link-format)
375361
Payload:
376-
</ps/h9392>,</ps/2e3570>
362+
</ps/h9392>;rt="core.ps.conf",
363+
</ps/2e3570>;rt="core.ps.conf"
377364
~~~~
378365

379366
### Getting topics by Properties {#topic-get-properties}
@@ -407,11 +394,9 @@ Example:
407394
Header: Content (Code=2.05)
408395
Content-Format: 40 (application/link-format)
409396
Payload:
410-
</ps/2e3570>
397+
</ps/2e3570>;rt="core.ps.conf"
411398
~~~~
412399

413-
Note that no "rt" or "ct" attributes are returned in the link format document, since the type of each link
414-
(topic resource with rt="core.ps.conf") is implied as the default resource type of each topic resource by this specification.
415400

416401
### Creating a Topic {#topic-create}
417402

0 commit comments

Comments
 (0)