Gerardo Pardo-Castellote, Ph.D.
CTO, Real-Time Innovations, Inc.
DDS-XRCE Specification Overview
DDS for Extremely Resource Contained Networks
New OMG Specification
• The DDS-XRCE specification was adopted March 2018
• Documents are available from the OMG at:
https://www.omg.org/spec/DDS-XRCE/
• It is considered a Beta specification to be finalized by March 2019
©2017 Real-Time Innovations, Inc.
Outline
• Motivation
• Big Picture
• Message Structure
• Interaction Model
• Security
• Deployments
• Transport Model
• Conformance Profiles
• Conclusion
©2017 Real-Time Innovations, Inc.
Real-Time Innovations, Inc.
Motivation
DDS is Being Extended to the very Edge
• Users want to leverage the benefits of the DDS Data-Bus to
applications at the edge of the network, including Sensor Networks
• These systems are constrained in many dimensions: CPU, memory,
power, connectivity, transport payload & bandwidth
• The constraints make it not possible make the edge nodes direct
peer-to-peer participants on the DDS Domain and run DDS-RTPS
• DDS-XRCE solves this problem by defining a new Client-to-Agent
allowing the use of an Agent to communicate with a DDS Domain
Real-Time Innovations, Inc.
Big Picture
Common approach: Agent-Based deployment model
XRCE
Agent
Global Data SpaceDDS/ RTPS
Client
Client
Client
DDS-XRCE
XRCE
Agent
Client
Client
Client
DDS App
DDS App
DDS App
DDS App
DDS App
Agent-Based deployment model
XRCE
AgentClient
XRCE Protocol
Global Data Space
DDS/ RTPS
Existing DDS
Interoperability Wire
Protocol
New protocol defined by
the DDS-XRCE
specification
Resource Constrained
Network
~ 40Kbps, 100Byte MTU
Resource Constrained
Device: ~ 100 KB RAM
Battery Powered
Sleep Cycles
Formal specification of the Agent and Protocol
XRCE
AgentClient
XRCE Protocol
Global Data Space
DDS/ RTPS
XRCE Protocol DDS/RTPS
Protocol
Formal specification of the Agent and Protocol
Client
XRCE Protocol
Global Data Space
DDS/ RTPS
HEADER MSG1 MSG2
XRCE Object Model
Message Structure
+
Interaction Model
+
XRCE Agent Object
Model
class DDS-Mapping
DDSXRCE::
DomainParticipant
DDSXRCE::Publisher
DDSXRCE::Subscriber
DDSXRCE::
DataWriter
DDSXRCE::DataReader
DDSXRCE::Topic
DDS::DomainParticipantFactory
DDS::DomainParticipant
DDS::Publisher
DDS::Subscriber
DDS::TopicDescription
DDS::Topic
DDS::ContentFilteredTopic
DDS::DataReader
DDS::DataWriter
«value»
DDSXRCE::Qos
«value»
DDSXRCE::
QosProfile
Qos
+ DataReaderQos
+ DataWriterQos
+ DomainParticipantQos
+ PublisherQos
+ SubscriberQos
+ TopicQos
(from DDS)
DDSXRCE::Application
«use»
«use»
«use»
«use»
«use»
«use»
0..*
«use»
«use»
«use»
«use»
«use»
©2017 Real-Time Innovations, Inc.
classApplication
DDSXRCE::Application
+ create_participant(): ReturnStatus
+ update_participant(): ReturnStatus
+ delete_participant(): ReturnStatus
+ create_waitset(): ReturnStatus
+ update_waitset(): ReturnStatus
+ delete_waitset(): ReturnStatus
DDSXRCE::DomainParticipant
DDS::DomainParticipant
DDS::
DomainParticipantFactory
DDSXRCE::AccessController
+ check_permissions(): ReturnStatus
«value»
DDSXRCE::Type
«value»
DDSXRCE::
QosProfile
DDSXRCE::QosLibrary «use»
«use»
«use»
«use»
«use»
0..*
«use»
©2017 Real-Time Innovations, Inc.
classParticipant
DDSXRCE::Application
DDSXRCE::DomainParticipant
+ register_type(): ReturnStatus
+ unregister_type(): ReturnStatus
+ create_topic(): ReturnStatus
+ update_topic(): ReturnStatus
+ delete_topic(): ReturnStatus
+ create_publisher(): ReturnStatus
+ update_publisher(): ReturnStatus
+ delete_publisher(): ReturnStatus
+ create_subscriber(): ReturnStatus
+ update_subscriber(): ReturnStatus
+ delete_subscriber(): ReturnStatus
+ get_topics(): ReturnStatus
+ get_publishers(): ReturnStatus
+ get_subscribers(): ReturnStatus
DDS::DomainParticipant
DDS::
DomainParticipantFactory
DDSXRCE::AccessController
+ check_permissions(): ReturnStatus
DDSXRCE::Topic DDSXRCE::
Publisher
DDSXRCE::
Subscriber
«value»
DDSXRCE::Type
DDSXRCE::
RegisteredType
«interface»
DDSXRCE::Entity
+ name: string
0..*
«use»
«use»
«use»
«use»
registeredTypeName
«use»
typeName
«use»
«use»
©2017 Real-Time Innovations, Inc.
class DataWriter
DDSXRCE::DataWriter
+ create_instance(): ReturnStatus
+ update_instance(): ReturnStatus
+ delete_instance(): ReturnStatus
+ write(): ReturnStatus
DDS::DataWriter
DDSXRCE::
Publisher
DDSXRCE::Topic
DDS::Publisher
TopicDescription
DDS::Topic
«interface»
DDSXRCE::Entity
+ name: string
«use»
«use»
«use»
©2017 Real-Time Innovations, Inc.
classDataReader
DDSXRCE::
Subscriber
DDSXRCE::DataReader
+ get(): ReturnStatus
DDSXRCE::Topic
- registeredTypeName: string
- topicName: string
DDS::
TopicDescription
DDS::Topic
DDS::DataReader
DDS::Subscriber
«interface»
DDSXRCE::Entity
+ name: string
«use»
«use»
«use»
«use»
©2017 Real-Time Innovations, Inc.
classAccessController
DDSXRCE::AccessController
+ check_permissions(): ReturnStatus
«singleton»
DDSXRCE::Root
DDSXRCE::Application
DDSXRCE::
Publisher
DDSXRCE::
Subscriber
DDSXRCE::
DomainParticipant
DDSXRCE::ProxyClient
- clientAPIKey: string
0..*
«use»
0..*
0..*
1
«use»
«use»
«use»
Resource Names, Representation, and ID
• Each resource has:
– A name (addresses it within the Agent) and Context
• Example the type “ShapeType”
– A representation. Describes the resource
• Declarative way to describe the Agent resource
• Not expected to go on the wire in most cases
– An ID. Provides (integer) shortcurt for Client to reference XRCE object/resource
• Multiple representations supported: NAME, XML, BINARY
©2017 Real-Time Innovations, Inc.
Qos Representation
• Typical: pre-defined profiles in Agent
– Name-Representation -> QosPofile name
• Allow exchanging Qos between client and Agent:
– XML Representation. Uses XML (or future JSON format)
• Can configure complete set of DDS Qos policies
• Re-uses DDS-XTYPES
– Binary Representation
• Allow sending a subset of the Qos using a BINARY representation
• Reuses XCDR
• Example:
<qos_profile name="MyProf" base_name="ExistingProfile " >
<datawriter_qos>
<history>
<depth>10</depth>
</history>
</datawriter_qos>
</qos_profile>
©2017 Real-Time Innovations, Inc.
Type Representation
• Typical: types pre-defined profiles in Agent
• Name-Representation -> QosPofile name
• Allow exchanging Types between client and Agent:
– XML Representation. Uses XML (or future JSON format)
• Can configure complete set of DDS Types policies
• Re-uses DDS-XTYPES
– Binary Representation (possible extension)
• Allow exchange a any type information using a BINARY representation
• Reuses XCDR
• Example type description using XML representation:
<struct name="ShapeStruct">
<member name="color" type="string"/>
<member name="x" type="int32"/>
<member name="y" type="int32"/>
<member name="shapesize" type="int32"/>
</struct>
©2017 Real-Time Innovations, Inc.
Real-Time Innovations, Inc.
Message Structure
Message Header + Submessages
©2017 Real-Time Innovations, Inc.
XRCE Header Submessage Submessage Submessage
0 8 16 24 31
+---------------+---------------+---------------+---------------+
| sessionId | streamId | sequenceNr |
+---------------+-------+-------+---------------+---------------+
| clientKey (optional is sessionId > 128) |
+---------------+---------------+---------------+---------------+
0 4 8 16 24 31
+---------------+---------------+---------------+---------------+
| submessageId | flags | submessageLength |
+---------------+---------------+---------------+---------------+
~ <payload – depends on smId & resourceType> ~
+---------------+---------------+---------------+---------------+
XRCE Header
Submessage
13 kind of Sub Messages
©2017 Real-Time Innovations, Inc.
classSubmessages
DDSXRCE::Submessage
DDSXRCE::
Submessage::
CREATE
DDSXRCE::
Submessage::
GET_INFO
DDSXRCE::
Submessage::
DELETE
DDSXRCE::
Submessage::INFO
DDSXRCE::
Submessage::
STATUS
DDSXRCE::
Submessage::
ACKNACK
DDSXRCE::
Submessage::
HEARTBEAT
DDSXRCE::Submessage::
SubmessageHeader
- submessageId: byte
- flags: byte
- submessageLength: short
DDSXRCE::
Submessage::
DATA
DDSXRCE::
Submessage::
FRAGMENT
DDSXRCE::
Submessage::
READ_DATA
DDSXRCE::
Submessage::
WRITE_DATA
DDSXRCE::
Submessage::
RESET
DDSXRCE::
Submessage::
CREATE_CLIENT
1
Submessage kinds
©2017 Real-Time Innovations, Inc.
SubmessageId Value Note
CREATE 1 Client to Agent. Specifies resource Name or Representation
GET_INFO 2 Client to Agent.
DELETE 3 Client to Agent.
STATUS 4 Response to CREATE, UPDATE or DELETE.
INFO 5 Response to a GET_INFO. Contains information about an Xrce: Object.
WRITE_DATA 6 Client to Agent. Used to write data using a Xrce::DataWriter.
READ_DATA 7 Client to Agent. Used to read data using a Xrce::DataReader.
DATA 8 Agent to Client in response to a READ_DATA
ACKNACK 9 Bi-directional.
HEARTBEAT 10 Bi-directional.
RESET 11 Bi-directional
FRAGMENT 12 Bi-directional
Example: DATA Message
©2017 Real-Time Innovations, Inc.
0 8 16 24 31
+---------------+--------+-------+----------------+----------------+
| session_id | stream_id | sequenceNr | 4
+-------+-------+----------------+----------------+----------------+
| DATA | flags | submessageLength | 8
+---------------+----------------+----------------+----------------+
| request_id | object_id | 12
+---------------+----------------+----------------+----------------+
+ XCDR_Serialization(foo) + 16
+---------------+--------+-------+----------------+----------------+
Payload format
Depends on flags
Serialization uses DDS-
XTYPES format
Example: Creating a Client
©2017 Real-Time Innovations, Inc.
0 8 16 24 31
+---------------+---------------+---------------+---------------+
| 0x80 | 0x00 | 0x00 | 4
+-------+-------+---------------+---------------+---------------+
| CREATE_CLIENT | flags | submessageLength | 8
+-------+-------+---------------+---------------+---------------+
| request_id | object_id | 12
+-------+-------+---------------+---------------+---------------+
| xrce_cookie | 16
+-------+-------+-------+-------+-------+-------+-------+-------+
| xrce_version | xrce_vendor_id | 20
+-------+-------+---------------+---------------+---------------+
| client_timestamp.seconds | 24
+ +
| client_timestamp.nanoseconds | 26
+-------+-------+---------------+---------------+---------------+
| client_key | 30
+-------+-------+---------------+---------------+---------------+
| session_id |
+-------+-------+
Built-in security
mechanism using
ClientKey
Example: DATA as a sequence
©2017 Real-Time Innovations, Inc.
0 8 16 24 31
+---------------+----------------+----------------+----------------+
| session_id | stream_id | sequenceNr | 4
+-------+-------+----------------+----------------+----------------+
| READ_DATA | flags | submessageLength | 8
+---------------+----------------+----------------+----------------+
| request_id | object_id | 12
+---------------+----------------+----------------+----------------+
| is_present=0 | FORMAT_DATA_SEQ| max_samples | 16
+---------------+----------------+----------------+----------------+
| max_elapsed_time | 20
+---------------+----------------+----------------+----------------+
| max_rate | 24
+---------------+----------------+----------------+----------------+
Writer Reliability
©2017 Real-Time Innovations, Inc.
Initial
AllMessagesAcknowledged MessagesNotFullyAcked
write
/HighestSentSequenceNumber++
receive(ACKNACK)
/save
HigestAcknowledgedSeqNumber
repair SequenceNumber in NACK
[HeartBeatPeriod]
/Send(HeartBeat, HighestSentSequenceNumber)
write
/HighestSentSequenceNumber++
[HiguestReceivedSeqNumber ==HiguestSentSequenceNumber]
Reader Reliability
©2017 Real-Time Innovations, Inc.
Initial
ReceivedAllMessages
MissingMessageFromSender
Choice
/ HiguestReceivedSequenceNumber :=0
[HiguestAnnouncedSequenceNumber <=HiguestReceivedSequenceNumber]
receive(HeartBeat, HigestAnnouncedSequenceNumber)
[HiguestAnnouncedSequenceNumber >HiguestReceivedSequenceNumber]
receive(HeartBeat, HigestAnnouncedSequenceNumber)
[XRCEClient && NackPeriod]
/Send(ACKNACK)
Real-Time Innovations, Inc.
Interaction Model
©2017 Real-Time Innovations, Inc.
sd Client Agent
XRCE AgentXRCE Client
RESOURCE_STATUS(DataWriter)
RESOURCE_STATUS(Session)
ASSERT_RESOURCE(Session)
WRITE_DATA(DataWriter)
WRITE_DATA(DataWriter)
ASSERT_RESOURCE(DataWriter)
DELETE_RESOURCE(DataWriter, Session)
WRITE_DATA(DataWriter)
ASSERT_RESOURCE identifies (preconfigured)
resource by means its Name and retrieves
resourceId
Note: Using CREATE instead of ASSERT_RESOURCE
can create the resource from its representation
©2017 Real-Time Innovations, Inc.
sd Minimal Publisher
XRCE Client XRCE Agent
DELETE_RESOURCE()
WRITE_DATA()
ASSERT_RESOURCE(Session)
WRITE_DATA()
RESOURCE_STATUS()
WRITE_DATA()
The resourceId for specific objects (e.g. a
DataWriter) can also be pre-configured.
This saves having to ASSERT it.
©2017 Real-Time Innovations, Inc.
sd Minimal Subscriber
XRCE Client XRCE Agent
DATA()
DATA()
ASSERT_RESOURCE(Session)
DELETE_RESOURCE()
DATA()
CONFIG_READ()
Real-Time Innovations, Inc.
Security
Security approach
• Assumes transport-level security is in place
• Message Header includes (4-Byte) secret ClientKey
• Agent uses ClientKey to determine client permissions and Identity
– Leverages DDS-Security identity and permissions documents
– Proxy DDS DomainParticipant are exclusive to a single Client
©2017 Real-Time Innovations, Inc.
Real-Time Innovations, Inc.
XRCE Deployments
Six deployment scenarios
• XRCE Client to DDS communication
• XRCE Client to Client via DDS
• Client-to-Client communication brokered by an Agent
• Federated deployment
• Direct Peer-to-Peer communication between clients
• Combined deployment
XRCE Client to DDS communication
©2017 Real-Time Innovations, Inc.
Global Data Space
XRCE
Agent
DDS-RTPS
Protocol
XRCE
Client
DDS
DomainParticipant
DDS-RTPS
XRCE Protocol
XRCE Client to Client via DDS
©2017 Real-Time Innovations, Inc.
Global Data Space
XRCE
Agent
XRCE
Client
XRCE
Agent
XRCE
Client
XRCE Protocol
XRCE Protocol
DDS-RTPS
Protocol
DDS-RTPS
Protocol
Client-to-Client communication brokered by an Agent
©2017 Real-Time Innovations, Inc.
XRCE Protocol
Global Data Space
XRCE
Agent
XRCE
Client
XRCE
Client
DDS-RTPS
Protocol
Federated deployment
©2017 Real-Time Innovations, Inc.
Global Data Space
XRCE
Agent
XRCE
Client
XRCE
Agent
XRCE
Client
DDS-RTPS
Protocol
XRCE
Client
XRCE
Protocol
XRCE
Agent
Direct Peer-to-Peer communication between clients
• Not an RFP requirement
• Protocols supports it without any
additions
• Applications “opt-in” by instantiating:
– Embedded XRCE Agent
– XRCE Client per matched peer
• Maybe implemented without extra
objects. Just the state needs to be
kept.
©2017 Real-Time Innovations, Inc.
XRCE
Agent
XRCE
Client
XRCE
Client
XRCE
Agent
XRCE
Client
XRCE
Client
XRCE Protocol
XRCE
Agent
XRCE
Client
XRCE
Client
Combined deployment
©2017 Real-Time Innovations, Inc.
Global Data Space
XRCE
Agent
XRCE
Client
DDS-RTPS
Protocol
XRCE
Client
XRCE
Protocol
XRCE
Agent
DDS
DomainParticipant
DDS
DomainParticipant
XRCE
Agent
XRCE
Client
XRCE
Client
XRCE
Agent
XRCE
Client
XRCE
Client
Real-Time Innovations, Inc.
Transport Model
Transport Mappings
• Specifies common requirements for XRCE Transports
• Specifies mapping to UDP and TCP
• Pattern for additional Transport mappings. Define:
– Transport Locators
– Connection Establishment
– Message Envelopes
– Agent Discovery
©2017 Real-Time Innovations, Inc.
Transport requirements
• Packet-oriented or connection oriented
• It does not need to provide reliability
– Messages may be dropped
• It does not need to provide ordering
– Messages may arrive out of order
• It does not need to provide notification of dropped messages
• Must support transport-level security (e.g. TLS or DTLS)
©2017 Real-Time Innovations, Inc.
Reliability
• Reliability per stream, multiple (256) streams
– Builtin streams 0-5 are present on every session
– Even-numbered streamIds are best-efforts.
– Reliable streams use HB/ ACKNACK protocol
• Similar to DDS/RTPS
• Multiple Writers can share same stream as configured by client
• Multiple Readers can also share the same stream
©2017 Real-Time Innovations, Inc.
Real-Time Innovations, Inc.
Conformance profiles
Conformance profiles
Profile Description
Read Access Client can read any DDS
Write Access Client can write any DDS
Configure Entities Client can configure/define DDS Entities dynamically
Agent can have Qos configured/defined remotely
Configure Qos Client can configure/define DDS Qos dynamically
Agent can have Qos configured/defined remotely
Configure Types Client can define DDS Type dynamically
Agent can have Qos configured/defined remotely
Discovery Client can discover Topics and Types available on DDS GDS
File-based Config Agent can be configured via XML files
UDP Transport Implements XRCE on UDP
Real-Time Innovations, Inc.
Conclusion
DDS-XRCE Conclusions
• New DDS-XRCE specification adopted by OMG in March 2018
– Considered Beta until March 2019
– https://www.omg.org/spec/DDS-XRCE/
• DDS-XRCE extends DDS to resource-constrained environments
– Memory constraints
– CPU constraints (e.g. Micro-controllers)
– Power Constraints (battery power and sleep cycles)
– Transport constraints (ZigBee, BLE, …)
• Uses a Client/Agent architecture
– Devices connect to DDS Domain via an Agent
• DDS-XRCE SDK allows full access to DDS Topic data from the resource-
constrained device using the Agent as relay
©2017 Real-Time Innovations, Inc.

Overview of the DDS-XRCE specification

  • 1.
    Gerardo Pardo-Castellote, Ph.D. CTO,Real-Time Innovations, Inc. DDS-XRCE Specification Overview DDS for Extremely Resource Contained Networks
  • 2.
    New OMG Specification •The DDS-XRCE specification was adopted March 2018 • Documents are available from the OMG at: https://www.omg.org/spec/DDS-XRCE/ • It is considered a Beta specification to be finalized by March 2019 ©2017 Real-Time Innovations, Inc.
  • 3.
    Outline • Motivation • BigPicture • Message Structure • Interaction Model • Security • Deployments • Transport Model • Conformance Profiles • Conclusion ©2017 Real-Time Innovations, Inc.
  • 4.
  • 5.
    DDS is BeingExtended to the very Edge • Users want to leverage the benefits of the DDS Data-Bus to applications at the edge of the network, including Sensor Networks • These systems are constrained in many dimensions: CPU, memory, power, connectivity, transport payload & bandwidth • The constraints make it not possible make the edge nodes direct peer-to-peer participants on the DDS Domain and run DDS-RTPS • DDS-XRCE solves this problem by defining a new Client-to-Agent allowing the use of an Agent to communicate with a DDS Domain
  • 7.
  • 8.
    Common approach: Agent-Baseddeployment model XRCE Agent Global Data SpaceDDS/ RTPS Client Client Client DDS-XRCE XRCE Agent Client Client Client DDS App DDS App DDS App DDS App DDS App
  • 9.
    Agent-Based deployment model XRCE AgentClient XRCEProtocol Global Data Space DDS/ RTPS Existing DDS Interoperability Wire Protocol New protocol defined by the DDS-XRCE specification Resource Constrained Network ~ 40Kbps, 100Byte MTU Resource Constrained Device: ~ 100 KB RAM Battery Powered Sleep Cycles
  • 10.
    Formal specification ofthe Agent and Protocol XRCE AgentClient XRCE Protocol Global Data Space DDS/ RTPS XRCE Protocol DDS/RTPS Protocol
  • 11.
    Formal specification ofthe Agent and Protocol Client XRCE Protocol Global Data Space DDS/ RTPS HEADER MSG1 MSG2 XRCE Object Model Message Structure + Interaction Model +
  • 12.
    XRCE Agent Object Model classDDS-Mapping DDSXRCE:: DomainParticipant DDSXRCE::Publisher DDSXRCE::Subscriber DDSXRCE:: DataWriter DDSXRCE::DataReader DDSXRCE::Topic DDS::DomainParticipantFactory DDS::DomainParticipant DDS::Publisher DDS::Subscriber DDS::TopicDescription DDS::Topic DDS::ContentFilteredTopic DDS::DataReader DDS::DataWriter «value» DDSXRCE::Qos «value» DDSXRCE:: QosProfile Qos + DataReaderQos + DataWriterQos + DomainParticipantQos + PublisherQos + SubscriberQos + TopicQos (from DDS) DDSXRCE::Application «use» «use» «use» «use» «use» «use» 0..* «use» «use» «use» «use» «use»
  • 13.
    ©2017 Real-Time Innovations,Inc. classApplication DDSXRCE::Application + create_participant(): ReturnStatus + update_participant(): ReturnStatus + delete_participant(): ReturnStatus + create_waitset(): ReturnStatus + update_waitset(): ReturnStatus + delete_waitset(): ReturnStatus DDSXRCE::DomainParticipant DDS::DomainParticipant DDS:: DomainParticipantFactory DDSXRCE::AccessController + check_permissions(): ReturnStatus «value» DDSXRCE::Type «value» DDSXRCE:: QosProfile DDSXRCE::QosLibrary «use» «use» «use» «use» «use» 0..* «use»
  • 14.
    ©2017 Real-Time Innovations,Inc. classParticipant DDSXRCE::Application DDSXRCE::DomainParticipant + register_type(): ReturnStatus + unregister_type(): ReturnStatus + create_topic(): ReturnStatus + update_topic(): ReturnStatus + delete_topic(): ReturnStatus + create_publisher(): ReturnStatus + update_publisher(): ReturnStatus + delete_publisher(): ReturnStatus + create_subscriber(): ReturnStatus + update_subscriber(): ReturnStatus + delete_subscriber(): ReturnStatus + get_topics(): ReturnStatus + get_publishers(): ReturnStatus + get_subscribers(): ReturnStatus DDS::DomainParticipant DDS:: DomainParticipantFactory DDSXRCE::AccessController + check_permissions(): ReturnStatus DDSXRCE::Topic DDSXRCE:: Publisher DDSXRCE:: Subscriber «value» DDSXRCE::Type DDSXRCE:: RegisteredType «interface» DDSXRCE::Entity + name: string 0..* «use» «use» «use» «use» registeredTypeName «use» typeName «use» «use»
  • 15.
    ©2017 Real-Time Innovations,Inc. class DataWriter DDSXRCE::DataWriter + create_instance(): ReturnStatus + update_instance(): ReturnStatus + delete_instance(): ReturnStatus + write(): ReturnStatus DDS::DataWriter DDSXRCE:: Publisher DDSXRCE::Topic DDS::Publisher TopicDescription DDS::Topic «interface» DDSXRCE::Entity + name: string «use» «use» «use»
  • 16.
    ©2017 Real-Time Innovations,Inc. classDataReader DDSXRCE:: Subscriber DDSXRCE::DataReader + get(): ReturnStatus DDSXRCE::Topic - registeredTypeName: string - topicName: string DDS:: TopicDescription DDS::Topic DDS::DataReader DDS::Subscriber «interface» DDSXRCE::Entity + name: string «use» «use» «use» «use»
  • 17.
    ©2017 Real-Time Innovations,Inc. classAccessController DDSXRCE::AccessController + check_permissions(): ReturnStatus «singleton» DDSXRCE::Root DDSXRCE::Application DDSXRCE:: Publisher DDSXRCE:: Subscriber DDSXRCE:: DomainParticipant DDSXRCE::ProxyClient - clientAPIKey: string 0..* «use» 0..* 0..* 1 «use» «use» «use»
  • 18.
    Resource Names, Representation,and ID • Each resource has: – A name (addresses it within the Agent) and Context • Example the type “ShapeType” – A representation. Describes the resource • Declarative way to describe the Agent resource • Not expected to go on the wire in most cases – An ID. Provides (integer) shortcurt for Client to reference XRCE object/resource • Multiple representations supported: NAME, XML, BINARY ©2017 Real-Time Innovations, Inc.
  • 19.
    Qos Representation • Typical:pre-defined profiles in Agent – Name-Representation -> QosPofile name • Allow exchanging Qos between client and Agent: – XML Representation. Uses XML (or future JSON format) • Can configure complete set of DDS Qos policies • Re-uses DDS-XTYPES – Binary Representation • Allow sending a subset of the Qos using a BINARY representation • Reuses XCDR • Example: <qos_profile name="MyProf" base_name="ExistingProfile " > <datawriter_qos> <history> <depth>10</depth> </history> </datawriter_qos> </qos_profile> ©2017 Real-Time Innovations, Inc.
  • 20.
    Type Representation • Typical:types pre-defined profiles in Agent • Name-Representation -> QosPofile name • Allow exchanging Types between client and Agent: – XML Representation. Uses XML (or future JSON format) • Can configure complete set of DDS Types policies • Re-uses DDS-XTYPES – Binary Representation (possible extension) • Allow exchange a any type information using a BINARY representation • Reuses XCDR • Example type description using XML representation: <struct name="ShapeStruct"> <member name="color" type="string"/> <member name="x" type="int32"/> <member name="y" type="int32"/> <member name="shapesize" type="int32"/> </struct> ©2017 Real-Time Innovations, Inc.
  • 21.
  • 22.
    Message Header +Submessages ©2017 Real-Time Innovations, Inc. XRCE Header Submessage Submessage Submessage 0 8 16 24 31 +---------------+---------------+---------------+---------------+ | sessionId | streamId | sequenceNr | +---------------+-------+-------+---------------+---------------+ | clientKey (optional is sessionId > 128) | +---------------+---------------+---------------+---------------+ 0 4 8 16 24 31 +---------------+---------------+---------------+---------------+ | submessageId | flags | submessageLength | +---------------+---------------+---------------+---------------+ ~ <payload – depends on smId & resourceType> ~ +---------------+---------------+---------------+---------------+ XRCE Header Submessage
  • 23.
    13 kind ofSub Messages ©2017 Real-Time Innovations, Inc. classSubmessages DDSXRCE::Submessage DDSXRCE:: Submessage:: CREATE DDSXRCE:: Submessage:: GET_INFO DDSXRCE:: Submessage:: DELETE DDSXRCE:: Submessage::INFO DDSXRCE:: Submessage:: STATUS DDSXRCE:: Submessage:: ACKNACK DDSXRCE:: Submessage:: HEARTBEAT DDSXRCE::Submessage:: SubmessageHeader - submessageId: byte - flags: byte - submessageLength: short DDSXRCE:: Submessage:: DATA DDSXRCE:: Submessage:: FRAGMENT DDSXRCE:: Submessage:: READ_DATA DDSXRCE:: Submessage:: WRITE_DATA DDSXRCE:: Submessage:: RESET DDSXRCE:: Submessage:: CREATE_CLIENT 1
  • 24.
    Submessage kinds ©2017 Real-TimeInnovations, Inc. SubmessageId Value Note CREATE 1 Client to Agent. Specifies resource Name or Representation GET_INFO 2 Client to Agent. DELETE 3 Client to Agent. STATUS 4 Response to CREATE, UPDATE or DELETE. INFO 5 Response to a GET_INFO. Contains information about an Xrce: Object. WRITE_DATA 6 Client to Agent. Used to write data using a Xrce::DataWriter. READ_DATA 7 Client to Agent. Used to read data using a Xrce::DataReader. DATA 8 Agent to Client in response to a READ_DATA ACKNACK 9 Bi-directional. HEARTBEAT 10 Bi-directional. RESET 11 Bi-directional FRAGMENT 12 Bi-directional
  • 25.
    Example: DATA Message ©2017Real-Time Innovations, Inc. 0 8 16 24 31 +---------------+--------+-------+----------------+----------------+ | session_id | stream_id | sequenceNr | 4 +-------+-------+----------------+----------------+----------------+ | DATA | flags | submessageLength | 8 +---------------+----------------+----------------+----------------+ | request_id | object_id | 12 +---------------+----------------+----------------+----------------+ + XCDR_Serialization(foo) + 16 +---------------+--------+-------+----------------+----------------+ Payload format Depends on flags Serialization uses DDS- XTYPES format
  • 26.
    Example: Creating aClient ©2017 Real-Time Innovations, Inc. 0 8 16 24 31 +---------------+---------------+---------------+---------------+ | 0x80 | 0x00 | 0x00 | 4 +-------+-------+---------------+---------------+---------------+ | CREATE_CLIENT | flags | submessageLength | 8 +-------+-------+---------------+---------------+---------------+ | request_id | object_id | 12 +-------+-------+---------------+---------------+---------------+ | xrce_cookie | 16 +-------+-------+-------+-------+-------+-------+-------+-------+ | xrce_version | xrce_vendor_id | 20 +-------+-------+---------------+---------------+---------------+ | client_timestamp.seconds | 24 + + | client_timestamp.nanoseconds | 26 +-------+-------+---------------+---------------+---------------+ | client_key | 30 +-------+-------+---------------+---------------+---------------+ | session_id | +-------+-------+ Built-in security mechanism using ClientKey
  • 27.
    Example: DATA asa sequence ©2017 Real-Time Innovations, Inc. 0 8 16 24 31 +---------------+----------------+----------------+----------------+ | session_id | stream_id | sequenceNr | 4 +-------+-------+----------------+----------------+----------------+ | READ_DATA | flags | submessageLength | 8 +---------------+----------------+----------------+----------------+ | request_id | object_id | 12 +---------------+----------------+----------------+----------------+ | is_present=0 | FORMAT_DATA_SEQ| max_samples | 16 +---------------+----------------+----------------+----------------+ | max_elapsed_time | 20 +---------------+----------------+----------------+----------------+ | max_rate | 24 +---------------+----------------+----------------+----------------+
  • 28.
    Writer Reliability ©2017 Real-TimeInnovations, Inc. Initial AllMessagesAcknowledged MessagesNotFullyAcked write /HighestSentSequenceNumber++ receive(ACKNACK) /save HigestAcknowledgedSeqNumber repair SequenceNumber in NACK [HeartBeatPeriod] /Send(HeartBeat, HighestSentSequenceNumber) write /HighestSentSequenceNumber++ [HiguestReceivedSeqNumber ==HiguestSentSequenceNumber]
  • 29.
    Reader Reliability ©2017 Real-TimeInnovations, Inc. Initial ReceivedAllMessages MissingMessageFromSender Choice / HiguestReceivedSequenceNumber :=0 [HiguestAnnouncedSequenceNumber <=HiguestReceivedSequenceNumber] receive(HeartBeat, HigestAnnouncedSequenceNumber) [HiguestAnnouncedSequenceNumber >HiguestReceivedSequenceNumber] receive(HeartBeat, HigestAnnouncedSequenceNumber) [XRCEClient && NackPeriod] /Send(ACKNACK)
  • 30.
  • 31.
    ©2017 Real-Time Innovations,Inc. sd Client Agent XRCE AgentXRCE Client RESOURCE_STATUS(DataWriter) RESOURCE_STATUS(Session) ASSERT_RESOURCE(Session) WRITE_DATA(DataWriter) WRITE_DATA(DataWriter) ASSERT_RESOURCE(DataWriter) DELETE_RESOURCE(DataWriter, Session) WRITE_DATA(DataWriter) ASSERT_RESOURCE identifies (preconfigured) resource by means its Name and retrieves resourceId Note: Using CREATE instead of ASSERT_RESOURCE can create the resource from its representation
  • 32.
    ©2017 Real-Time Innovations,Inc. sd Minimal Publisher XRCE Client XRCE Agent DELETE_RESOURCE() WRITE_DATA() ASSERT_RESOURCE(Session) WRITE_DATA() RESOURCE_STATUS() WRITE_DATA() The resourceId for specific objects (e.g. a DataWriter) can also be pre-configured. This saves having to ASSERT it.
  • 33.
    ©2017 Real-Time Innovations,Inc. sd Minimal Subscriber XRCE Client XRCE Agent DATA() DATA() ASSERT_RESOURCE(Session) DELETE_RESOURCE() DATA() CONFIG_READ()
  • 34.
  • 35.
    Security approach • Assumestransport-level security is in place • Message Header includes (4-Byte) secret ClientKey • Agent uses ClientKey to determine client permissions and Identity – Leverages DDS-Security identity and permissions documents – Proxy DDS DomainParticipant are exclusive to a single Client ©2017 Real-Time Innovations, Inc.
  • 36.
  • 37.
    Six deployment scenarios •XRCE Client to DDS communication • XRCE Client to Client via DDS • Client-to-Client communication brokered by an Agent • Federated deployment • Direct Peer-to-Peer communication between clients • Combined deployment
  • 38.
    XRCE Client toDDS communication ©2017 Real-Time Innovations, Inc. Global Data Space XRCE Agent DDS-RTPS Protocol XRCE Client DDS DomainParticipant DDS-RTPS XRCE Protocol
  • 39.
    XRCE Client toClient via DDS ©2017 Real-Time Innovations, Inc. Global Data Space XRCE Agent XRCE Client XRCE Agent XRCE Client XRCE Protocol XRCE Protocol DDS-RTPS Protocol DDS-RTPS Protocol
  • 40.
    Client-to-Client communication brokeredby an Agent ©2017 Real-Time Innovations, Inc. XRCE Protocol Global Data Space XRCE Agent XRCE Client XRCE Client DDS-RTPS Protocol
  • 41.
    Federated deployment ©2017 Real-TimeInnovations, Inc. Global Data Space XRCE Agent XRCE Client XRCE Agent XRCE Client DDS-RTPS Protocol XRCE Client XRCE Protocol XRCE Agent
  • 42.
    Direct Peer-to-Peer communicationbetween clients • Not an RFP requirement • Protocols supports it without any additions • Applications “opt-in” by instantiating: – Embedded XRCE Agent – XRCE Client per matched peer • Maybe implemented without extra objects. Just the state needs to be kept. ©2017 Real-Time Innovations, Inc. XRCE Agent XRCE Client XRCE Client XRCE Agent XRCE Client XRCE Client XRCE Protocol XRCE Agent XRCE Client XRCE Client
  • 43.
    Combined deployment ©2017 Real-TimeInnovations, Inc. Global Data Space XRCE Agent XRCE Client DDS-RTPS Protocol XRCE Client XRCE Protocol XRCE Agent DDS DomainParticipant DDS DomainParticipant XRCE Agent XRCE Client XRCE Client XRCE Agent XRCE Client XRCE Client
  • 44.
  • 45.
    Transport Mappings • Specifiescommon requirements for XRCE Transports • Specifies mapping to UDP and TCP • Pattern for additional Transport mappings. Define: – Transport Locators – Connection Establishment – Message Envelopes – Agent Discovery ©2017 Real-Time Innovations, Inc.
  • 46.
    Transport requirements • Packet-orientedor connection oriented • It does not need to provide reliability – Messages may be dropped • It does not need to provide ordering – Messages may arrive out of order • It does not need to provide notification of dropped messages • Must support transport-level security (e.g. TLS or DTLS) ©2017 Real-Time Innovations, Inc.
  • 47.
    Reliability • Reliability perstream, multiple (256) streams – Builtin streams 0-5 are present on every session – Even-numbered streamIds are best-efforts. – Reliable streams use HB/ ACKNACK protocol • Similar to DDS/RTPS • Multiple Writers can share same stream as configured by client • Multiple Readers can also share the same stream ©2017 Real-Time Innovations, Inc.
  • 48.
  • 49.
    Conformance profiles Profile Description ReadAccess Client can read any DDS Write Access Client can write any DDS Configure Entities Client can configure/define DDS Entities dynamically Agent can have Qos configured/defined remotely Configure Qos Client can configure/define DDS Qos dynamically Agent can have Qos configured/defined remotely Configure Types Client can define DDS Type dynamically Agent can have Qos configured/defined remotely Discovery Client can discover Topics and Types available on DDS GDS File-based Config Agent can be configured via XML files UDP Transport Implements XRCE on UDP
  • 50.
  • 51.
    DDS-XRCE Conclusions • NewDDS-XRCE specification adopted by OMG in March 2018 – Considered Beta until March 2019 – https://www.omg.org/spec/DDS-XRCE/ • DDS-XRCE extends DDS to resource-constrained environments – Memory constraints – CPU constraints (e.g. Micro-controllers) – Power Constraints (battery power and sleep cycles) – Transport constraints (ZigBee, BLE, …) • Uses a Client/Agent architecture – Devices connect to DDS Domain via an Agent • DDS-XRCE SDK allows full access to DDS Topic data from the resource- constrained device using the Agent as relay ©2017 Real-Time Innovations, Inc.