Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion basics/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following are the foundational requirements for uProtocol specifications:
* *xref:uri.adoc[Addressing (UUri)]*
* *xref:error_model.adoc[Error Model (UStatus, UCode)]*
* *xref:uuid.adoc[Unique Universal Identifier (UUID)]*
* *xref:qos.adoc[Quality of Service & Priority (UPriority)]*
* *xref:upriority.adoc[Message Priority (UPriority)]*
* *xref:uattributes.adoc[uProtocol Attributes (UAttributes)]*
* *xref:umessage.adoc[uProtocol Message (UMessage)]*
* *xref:permissions.adoc[Permissions]*
20 changes: 7 additions & 13 deletions basics/uattributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ Every message *MUST* have a unique message identifier. The timestamp contained i
--

|`priority`
|xref:qos.adoc[UPriority]
|xref:upriority.adoc[UPriority]
|no
a|
The QoS level that this message should be processed/delivered with.
The level of priority that this message should be processed/delivered with.
[.specitem,oft-sid="dsn~up-attributes-priority~1",oft-needs="impl,utest",oft-tags="TransportLayerImpl"]
--
A consumer *MUST* assume a message to have the xref:qos.adoc#default-priority[default priority] if not set explicitly.
A consumer *MUST* assume a message to have the xref:upriority.adoc#default-priority[default priority] if not set explicitly.
--

|`ttl`
Expand Down Expand Up @@ -225,12 +225,6 @@ a|A xref:../up-l2/dispatchers/README.adoc#dispatcher-types[uStreamer] can set th
* *MUST* contain a non-empty _authority_name_ and
* *MUST* contain wildcard values for all of the UUri's other fields.
--

|`priority`
|xref:qos.adoc[UPriority]
|yes
a|
The QoS level that this message should be processed/delivered with.
|===

[#notification-attributes]
Expand Down Expand Up @@ -312,9 +306,9 @@ a|A xref:uri.adoc[UUri] identifying the service provider's method to invoke.
--

|`priority`
|xref:qos.adoc[UPriority]
|xref:upriority.adoc[UPriority]
|yes
a|The xref:qos.adoc[QoS] level that this message should be processed/delivered with.
a|The xref:upriority.adoc[level of priority] that this message should be processed/delivered with.

[.specitem,oft-sid="dsn~up-attributes-request-priority~1",oft-needs="impl,utest",oft-tags="LanguageLibrary"]
--
Expand Down Expand Up @@ -403,10 +397,10 @@ a|
--

|`priority`
|xref:qos.adoc[UPriority]
|xref:upriority.adoc[UPriority]
|yes
a|
The xref:qos.adoc[QoS] level that this message should be processed/delivered with.
The xref:upriority.adoc[level of priority] that this message should be processed/delivered with.

[.specitem,oft-sid="dsn~up-attributes-response-priority~1",oft-needs="impl,utest",oft-tags="ServiceProvider"]
--
Expand Down
46 changes: 35 additions & 11 deletions basics/qos.adoc → basics/upriority.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= QoS
= Message Priority (UPriority)
:sectnums:

The key words "*MUST*", "*MUST NOT*", "*REQUIRED*", "*SHALL*", "*SHALL NOT*", "*SHOULD*", "*SHOULD NOT*", "*RECOMMENDED*", "*MAY*", and "*OPTIONAL*" in this document are to be interpreted as described in https://www.rfc-editor.org/info/bcp14[IETF BCP14 (RFC2119 & RFC8174)]
Expand All @@ -21,21 +21,45 @@ SPDX-License-Identifier: Apache-2.0

uProtocol allows messages to be exchanged between uEntities on the same and/or different devices. The network bandwidth and/or CPU cycles available for performing this task may be limited, though. uProtocol therefore supports priority based message processing at the xref:../up-l1/README.adoc[Transport] and xref:../up-l2/README.adoc[Communication Layer] based on https://datatracker.ietf.org/doc/html/rfc4594[RFC4594 - Configuration Guidelines for DiffServ Service Classes].

For this purpose, each xref:umessage.adoc[UMessage] is assigned to one of the following service classes:
For this purpose, each xref:umessage.adoc[UMessage] is assigned to exactly one of the following classes:
Comment thread
sophokles73 marked this conversation as resolved.
Outdated

.QoS Classifications
.Message Priority Classes
[cols="1,4,3"]
|===
|Class |Description |Typical Use Case

|*CS0* |Low Priority. No bandwidth assurance |File Transfer
|*CS1* |Standard, undifferentiated application |General (unclassified)
|*CS2* |Operations, Administration, and Management |Streamer messages (sub, connect, etc…)
|*CS3* |Multimedia streaming |Video Streaming
|*CS4* |Real-time interactive |High priority (RPC events)
|*CS5* |Important |Signaling
|*CS6* |Safety Critical |Network control
|*CS0*
|Low Priority. No bandwidth assurance
|Bulk data transfer

|*CS1*
|Default priority
|Generic, non-specific application level events

|*CS2*
|Operations, Administration, and Management
|uSubscription messages (subscribe, etc.)

|*CS3*
|Multimedia streaming
|Audio/Video frames

|*CS4*
|Real-time interactive
|High priority (RPC messages)

|*CS5*
|Important
|Signaling

|*CS6*
|Safety Critical
|Network control
|===

[#default-priority]
A UMessage *MAY* be assigned _explicitly_ to a service class by setting the message's xref:uattributes.adoc#common-attributes[`priority`] property to the desired value. If the property is not set, the UMessage belongs to class `CS1` by default.
A UMessage *MAY* be assigned _explicitly_ to a service class by setting the message's xref:uattributes.adoc#common-attributes[_priority_] property to the desired value. If the property is not set, the UMessage belongs to class `CS1` by default.
Comment thread
sophokles73 marked this conversation as resolved.
Outdated

NOTE: The actual handling of message priority is implementation specific and may depend on the capabilities of the underlying transport protocol. Some transports may not support priority handling at all.

NOTE: The example use cases provided above are intended as guidelines only. uEntities may choose to deviate from these guidelines based on specific application requirements.
3 changes: 1 addition & 2 deletions up-core-api/uprotocol/v1/uattributes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ enum UMessageType {
}


// uProtocol Priority as defined in
// https://github.com/eclipse-uprotocol/up-spec/blob/main/basics/qos.adoc[uProtocol Prioritization]
// Message priority levels.
enum UPriority {
// Unspecified priority
UPRIORITY_UNSPECIFIED = 0;
Expand Down
4 changes: 2 additions & 2 deletions up-l1/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ NOTE: Certain uEntities like the xref:../up-l2/dispatchers/README.adoc[uStreamer

[.specitem,oft-sid="req~utransport-send-qos-mapping~1",oft-needs="dsn,uman",oft-tags="TransportLayerImpl"]
--
* *MUST* document if and how the implementation maps the xref:../basics/qos.adoc[UMessage Service Classes] to an existing corresponding mechanism for message prioritization of the underlying transport protocol.
* *MUST* document if and how the implementation maps the xref:../basics/upriority.adoc[UMessage Priority Classes] to an existing corresponding mechanism for message prioritization of the underlying transport protocol.
+
NOTE: An implementation *MAY* also completely ignore the service class and handle all messages equally, regardless of service class.
NOTE: An implementation *MAY* also handle all messages equally, regardless of priority class.
--

[mermaid]
Expand Down
2 changes: 1 addition & 1 deletion up-l1/cloudevents.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ a|The destination (address) of the message
|`priority`
|`priority`
|String
a| The message's priority as defined by xref:../basics/qos.adoc[QoS].
a| The message's priority as defined by xref:../basics/upriority.adoc[Message Priority].

* *MUST* be set to the value of the `uprotocol.ce_name` option defined for the
link:../up-core-api/uprotocol/uattributes.proto[UPriority enum].
Expand Down
2 changes: 1 addition & 1 deletion up-l1/mqtt_5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ a| The destination (address) of the message

| _priority_
| User Property [key: _5_]
a| The message's service class as defined in xref:../basics/qos.adoc[QoS Doc]
a| The message's service class as defined in xref:../basics/upriority.adoc[Message Priority]
Comment thread
sophokles73 marked this conversation as resolved.
Outdated

* *MUST* be set to the value of the _uprotocol.ce_name_ option defined for the
link:../up-core-api/uprotocol/uattributes.proto[UPriority enum].
Expand Down
4 changes: 2 additions & 2 deletions up-l1/someip.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ The following sections highlight the mapping of xref:../basics/uattributes.adoc[

| priority | Not available in SOME/IP. Default UPriority values are used per UMessage type as described in xref:../basics/uattributes.adoc[UAttributes].

* SOME/IP `NOTIFICATION` *SHOULD* use the xref:../basics/qos.adoc[CS1] priority.
* SOME/IP `REQUEST` *SHOULD* use xref:../basics/qos.adoc[CS4] or higher priority.
* SOME/IP `NOTIFICATION` *SHOULD* use the xref:../basics/upriority.adoc[CS1] priority.
* SOME/IP `REQUEST` *SHOULD* use xref:../basics/upriority.adoc[CS4] or higher priority.
* SOME/IP `RESPONSE` *MUST* use the priority from its corresponding `REQUEST` message.

| ttl | Should be checked for incoming `UMESSAGE_TYPE_REQUEST` messages.
Expand Down
2 changes: 1 addition & 1 deletion up-l2/dispatchers/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ NOTE: These communication layer requirements are still for point-2-point uEntity

* *MAY* support additional UMessage delivery policies in general or per topic in the future
* *SHOULD* maintain the (relative) order that messages have been received in, when dispatching messages to receivers
* *SHOULD* consider a received UMessage's xref:../../basics/qos.adoc[service class] in their message dispatching strategy
* *SHOULD* consider a received UMessage's xref:../../basics/upriority.adoc[priority class] in their message dispatching strategy
* *MAY* batch UMessages when delivering to the Receiver
* UMessages that cannot be delivered *MUST* be sent to the Dead Letter topic (DLT)
** DLT *MUST* include at least the UMessage header, SHOULD contain the full UMessage
Expand Down