You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: draft-ietf-core-coap-pubsub.md
+13-28
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,6 @@ Topic-data interactions are publish, subscribe, unsubscribe, read, and delete. T
163
163
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}}.
164
164
165
165
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.
167
166
168
167
# PubSub Topics {#topics}
169
168
@@ -199,7 +198,7 @@ Publication and subscription to a topic occur at a link, where the link target i
199
198
200
199
A topic resource with a topic-data link can also be simply called "topic".
201
200
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.
@@ -236,11 +235,10 @@ The CBOR map includes the following configuration parameters, whose CBOR abbrevi
236
235
## Discovery
237
236
238
237
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.
240
238
241
239
### Broker Discovery {#broker-discovery}
242
240
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.
244
242
245
243
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.
246
244
@@ -284,19 +282,15 @@ Example:
284
282
Header: Content (Code=2.05)
285
283
Content-Format: 40 (application/link-format)
286
284
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
289
287
~~~~
290
288
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
-
295
289
### Topic Discovery {#topic-discovery}
296
290
297
291
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".
298
292
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.
300
294
301
295
302
296
~~~~
@@ -312,19 +306,18 @@ Below is an example of discovery via /.well-known/core with query rt=core.ps.con
312
306
Header: Content (Code=2.05)
313
307
Content-Format: 40 (application/link-format)
314
308
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
317
311
~~~~
318
312
319
313
### Topic-Data Discovery
320
314
321
315
322
316
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'.
323
317
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}}).
325
319
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.
328
321
329
322
~~~~
330
323
Request:
@@ -338,12 +331,9 @@ Any topic collection resource MUST support this query.
338
331
Header: Content (Code=2.05)
339
332
Content-Format: 40 (application/link-format)
340
333
Payload:
341
-
</ps/data/62e4f8d>
334
+
</ps/data/62e4f8d>;rt="core.ps.data";obs
342
335
~~~~
343
336
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".
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
355
345
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}}).
356
346
357
347
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.
362
348
363
349
Example:
364
350
@@ -373,7 +359,8 @@ Example:
373
359
Header: Content (Code=2.05)
374
360
Content-Format: 40 (application/link-format)
375
361
Payload:
376
-
</ps/h9392>,</ps/2e3570>
362
+
</ps/h9392>;rt="core.ps.conf",
363
+
</ps/2e3570>;rt="core.ps.conf"
377
364
~~~~
378
365
379
366
### Getting topics by Properties {#topic-get-properties}
@@ -407,11 +394,9 @@ Example:
407
394
Header: Content (Code=2.05)
408
395
Content-Format: 40 (application/link-format)
409
396
Payload:
410
-
</ps/2e3570>
397
+
</ps/2e3570>;rt="core.ps.conf"
411
398
~~~~
412
399
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.
0 commit comments