Skip to content

Commit e1376b8

Browse files
committed
-m Updated cbor code points and cleaned text
1 parent 731f37f commit e1376b8

File tree

1 file changed

+20
-84
lines changed

1 file changed

+20
-84
lines changed

draft-ietf-core-coap-pubsub.md

+20-84
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ Topic-configuration interactions are discovery, create, read configuration, upda
144144

145145
Topic-data interactions are publish, subscribe, unsubscribe, read, and delete. These operations are oriented on how data is transferred from a publisher to a subscriber.
146146

147-
<!--
148-
Throughout the document there is a number of TBDs that need updating, mostly content formats or cbor data representations
149-
-->
150-
151147
## Managing Topics {#managing-topics}
152148

153149
{{fig-api}} shows the resources related to a Topic Collection that can be managed at the Broker.
@@ -296,10 +292,6 @@ Each topic collection is associated with a group of topic resources, each detail
296292

297293
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.
298294

299-
<!--
300-
TODO: add the ct part in IANA and add the example here:
301-
- If you want to indicate ct= in one of this links, then it should be ct=X, where is the the Content-Format identifier for application/core-pubsub+cbor
302-
-->
303295

304296
~~~~
305297
Request:
@@ -320,15 +312,6 @@ TODO: add the ct part in IANA and add the example here:
320312

321313
### Topic-Data Discovery
322314

323-
<!--
324-
TODO DISCUSS Decide on this section
325-
326-
Also, as based on {{ection 1.2.2 of RFC6690}}, I'd realistically expect to have located by /.well-known/core certainly the topic collection resources and MAYBE the topic resources (and likely limited only to "perpetual", hence well-known topics).
327-
328-
Instead, I'd expect to discover the links to the topic resources mostly by GET/FETCH accessing the topic collection resource.
329-
330-
Practically, you may have to literally *discover* the broker, its collection resource, and a particular topic resource. At that point, you just *learn* the URI of the topic-data resource, from the corresponding parameter within the exact, corresponding topic resource.
331-
-->
332315

333316
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'.
334317

@@ -441,7 +424,7 @@ The broker MUST issue a 4.00 (Bad Request) error if a received parameter is inva
441424

442425
Header: POST (Code=0.02)
443426
Uri-Path: "ps"
444-
Content-Format: TBD2 (application/core-pubsub+cbor)
427+
Content-Format: TBD (application/core-pubsub+cbor)
445428
Payload (in CBOR diagnostic notation):
446429
{
447430
/ topic-name / 0: "living-room-sensor",
@@ -452,7 +435,7 @@ The broker MUST issue a 4.00 (Bad Request) error if a received parameter is inva
452435

453436
Header: Created (Code=2.01)
454437
Location-Path: "ps/h9392"
455-
Content-Format: TBD2 (application/core-pubsub+cbor)
438+
Content-Format: TBD (application/core-pubsub+cbor)
456439
Payload (in CBOR diagnostic notation):
457440
{
458441
/ topic-name / 0: "living-room-sensor",
@@ -496,7 +479,7 @@ For example, below is a request on the topic "ps/h9392":
496479
Response:
497480

498481
Header: Content (Code=2.05)
499-
Content-Format: TBD2 (application/core-pubsub+cbor)
482+
Content-Format: TBD (application/core-pubsub+cbor)
500483
Payload (in CBOR diagnostic notation):
501484
{
502485
/ topic-name / 0: "living-room-sensor",
@@ -538,7 +521,7 @@ Example:
538521
Header: FETCH (Code=0.05)
539522
Uri-Path: "ps"
540523
Uri-Path: "h9392"
541-
Content-Format: TBD2 (application/core-pubsub+cbor)
524+
Content-Format: TBD (application/core-pubsub+cbor)
542525
Payload (in CBOR diagnostic notation):
543526
{
544527
/ conf-filter / 11: ["topic-data", "media-type"]
@@ -547,7 +530,7 @@ Example:
547530
Response:
548531

549532
Header: Content (Code=2.05)
550-
Content-Format: TBD2 (application/core-pubsub+cbor)
533+
Content-Format: TBD (application/core-pubsub+cbor)
551534
Payload (in CBOR diagnostic notation):
552535
{
553536
/ topic-data / 1: "ps/data/1bd0d6d",
@@ -582,7 +565,7 @@ Example:
582565
Header: PUT (Code=0.03)
583566
Uri-Path: "ps"
584567
Uri-Path: "h9392"
585-
Content-Format: TBD2 (application/core-pubsub+cbor)
568+
Content-Format: TBD (application/core-pubsub+cbor)
586569
Payload (in CBOR diagnostic notation):
587570
{
588571
/ topic-name / 0: "living-room-sensor",
@@ -596,7 +579,7 @@ Example:
596579
Response:
597580

598581
Header: Changed (Code=2.04)
599-
Content-Format: TBD2 (application/core-pubsub+cbor)
582+
Content-Format: TBD (application/core-pubsub+cbor)
600583
Payload (in CBOR diagnostic notation):
601584
{
602585
/ topic-name / 0: "living-room-sensor",
@@ -632,7 +615,7 @@ Contrary to PUT, iPATCH operations will explicitly update some parameters, leavi
632615
Header: iPATCH (Code=0.07)
633616
Uri-Path: "ps"
634617
Uri-Path: "h9392"
635-
Content-Format: TBD2 (application/core-pubsub+cbor)
618+
Content-Format: TBD (application/core-pubsub+cbor)
636619
Payload (in CBOR diagnostic notation):
637620
{
638621
/ expiration-date / 5: "2024-02-28T23:59:59Z",
@@ -642,7 +625,7 @@ Contrary to PUT, iPATCH operations will explicitly update some parameters, leavi
642625
Response:
643626

644627
Header: Changed (Code=2.04)
645-
Content-Format: TBD2 (application/core-pubsub+cbor)
628+
Content-Format: TBD (application/core-pubsub+cbor)
646629
Payload (in CBOR diagnostic notation):
647630
{
648631
/ topic-name / 0: "living-room-sensor",
@@ -698,11 +681,6 @@ URIs for topic resources are broker-generated (see {{topic-create}}). There is n
698681

699682
When a topic is newly created, it is first placed by the broker into the HALF CREATED state (see {{fig-life}}). In this state, a client can read and update the configuration of the topic and delete the topic. A publisher can publish to the topic-data resource. However, a subscriber cannot yet subscribe to the topic-data resource nor read the latest data.
700683

701-
<!--
702-
TODO I got a comment that mqtt folks my want to pre-subscribe to topics, so they'd like to be able to place an observation even if the resource is not "fully created"
703-
704-
Also, we might want to restrict the discovery part ONLY for FULLY created topics. If so, let's mention it.
705-
-->
706684

707685
~~~~ aasvg
708686
HALF FULLY
@@ -729,15 +707,6 @@ When a client deletes a topic-data, the topic is placed into the HALF CREATED st
729707

730708
## Topic-Data Interactions {#topic-data-interactions}
731709

732-
<!--
733-
TODO: Should we remove this
734-
See comments above. I'm not sure whether the client should have any say on where the topic-data resource is hosted.
735-
736-
It'd already be difficult to have some sort of coordination between the broker and the separate server hosting the topic-data resource, let alone involving the client as yet another actor in the process.
737-
738-
JJ: Also note that the broker has no way to know anything about a topic-data hosted elsewhere.
739-
-->
740-
741710
Interactions with the topic-data resource are covered in this section.
742711

743712
### Publish {#publish}
@@ -807,14 +776,6 @@ On success, the server hosting the topic-data resource MUST return 2.05 (Content
807776

808777
If the topic is not yet in the fully created state (see {{topic-lifecycle}}) the broker MUST return a response code 4.04 (Not Found).
809778

810-
<!--
811-
TODO: After a publisher publishes to the topic-data for the first time, the topic is placed into the FULLY CREATED state.
812-
813-
This is a problem if the topic-data is hosted elsewhere and not in the broker, how does the broker know when to put it in fully created state if the pub/sub mechanism is happening directly btw pub and sub?
814-
815-
Shall I add: The topic-data URI may link to resources that are not hosted directly by the broker as shown in {{fig-external-server}}.
816-
Thus, subscribers would use the broker for discovery only.
817-
-->
818779

819780
The following response codes are defined for the Subscribe operation:
820781

@@ -826,9 +787,6 @@ Failure:
826787

827788
If the 'max-subscribers' parameter has been reached, the broker must treat that as specified in {{Section 4.1 of RFC7641}}. The response MUST NOT include an Observe Option, the absence of which signals to the subscriber that the subscription failed.
828789

829-
<!--
830-
TODO Right. However, how can this work when the server hosting the topic-data resource is not the broker? The broker knows the maximum number of subscribers, but that separate server does not. Is it just up to a not-specified-here synchronization protocol between the broker and that server?
831-
-->
832790

833791
Example of a successful subscription followed by one update:
834792

@@ -878,24 +836,13 @@ As per {{RFC7641}} a server that transmits notifications mostly in non-confirmab
878836

879837
This value can be modified at the broker by the administrator of a topic by modifying the parameter "observer-check" on {{topic-resource-representation}}. This would allow changing the rate at which different implementations verify that a subscriber is still interested in observing a topic-data resource.
880838

881-
<!--
882-
TODO: another item that points to make topic-data a broker thing only.
883-
884-
Yes, and again, what if the topic-data resource is not hosted at the broker but at a different server? Is it just up to a not-specified-here synchronization protocol between the broker and that server?
885-
-->
886839

887840
### Delete topic-data {#delete-topic-data}
888841

889842
A publisher MAY delete a topic by making a CoAP DELETE request on the topic-data URI.
890843

891844
On success, the broker returns a 2.02 (Deleted) response.
892845

893-
894-
<!--
895-
Q: Same question here, why is this a SHOULD (see comment above).
896-
A: Changed to MUST but I think we could discuss it. Could the broker have reasons to keep the uri of the topic-data path for later reuse in some cases? for example the broker could also implement a different behaviour for the topic-data deletion, sending back 2.02 but keeping the resource in fully created state without returning a final 4.04 to cancel existing observations BUT still having the resource addressable to allow normal GET on it, for example for retrieving the last published/historical value/s. I am ambivalent here and would welcome guidance from others. I think MUST should not be used if there are no interoperability issues cause by using SHOULD.
897-
-->
898-
899846
When a topic-data resource is deleted, the broker MUST also delete the topic-data parameter in the topic resource, unsubscribe all subscribers by removing them from the list of observers and return a final 4.04 (Not Found) response as per {{Section 3.2 of RFC7641}}. The topic is then set back to the half created state as per {{topic-lifecycle}}.
900847

901848
Example of a successful deletion:
@@ -946,15 +893,6 @@ Example:
946893
}
947894
~~~~
948895

949-
<!--
950-
TODO: Do we add wildcards here?
951-
https://github.com/core-wg/coap-pubsub/issues/42
952-
953-
### Subscribe to a subset of topic-data resources {#wildcard}
954-
955-
Some implementations may want to subscribe to multiple topic-data resources with one single request. That is possible by using FETCH with
956-
957-
-->
958896

959897
## Rate Limiting {#rate-limit}
960898

@@ -970,23 +908,21 @@ This document defines parameters used in the messages exchanged between a client
970908

971909
Note that the media type application/core-pubsub+cbor MUST be used when these parameters are transported in the respective message fields.
972910

973-
<!-- To be registerd in IANA: TODO Populate the TBDs non-negative unsigned -->
974-
975911
~~~~~~~~~~~
976912
+----------------------+----------+-----------+------------+
977913
| Name | CBOR Key | CBOR Type | Reference |
978914
| -------------------- | -------- | --------- | ---------- |
979-
| topic-name | TBD1 | tstr | [RFC-XXXX] |
980-
| topic-data | TBD2 | tstr | [RFC-XXXX] |
981-
| resource-type | TBD3 | tstr | [RFC-XXXX] |
982-
| topic-content-format | TBD4 | uint | [RFC-XXXX] |
983-
| topic-type | TBD5 | tstr | [RFC-XXXX] |
984-
| expiration-date | TBD6 | tstr | [RFC-XXXX] |
985-
| max-subscribers | TBD7 | uint | [RFC-XXXX] |
986-
| observer-check | TBD8 | uint | [RFC-XXXX] |
987-
| topic-history | TBD9 | uint | [RFC-XXXX] |
988-
| initialize | TBD10 | bool | [RFC-XXXX] |
989-
| conf-filter | TBD11 | array | [RFC-XXXX] |
915+
| topic-name | 0 | tstr | [RFC-XXXX] |
916+
| topic-data | 1 | tstr | [RFC-XXXX] |
917+
| resource-type | 2 | tstr | [RFC-XXXX] |
918+
| topic-content-format | 3 | uint | [RFC-XXXX] |
919+
| topic-type | 4 | tstr | [RFC-XXXX] |
920+
| expiration-date | 5 | tstr | [RFC-XXXX] |
921+
| max-subscribers | 6 | uint | [RFC-XXXX] |
922+
| observer-check | 7 | uint | [RFC-XXXX] |
923+
| topic-history | 8 | uint | [RFC-XXXX] |
924+
| initialize | 9 | bool | [RFC-XXXX] |
925+
| conf-filter | 10 | array | [RFC-XXXX] |
990926
+----------------------+----------+-----------+------------+
991927
~~~~~~~~~~~
992928
{: #fig-CoAP-Pubsub-Parameters title="CoAP Pubsub Parameters" artwork-align="center"}

0 commit comments

Comments
 (0)