-
Notifications
You must be signed in to change notification settings - Fork 63
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
Extending the initial/reusable connection examples #2025
Comments
Here are my diagrams for the first two:
sequenceDiagram
participant Thing
participant Consumer
activate Consumer
Consumer->>Thing: readproperty Temperature (e.g. HTTP GET request)
activate Thing
Thing->>Thing: get sensor reading
Thing->>Consumer: send Temperature property value (e.g. HTTP response)
deactivate Thing
activate Consumer
Consumer->>Consumer: use property value
deactivate Consumer
deactivate Consumer
sequenceDiagram
participant Thing
participant Broker
participant Consumer
activate Broker
Thing->>Broker: Connect to broker
activate Thing
Consumer->>Broker: Connect to broker
activate Consumer
Thing->>Thing: get sensor reading
activate Thing
Thing->>Broker: publish updated temperature value to mytemp topic
Broker->>Thing: puback
deactivate Thing
Consumer->>Broker: subscribe to mytemp topic (observeproperty)
Thing->>Thing: get sensor reading
activate Thing
Thing->>Broker: publish updated temperature value to mytemp topic
Broker->>Thing: puback
deactivate Thing
Broker->>Consumer: send Temperature property value
activate Consumer
Consumer->>Consumer: use property value
deactivate Consumer
activate Thing
Thing->>Broker: publish updated temperature value to mytemp topic
Broker->>Thing: puback
deactivate Thing
Broker->>Consumer: send Temperature property value
activate Consumer
Consumer->>Consumer: use property value
deactivate Consumer
deactivate Consumer
deactivate Thing
deactivate Broker
Let me know if this style is fine for all. Then I can make a PR where we discuss further. |
Notes from the call:
|
I have updated my comment above to use activation feature of mermaid. In the end, leaving colours aside, mermaid is pretty good. However, I could not arrange things like I wanted. Thinking that these kind of diagrams can go into the spec to explain the feature, it is better to have more flexibility and higher quality figures. So going with Draw.io is better, even though the initial work will be slightly higher. |
|
Note that accessibility strongly advises that color not be the only differentiator in diagrams like these, due to color blindness and other visual limitations that readers may have. Variably dashed lines, shape differences, patterned fills, etc., are strongly preferred. Color contrasts are also important. The usual problem is with colored text overlaid on color blocks; here, it's with color blocks over color blocks. I expect the "dark" lines will be fine when compared to the "light" fills, but in these diagrams, it's currently equally (if not more) important that the various light fills appear differently enough from each other that they can be discerned. |
I tried to depict an usual flow based on OAuth. Out there, there are many flavors, different flows, and OpenID among them but I've tried to factorize the most common interactions between the parties. @TallTed I'm currently using the same visual language just because it will be easier to refactor all the diagrams when we settle the discussion, I hope they are still understandable. I'm sorry it causes any trouble. |
Talking with @mjkoster , Node RED has taken some decisions to enable this. For example, all MQTT connections are handled by hidden node(s) that the other nodes refer to. @egekorkan will do a short demo in the TD call this week. |
Discussion in the Call of 24 July:
|
We should extend the document at https://github.com/w3c/wot/blob/main/planning/ThingDescription/td-next-work-items/usability-and-design.md#examples-of-message-flow
The text was updated successfully, but these errors were encountered: