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

Why do topics need to be created? #40

Open
bdamm opened this issue Oct 30, 2019 · 1 comment
Open

Why do topics need to be created? #40

bdamm opened this issue Oct 30, 2019 · 1 comment
Assignees

Comments

@bdamm
Copy link

bdamm commented Oct 30, 2019

The protocol requires that publishers and subscribers create topics before publishing or subscribing to topics. There is an option for a single-shot topic creation with publish, but no option for subscribing to a topic that hasn't been created yet.

The result is that if you have a very large tree of potential but not realized topics, subscribers need to actually create a topic before subscribing, regardless of whether the topic will actually be used or not. This converts potential topics into actual topics, which is a major resource burden in the case where there is a large number of potential topics but a small number of actual topics within that potential topic tree.

@jaimejim
Copy link
Member

jaimejim commented Oct 2, 2023

Hi @bdamm , thank you for the comment (and sorry for the very belated response).

The draft has undergone many changes since Janruary, please have a look at the latest version https://core-wg.github.io/coap-pubsub/ps-rev/draft-ietf-core-coap-pubsub.html . In particular the topic lifecycle section: https://core-wg.github.io/coap-pubsub/ps-rev/draft-ietf-core-coap-pubsub.html#name-topic-lifecycle

The draft now splits the part of topic configuration and actual pub/sub data interactions. A topic is not fully created until someone posts in it, thus subscribers can only find actual working topics.

However in any case, for subscribers to subscribe the publisher should have created the topic first. Therefore, on the topic of single-shot subscription to a non-existing topic, the result would be the same as a GET to a CoAP resource that does not exist; 4.04 Not Found.

A broker manager could change this behaviour and we could envision a mechanism by which the CoAP server allows for observations on resources that not-yet exist but I would guess that this is something to be checked with CoRE.

Let core (core@ietf.org) know if you are still interested in this topic please.

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

No branches or pull requests

4 participants