Data Protocol: Topic #60
Labels
discussion-needed
A solution still needs to be determined
distributed_ops
Aspects of a distributed operation, networked or on a node
messages
Concerns the message format
Question
For the data protocol (via zmq PUB/SUB, see #3), message handling is based on the "topic", the first frame of a published message.
What should the topic be?
Background information on the workings of ZMQ
Be S a subscribers and P the publisher Component:
Consequences for the topic
""
Ideas
Regarding topic overlap
What to do about "xyz" being sent to a "xy" subscriber?
"\n"
. That way "xy\n" subscribes only to "xy\n" and not to "xyz\n". You still receive both, if you just subscribe to "xy" (because "xy\n" and "xyz\n" start with "xy").How to define the topic?
Option 1: Topic is Full name of the component
Addon subtopic: How to mark different messages fo the same Component?
We could allow subtopics by adding the name of the subtopic after the Fullname. If ":" is the separator between full name and subtopic, a topic would look like
"Namespace.Component1:voltages"
.That allows to subscribe to a part of the messages of Component1 (those regarding voltages) or to subscribe to all messages by subscribint to "Namespace.Component1".
The separator could be the same one talked about in "topic overlap".
Option 2: Not tied to Full Name
My opinion
I think we should go for the full name as the topic.
I like the subtopic part, but we can add it later as well (as it is appended, it is backwards compatible)
If we allow subtopics, we could make the separator obligatory, such that we prevent topic overlap as a bonus.
The text was updated successfully, but these errors were encountered: