Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CopyrightPrismTech,2017
Angelo	Corsaro,	PhD
Chief	Technology	Officer		
ADLINK	Tech.	Inc.		
Co-Chair,	OMG	DDS-SIG	
angelo.c...
CopyrightPrismTech,2017
The Problem
CopyrightPrismTech,2017
Sensing in Smart Cities
has to deal with Memory,
Bandwidth and Power
Constraints
CopyrightPrismTech,2017
Sensing in Smart
Farming has to deal with
Memory, Bandwidth
and Power Constraints
CopyrightPrismTech,2017
Cost of connectivity is an
issue in Oil Exploration
platforms as sensing
1MByte costs over $8
Cost of connectivity is an
issue in Smart Grids as
the operator has to pay for
the 2G/3G/4G data-link
CopyrightPrismTech,2017
Low-Power Network-
Connectivity Landscape
CopyrightPrismTech,2017
Local/Personal-Area Networks
Low Power Local/Personal Area
Network have been an area of
active inn...
CopyrightPrismTech,2017
Low-Power Wide-Area Networks
Low-Power Wide Area Network
technologies have initially emerged
in un...
CopyrightPrismTech,2017
Data-Sharing /
Messaging
Standards Landscape
CopyrightPrismTech,2017
Data Sharing Standards
recommended in IoT/IIoT
References Architectures
and used in deployed
syste...
CopyrightPrismTech,2017
Some of the key limitations
are the wire-overhead (all),
dependency on TCP/IP
(AMQP, MQTT, OPC-UA)...
CopyrightPrismTech,2017
CoAP is a Resource-Oriented
protocol designed to deal
with resource constrained
environments
CoAP ...
CopyrightPrismTech,2017
CoAP lacks temporal decoupling
and the publish/subscribe model
was added as an after-thought to
th...
CopyrightPrismTech,2017
Low-Power Network-
Challenges
CopyrightPrismTech,2017
When compared with traditional
network technologies, Low-Power
networks have very small MTU, for
i...
CopyrightPrismTech,2017
Battery powered applications
are often characterised by
extremely low duty cycles to
ensure that t...
CopyrightPrismTech,2017
As Low Power WAN networks will become more
widely deployed and used in IoT the need for
reliable, ...
CopyrightPrismTech,2017
DDS-XRCE
Objective
The goal of DDS-XRCE is to bring DDS
connectivity to devices that are constrained
with respect to the node resou...
The XRCE global
data space can
be implemented
by peers or by a
network or
brokers or both
depending on
deployment
network ...
XRCE has been
designed to have
a trivial mapping
to DDS.
Thus Protocol
Gateways will be
easy to build in
SW or HW and
very...
CopyrightPrismTech,2017
Scope
TCP UDP
IP
802.3 802.11
DDSI-RTPS DDS-XRCE
XRCE Application
L3: Network
DCPS
App App App
TCP...
Status
PrismTech has been leading the DDS-XRCE
standardisation at OMG
The standard will be voted next week at September
20...
XRCE-Abstractions
CopyrightPrismTech,2017
XRCE provides a data space
abstraction in which applications
can read and write data
autonomously ...
CopyrightPrismTech,2017
An XRCE Resource is a closed
description for a set of named values.
If the cardinality of the set ...
CopyrightPrismTech,2017
An XRCE Resource also has a set
of properties, which are name-
value pairs. These are used for
spe...
CopyrightPrismTech,2017
An XRCE Selection is the conjunction of a Resource, and a Predicate over
the resource content and ...
XRCE Protocol
CopyrightPrismTech,2017
The XRCE protocol specifies how the XRCE global data
space can be implemented “on the wire”.
XRCE ...
CopyrightPrismTech,2017
XRCE messages are all composed by a single byte header
and a body.
Message Structure
	7	6	5	4	3	2	...
CopyrightPrismTech,2017
Messages can be “decorated” by prefixing them with certain markers.
A message together with its de...
CopyrightPrismTech,2017
XRCE always uses little-endian for its data and primarily uses
variable-length encoding (VLE) to s...
CopyrightPrismTech,2017
The source address of each message is assumed to be a unique
address of the sender.
Data sent to s...
CopyrightPrismTech,2017
XRCE is a modular protocol that
allows implementation to
decide which subset of the
protocol to im...
CopyrightPrismTech,2017
Discovery. The discovery module allows application to
dynamically discover each other and exchange...
XRCE Protocol

SCOUTING
CopyrightPrismTech,2017
Scouting is the discovery of other nodes in the network.
If the transport has its own discovery (B...
CopyrightPrismTech,2017
Scout is a request for other nodes in the network
to send a Hello. MASK encodes the type: broker,
...
XRCE Protocol

SESSION MANAGEMENT
CopyrightPrismTech,2017
For two nodes to communicate in XRCE, they need to establish a session. With
a session comes the a...
CopyrightPrismTech,2017
Opening a Session
CopyrightPrismTech,2017
Open is a request to establish a session.
• VMAJ/VMIN is protocol version
• PID is the requesting ...
CopyrightPrismTech,2017
Accept is the successful response to an
Open.
• OPID is the requesting node’s unique
id
• APID is ...
CopyrightPrismTech,2017
To reject a request for opening a session and to
explicitly close an existing session, a Close mes...
CopyrightPrismTech,2017
To reject a request for
opening a session and
to explicitly close an
existing session, a
Close mes...
XRCE Protocol

DECLARATIONS
CopyrightPrismTech,2017
Resources, publications, subscriptions, selections all need to be declared
before one can publish ...
CopyrightPrismTech,2017
Resources and Selections are uniquely identified by numerical
ids to save space on the wire.
The r...
CopyrightPrismTech,2017
Subscribing to a trivial resource can be done using the Resource ID.
Subscribing to a more complic...
CopyrightPrismTech,2017
The general Declare message is a
container for a list of Declarations.
• it is always reliable
• S...
CopyrightPrismTech,2017
This declares that (numerical) resource id RID
corresponds to Resource. Resource need not be
trivi...
CopyrightPrismTech,2017
This declares the sender as a
publisher of values for the
Resource/Selection identified by
RID/SID...
CopyrightPrismTech,2017
This declares a subscription to the resource/selection
identified by RID/SID.


SubMode determines...
CopyrightPrismTech,2017
This declares a selection (i.e., a
query) and associates it with a
Selection ID. To actually subsc...
CopyrightPrismTech,2017
This defines a new binding for the given
selection, i.e., an alias for the old
selection ID.
This ...
XRCE Protocol

Data Exchange
CopyrightPrismTech,2017
All data messages and declarations are transported over a conduit,
which is a pair of a reliable a...
CopyrightPrismTech,2017
Best-Effort Channel Specification
CopyrightPrismTech,2017
The best-effort channel implementation is relatively
straight forward.
The XRCE runtime has to mak...
CopyrightPrismTech,2017
Reliable Channel Specification
CopyrightPrismTech,2017
The Petri Net describes
the behaviour of a
Reliable Channel with a
buffer of n places. It is
worth...
CopyrightPrismTech,2017
Conduit is used to specify
that the next messages in the
packet (or the next message
for non-packe...
CopyrightPrismTech,2017
The migrate market is used to
migrate a resource from a
conduit to another while
maintaining relia...
CopyrightPrismTech,2017
Synch is used to inform the recipient of the range of
sequence numbers available for retransmissio...
CopyrightPrismTech,2017
ACKNACK with M=0 (no mask) is used to
acknowledge all reliable messages on
conduit CID up to but n...
Writing Data
CopyrightPrismTech,2017
XRCE allows writing a resource
w/o any kind of prior
registration or discovery
The cost of this ab...
CopyrightPrismTech,2017
XRCE provides built-in support for very efficiently
sending a sample or a batch of samples. Notice...
CopyrightPrismTech,2017
Fragmentation
	7	6	5	4	3	2	1	0	
+-+-+-+-+-+-+-+-+	
|X|N|X|		FRAG			|	
+-+-+-----------+	
~				SN-B...
Reading Data
CopyrightPrismTech,2017
Pulling Data
			7	6	5	4	3	2	1	0	
	 +-+-+-+-+-+-+-+-+	
	 |X|S|N|		PULL			|	
	 +---------------+	
		...
RFP Requirements
CopyrightPrismTech,2017
RFP	Req.	# Mandatory	Requirement	Text Comment
6.5.1 Submitters	shall	define	a	DDS-XRCE	protocol	
b...
CopyrightPrismTech,2017
RFP	Req.	# Non-Mandatory	
Requirement	Text
Comment
6.6.1 Submitters	may	consider	
defining	support...
How does it compares
CopyrightPrismTech,2017
PrismTech’s
XRCE
RTI &Co XRCE
PrismTech XRCE
Efficiency Factor
Header
Size
1 Byte
12 bytes
8 bytes...
XRCE @ Work
Live Demo!
Summing Up
CopyrightPrismTech,2017
Defines the most wire/
power/memory efficient
protocol in the market to
provide DDS connectivity to...
CopyrightPrismTech,2017
Supports peer-to-peer as well as
broker-based communication
Provides reliability and
fragmentation...
CopyrightPrismTech,2017
Current prototype runs on
8-bit micro-controllers and
takes in 1 KByte of RAM
and has wire-overhea...
CopyrightPrismTech,2017
Demonstrating DDS for eXtremely Resource Constrained Environments (XRCE)
Demonstrating DDS for eXtremely Resource Constrained Environments (XRCE)
Upcoming SlideShare
Loading in …5
×

Demonstrating DDS for eXtremely Resource Constrained Environments (XRCE)

0 views

Published on

As a result of the commoditization of computing and communication technologies, an increasing number of sensing and controlling devices, appliances and gadgetware are now digitalized and connected. In most of the cases these devices, due to cost and/or power constraints are limited with respect to the computational, storage, networking and energy constraints. Most of the standard technologies for messaging and data sharing were designed for environments that did not have these limitations. As a consequence, these standards don’t deal nicely with devices that undergo aggressive sleep cycles or communicate through constrained network such as LoWPAN and LPWAN. To fill this gap, over a year ago, we started a standardization process at the Object Management Group named DDS for eXtremely Resource Constrained Devices (XRCE) with the intent of filling this gap. DDS-XRCE targets environments where devices may have very little computational power and memory, such as an Arduino Uno which has 2 Kbytes of SRAM and 32 Kbytes of FLASH, may be battery powered and may communicate through constrained networks such as 40-100 Kbps LoWPANs and the newly standardized NB-IoT.From a high-level perspective, the key requirements that a DDS-XRCE implementation has to satisfy are (1) extremely low footprint – addressing targets such as an Arduino Uno platform, (2) extremely efficient wire protocol – inducing a protocol overhead of just a few bytes over the user data, and (3) support devices that undergo aggressive sleep cycles. This presentation will (1) introduce PrismTech’s proposal for the DDS XRCE standard, (2) demonstrate analytically its extremely low wire overhead, (3) demonstrate XRCE in action and (4) explain how it compares with competing proposals.

Published in: Software
  • Be the first to comment

Demonstrating DDS for eXtremely Resource Constrained Environments (XRCE)

  1. 1. CopyrightPrismTech,2017 Angelo Corsaro, PhD Chief Technology Officer ADLINK Tech. Inc. Co-Chair, OMG DDS-SIG angelo.corsaro@adlinktech.com Erik Boasson Senior Technologist ADLINK Tech Inc. erik.boasson@adlinktech.com Demonstrating DDS-XRCE eXtremely Resource Constrained Environments
  2. 2. CopyrightPrismTech,2017 The Problem
  3. 3. CopyrightPrismTech,2017 Sensing in Smart Cities has to deal with Memory, Bandwidth and Power Constraints
  4. 4. CopyrightPrismTech,2017 Sensing in Smart Farming has to deal with Memory, Bandwidth and Power Constraints
  5. 5. CopyrightPrismTech,2017 Cost of connectivity is an issue in Oil Exploration platforms as sensing 1MByte costs over $8
  6. 6. Cost of connectivity is an issue in Smart Grids as the operator has to pay for the 2G/3G/4G data-link
  7. 7. CopyrightPrismTech,2017 Low-Power Network- Connectivity Landscape
  8. 8. CopyrightPrismTech,2017 Local/Personal-Area Networks Low Power Local/Personal Area Network have been an area of active innovations in the past several years While proprietary solution are still widely deployed, standards are starting to gain more and more market traction
  9. 9. CopyrightPrismTech,2017 Low-Power Wide-Area Networks Low-Power Wide Area Network technologies have initially emerged in unlicensed spectrum, e.g. LoRa, sigfox, and has a result have some limitations on duty-cycle LTE NB-IoT leverages 2G and 4G- gap bandwidth to provide low- power non-duty-cycle-constrained connectivity
  10. 10. CopyrightPrismTech,2017 Data-Sharing / Messaging Standards Landscape
  11. 11. CopyrightPrismTech,2017 Data Sharing Standards recommended in IoT/IIoT References Architectures and used in deployed systems were not designed for extremely resource constrained environments IoT/IIoT Standards
  12. 12. CopyrightPrismTech,2017 Some of the key limitations are the wire-overhead (all), dependency on TCP/IP (AMQP, MQTT, OPC-UA) Push- model (all), etc. IoT/IIoT Standards
  13. 13. CopyrightPrismTech,2017 CoAP is a Resource-Oriented protocol designed to deal with resource constrained environments CoAP has been designed to nicely map to HTTP Constrained Application Protocol
  14. 14. CopyrightPrismTech,2017 CoAP lacks temporal decoupling and the publish/subscribe model was added as an after-thought to the protocol CoAP has limited dynamic discovery and only supports UDP/IP CoAP provides at most reliable un- ordered delivery CoAP Limitations
  15. 15. CopyrightPrismTech,2017 Low-Power Network- Challenges
  16. 16. CopyrightPrismTech,2017 When compared with traditional network technologies, Low-Power networks have very small MTU, for instance 802.15.4 has 127 bytes As a consequence (1) wire-protocol overhead has to be reduced to the bare minimum to leave sufficient space to application data, (2) The wire overhead of IP is major and TCP/ IP is unacceptable (3) Fragmentation is necessary Small MTU
  17. 17. CopyrightPrismTech,2017 Battery powered applications are often characterised by extremely low duty cycles to ensure that the battery can last decades This means that the traditional push does not work and traditional pull incurs in unnecessary I/O and thus energy waste Low Duty Cycle
  18. 18. CopyrightPrismTech,2017 As Low Power WAN networks will become more widely deployed and used in IoT the need for reliable, ordered delivery will be driven by applications like firmware update Likewise, temporal decoupling will be essential to facilitate the provisioning of large scale systems, i.e. don’t need to wait for the device to be online for provisioning it, just assert what’s the new state is and let the system eventually propagate it Reliability
  19. 19. CopyrightPrismTech,2017 DDS-XRCE
  20. 20. Objective The goal of DDS-XRCE is to bring DDS connectivity to devices that are constrained with respect to the node resources, such as computational resources and power, as well as the network.
  21. 21. The XRCE global data space can be implemented by peers or by a network or brokers or both depending on deployment network and device constraints Architectural Model Broker XRCE App Broker Broker Broker XRCE App XRCE App XRCE App XRCE XRCE XRCE XRCEXRCE XRCE DDS-XRCE DDS-XRCE XRCE App XRCE App XRCE App DDS-XRCE XRCE App XRCE App XRCE App XRCE XRCE App Peer-2-Peer Peer-2-Peer
  22. 22. XRCE has been designed to have a trivial mapping to DDS. Thus Protocol Gateways will be easy to build in SW or HW and very efficient DDS Interoperability Broker XRCE App Broker Broker Broker XRCE App XRCE App XRCE App DDSIXRCE XRCE XRCE XRCE DDSI DDSI XRCE XRCE DDS APP DDS App DDS APP Gateway Gateway DDS-XRCE DDS-XRCE XRCE App XRCE App XRCE App DDS-XRCE XRCE App XRCE App XRCE App XRCE XRCE App Peer-2-Peer Peer-2-Peer
  23. 23. CopyrightPrismTech,2017 Scope TCP UDP IP 802.3 802.11 DDSI-RTPS DDS-XRCE XRCE Application L3: Network DCPS App App App TCP UDP IP 6LowPAN 802.15.4 BLE 2G/3G/ LTE Unspecified API App App App ... L2: Data Link L1: Physical L4: Transport DDS Application TCP UDP IP 6LowPAN 802.15.4 802.3/11 Cellular DDSI-RTPS DDS-XRCE DDS-XRCE Agent …
  24. 24. Status PrismTech has been leading the DDS-XRCE standardisation at OMG The standard will be voted next week at September 2017 OMG Meeting This presentation describes PrismTech proposal and explains why it is the submission that should be adopted!
  25. 25. XRCE-Abstractions
  26. 26. CopyrightPrismTech,2017 XRCE provides a data space abstraction in which applications can read and write data autonomously and asynchronously. The data read and written by XRCE applications is associated with one or more resources identified by a URI. Depending on the context a resource may represent a DDS topic or a DDS instance. Conceptual Model DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer R1 R2 R i Rn
  27. 27. CopyrightPrismTech,2017 An XRCE Resource is a closed description for a set of named values. If the cardinality of the set is one then we call it a Trivial Resource. It is described by means of a URI which may only include path expansions. A Trivial Resource thus corresponds to a URI without wildcards. Resource Definition -- These are Resources xrce://myhouse/**/bedroom/*/LightStatus xrce://myhouse/**/musicroom/LightStatus xrce://myhouse/**/LightStatus xrce://myhouse/** -- These are Trivial Resources xrce://myhouse/floor/1/musicroom/LightStatus xrce://myhouse/floor/2/musicroom/LightStatus xrce://myhouse/floor/2/bedroom/erik/LightStatus Note, for compactness we take the liberty of representing trivial resources by the single element that constitutes the set as opposed to the single element set.
  28. 28. CopyrightPrismTech,2017 An XRCE Resource also has a set of properties, which are name- value pairs. These are used for specifying QoS and for extensibility. For a resource X, there is a number of predefined meta-data resources for discovering child resources and properties. These are named X$ls, X$props, &c., and are handled automatically by the XRCE agents. Resource Definition Given these resources: xrce://myhouse/floor/1/musicroom/LightStatus xrce://myhouse/floor/2/musicroom/LightStatus xrce://myhouse/floor/2/bedroom/erik/LightStatus For example: Reading xrce://myhouse/floor/2$ls yields: {musicroom,bedroom}
  29. 29. CopyrightPrismTech,2017 An XRCE Selection is the conjunction of a Resource, and a Predicate over the resource content and properties. The selection’s query is separated from the resource by a “?”. A Trivial Resource has a value, therefore a selection on a Trivial Resource yields a single value or none at all. A query on a non-trivial resource may yield many values. XRCE does not prescribe a format for the value of a resource, and therefore the meaning of a query is dependent on the chosen format. If a query cannot be evaluated on the value of some resource, the result is empty. Selection xrce://myhouse/floor/2/bedroom/jeanclaude/LightStatus? xrce://myhouse/floor/*/bedroom/*/LightStatus?{luminosity>0} xrce://myhouse/floor/*/bedroom/*/LightStatus?{property.durability = transient && luminosity>0} xrce://myhouse/floor/1/musicroom/LightStatus/ID12345?{inRange(property.location, someLocation, radius)} xrce://myhouse/floor/1/musicroom/LightStatusπ{deviceId, property.location} For example: these are legal XRCE Queries
  30. 30. XRCE Protocol
  31. 31. CopyrightPrismTech,2017 The XRCE protocol specifies how the XRCE global data space can be implemented “on the wire”. XRCE Protocol
  32. 32. CopyrightPrismTech,2017 XRCE messages are all composed by a single byte header and a body. Message Structure 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|X|MessageId| +---------------+ | Body | +---------------+ R: When present, this is the reliability bit and is set to 1 for message that are intended to be reliable S: When present, this is the synchronicity bit and is set to 1 to indicate synchronous messages requiring the receiving party to respond immediately X: An extension bit used by some messages to indicate additional fields are present
  33. 33. CopyrightPrismTech,2017 Messages can be “decorated” by prefixing them with certain markers. A message together with its decoration shall be treated as an atomic unit on the network. In this version of the protocol, the only markers are Migrate, Conduit and Frag When a message is decorated with multiple markers, these markers shall occur in the order: • Migrate • Conduit • Frag Message Markers
  34. 34. CopyrightPrismTech,2017 XRCE always uses little-endian for its data and primarily uses variable-length encoding (VLE) to save in the common cases VLE is a value-based encoding, agnostic to the word size used to represent the number in memory and encodes 7 bits per byte Encoding [0016 .. 7f16] [8016 .. ff16] ; [0016 .. 7f16] [8016 .. ff16] ; [8016 .. ff16] ; [0016 .. 7f16] &c. 0 .. 27-1 27 .. 214-1 214 .. 221-1 &c. ⬄
  35. 35. CopyrightPrismTech,2017 The source address of each message is assumed to be a unique address of the sender. Data sent to such an address will in principle arrive at the sender (or be lost). Each node has a unique ID (e.g., a UUID) that remains the same even when it changes network address. The ID is only exchanged for session establishment. Addressing
  36. 36. CopyrightPrismTech,2017 XRCE is a modular protocol that allows implementation to decide which subset of the protocol to implement so to minimise resource usage and retaining interoperability Protocol Modules Discovery Query Core
  37. 37. CopyrightPrismTech,2017 Discovery. The discovery module allows application to dynamically discover each other and exchange entities declarations. • SCOUT, HELLO, KEEPALIVE, PING, PONG • DECLARE: PUB, SUB, COMMIT, RESULT Query. The query profile allows applications to execute queries over resources. • DECLARE: RESOURCE, SELECTION, BIND Core. The core profile defines the session establishment and the data exchange. •OPEN, ACCEPT, CLOSE, •WDATA, SDATA, BDATA •PULL Protocol Modules Discovery Query Core
  38. 38. XRCE Protocol SCOUTING
  39. 39. CopyrightPrismTech,2017 Scouting is the discovery of other nodes in the network. If the transport has its own discovery (Bluetooth for example), the scouting phase may be skipped. Scouting
  40. 40. CopyrightPrismTech,2017 Scout is a request for other nodes in the network to send a Hello. MASK encodes the type: broker, durability, peer, client, … it is requesting a response from. Hello informs nodes of locators, properties. MASK encodes the type of the node itself. The locators allow a node to specify additional addresses at which it is reachable, e.g., multicast addresses. When a client sends “SCOUT broker” brokers would respond with HELLO. Armed with this knowledge, the client can try to open a session with a broker. Scout and Hello 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|X| SCOUT | +-+-+-+-+-+-+-+-+ ~ Mask ~ +-+-+-+-+-+-+-+-+ b0: Broker b1: Durability b2: Peer b3: Client b4-b13: Reserved 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|P| HELLO | +---------------+ ~ MASK ~ +---------------+ ~ [Locator] ~ +---------------+ ~ [Property] ~ +---------------+ P is set iff properties present
  41. 41. XRCE Protocol SESSION MANAGEMENT
  42. 42. CopyrightPrismTech,2017 For two nodes to communicate in XRCE, they need to establish a session. With a session comes the ability to publish or subscribe. Included in the session are conduits, pairs of logical reliable and best-effort channels for data. A “client” typically only needs a single session, with its broker. In mesh networks, it is expected that brokers would typically need sessions with other brokers as well. The conduits can be implemented over any transport, e.g., TCP (would make sense in client/broker over Ethernet), unicast/multicast UDP (e.g., peer-to- peer), Bluetooth, … Session Management
  43. 43. CopyrightPrismTech,2017 Opening a Session
  44. 44. CopyrightPrismTech,2017 Open is a request to establish a session. • VMAJ/VMIN is protocol version • PID is the requesting node’s unique id (PID is short for peer id) • lease_period is the lease duration expression in units of 100ms • auth is a sequence of bytes for authentication data • The locators provide additional locators useful for asymmetric discovery • seqNumLen is present when L=1 and represents the number of bytes used to represent sequence numbers for this session Opening a Session 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|L| OPEN | +-------+-------+ | VMaj | VMin | +-------+-------+ ~ PID ~ +---------------+ ~ lease ~ +---------------+ ~ auth ~ +---------------+ ~ locators ~ +---------------+ | seqNumLen | +---------------+
  45. 45. CopyrightPrismTech,2017 Accept is the successful response to an Open. • OPID is the requesting node’s unique id • APID is the accepting node’s unique id • lease_period is the lease duration expression in units of 100ms • auth is a sequence of bytes for authentication data Opening a session 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |0|1|0| ACCEPT | +---------------+ ~ OPID ~ +---------------+ ~ APID ~ +---------------+ ~ lease_period ~ +---------------+ ~ auth ~ +---------------+
  46. 46. CopyrightPrismTech,2017 To reject a request for opening a session and to explicitly close an existing session, a Close message is used. • OPID is the sending node’s unique id • APID is the other node’s unique id • Reason is a one byte code for the reason: Rejecting or closing a session 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |0|1|0| CLOSE | +---------------+ ~ OPID ~ +---------------+ ~ APID ~ +---------------+ | Reason | +---------------+ • 0: success • 1: invalid authen2ca2on data • 2: unsupported protocol (version) • 3: out of resources • 4: unsupported sequence number length • 5: unsupported parameter (e.g., lease, locators, peer id, subscrip2on mode) • 6: incompa2ble pre-commiEed declara2on • 255: generic error
  47. 47. CopyrightPrismTech,2017 To reject a request for opening a session and to explicitly close an existing session, a Close message is used. - PID is the sending node’s unique id - Reason is a one byte code for the reason Session FSM
  48. 48. XRCE Protocol DECLARATIONS
  49. 49. CopyrightPrismTech,2017 Resources, publications, subscriptions, selections all need to be declared before one can publish or read/receive data. Declarations are buffered until committed — unless a commit flag is specified. Resources may be declared multiple times, but they may also be declared once and then used by everyone. Combined with the numerical ids for the resources, this allows small clients to use only a few small messages to declare their publications/ subscriptions. Declarations
  50. 50. CopyrightPrismTech,2017 Resources and Selections are uniquely identified by numerical ids to save space on the wire. The relationship between a Resource ID and a Resource is established when declaring a resource. Resource IDs are global, everyone in the XRCE domain must use the same mapping of ID to Resource. RIDs are positive, even integers. Resource IDs
  51. 51. CopyrightPrismTech,2017 Subscribing to a trivial resource can be done using the Resource ID. Subscribing to a more complicated selection requires choosing a Selection ID. Applications can each define their own selections, so these are in principle local to the session. This allows a broker to send just the data matching the selection to a client, relieving the client from knowing all the matching resource ids and performing the matching itself. When a broker is pushing data to multiple clients the Selection IDs may be different even for the same selection. The broker would then have to send the data multiple times, even if the clients support multicast. Hence we allow rebinding Selection IDs. Selection IDs
  52. 52. CopyrightPrismTech,2017 The general Declare message is a container for a list of Declarations. • it is always reliable • SN is sequence number Note that it is very similar to regular data. The use of a separate message kind avoids the use of predefined resource ids. Declare message 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|S| DECLARE | +---------------+ ~ SN ~ +---------------+ ~ [Declaration] ~ +---------------+
  53. 53. CopyrightPrismTech,2017 This declares that (numerical) resource id RID corresponds to Resource. Resource need not be trivial. • P=1 iff properties present • F=1 implies the resource should be forgotten • The properties are a sequence of name-value pairs • In the absence of properties, the resource has a default QoS, corresponding to DDS reliable, keep- last-1, volatile Resource Declaration 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|F|P| RESOURCE| +---------------+ ~ RID ~ +---------------+ ~ Resource ~ +---------------+ ~ [Property] ~ +---------------+
  54. 54. CopyrightPrismTech,2017 This declares the sender as a publisher of values for the Resource/Selection identified by RID/SID, or cancels a previous declaration. • P is set iff properties are included • F is 0 if it is a declaration, 1 if it is the cancellation of a declaration Publication Declaration 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|F|P| PUB | +---------------+ ~ RID | SID ~ +---------------+ ~ [Property] ~ +---------------+
  55. 55. CopyrightPrismTech,2017 This declares a subscription to the resource/selection identified by RID/SID. 
 SubMode determines whether it is a pull/push/ periodic pull/periodic push/push-pull subscriber. Periodic push tells the publisher that the subscriber will listen for data every X seconds; periodic pull that it will request data every X seconds. Push-pull means a notification of data is pushed, but the data itself is not. • P is set iff properties are included • C is 0 if it a subscription is taken, 1 if it is being cancelled Subscription Declaration 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|F|P| SUB | +---------------+ ~ RID | SID ~ +---------------+ ~ SubMode ~ +---------------+ ~ [Property] ~ +---------------+
  56. 56. CopyrightPrismTech,2017 This declares a selection (i.e., a query) and associates it with a Selection ID. To actually subscribe to a selection, one must still send a Sub declaration. • P is set iff properties are given • G is set iff SID is a global identifier for this selection, rather than one bound to this session Declare: Selection 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |G|F|P|SELECTION| +---------------+ ~ SID ~ +---------------+ ~ Query ~ +---------------+ ~ [Property] ~ +---------------+
  57. 57. CopyrightPrismTech,2017 This defines a new binding for the given selection, i.e., an alias for the old selection ID. This allows the sender to use NewXID instead of OldXID. Its primary purpose is to allow multicast push to clients that chose different IDs for the same selection. • G is set iff the NewXID is a global id (similar to G in Selection declaration). Declare: Selection ID binding 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |G|X|X| IDBIND | +---------------+ ~ OldXID ~ +---------------+ ~ NewXID ~ +---------------+
  58. 58. XRCE Protocol Data Exchange
  59. 59. CopyrightPrismTech,2017 All data messages and declarations are transported over a conduit, which is a pair of a reliable and a best-effort channel in a session. Multiple conduits may be used in parallel, to avoid head-of-line blocking and to allow multicasting across session in addition within a session. The default conduit 0 is used unless messages are prefixed with a special Conduit message. Conduits
  60. 60. CopyrightPrismTech,2017 Best-Effort Channel Specification
  61. 61. CopyrightPrismTech,2017 The best-effort channel implementation is relatively straight forward. The XRCE runtime has to make a reasonable effort to send the message over the associated transport and ensure that messages, whilst may be dropped, shall never be delivered to receive out of order. Best-effort Channel Implementation
  62. 62. CopyrightPrismTech,2017 Reliable Channel Specification
  63. 63. CopyrightPrismTech,2017 The Petri Net describes the behaviour of a Reliable Channel with a buffer of n places. It is worth to mention that the specification assumes that a NACK can only be received for the head of the queue. This may seem a restriction, but in reality it only means that when receiving a NACK for message with sequence number k the previous messages have been acknowledged. Reliable Channel Behaviour
  64. 64. CopyrightPrismTech,2017 Conduit is used to specify that the next messages in the packet (or the next message for non-packet-based transports) are sent over conduit CID instead of over the default conduit. Z=1 implies a compact representation where HL bits encode Id-1, i.e. 00 => Id = 1 Conduit selection 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |Z|H|L| CONDUIT | +---------------+ ~ Id ~ +-+-+-+-+-+-+-+-+
  65. 65. CopyrightPrismTech,2017 The migrate market is used to migrate a resource from a conduit to another while maintaining reliability and ordered delivery Conduit Migration 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|X| MIGRATE | +---------------+ | cid | -- the old conduit id +-+-+-+-+-+-+-+-+ ~ lastSN ~ -- the sequence number +-+-+-+-+-+-+-+-+ of the last sample for the resource sent on the old conduit
  66. 66. CopyrightPrismTech,2017 Synch is used to inform the recipient of the range of sequence numbers available for retransmission on the reliable channel of the conduit. It also allows informing a late joiner of the current sequence number in the channel. • R=1 indicates the reliable channels, otherwise the best-effort channel • SN is the next sequence number used for a message on this channel. • If U=1 then N>0 is the number of messages available If S=1 is set, requires an immediate ACK/ACKNACK response. Synchronising a Conduit 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |U|R|S| SYNCH | +---------------+ ~ SN ~ +---------------+ | N | +---------------+
  67. 67. CopyrightPrismTech,2017 ACKNACK with M=0 (no mask) is used to acknowledge all reliable messages on conduit CID up to but not including SN. ACKNACK with M=1 (mask included) is used to acknowledge all reliable messages on conduit CID up to but not including SN, and furthermore request a retransmission of message number SN and those for which a bit is set in Mask. Bit 0 in Mask corresponds to SN+1, Bit 1 to SN+2, &c. ACK/NACK 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |0|0|M| ACKNACK | +---------------+ ~ SN ~ +---------------+ ~ Mask ~ +---------------+
  68. 68. Writing Data
  69. 69. CopyrightPrismTech,2017 XRCE allows writing a resource w/o any kind of prior registration or discovery The cost of this abstraction is that the full-resource name has to be sent on the wire One Shot Write 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|R|S| WDATA | +---------------+ ~ SN ~ +---------------+ ~ Resource ~ +---------------+ ~ Payload ~ +---------------+
  70. 70. CopyrightPrismTech,2017 XRCE provides built-in support for very efficiently sending a sample or a batch of samples. Notice that for a single sample the minimum overhead is of only 3 bytes protocol headers and 1 byte message length => 4 bytes minimum overhead - A is set iff PRID is present - PRID is the ID of the trivial resource for which this is a value, for cases where a selection is used, so that the subscriber knows the resource the data belongs to for BDATA, P set => a sequence of (RID, Payload) pairs, else just a sequence of Payloads. Note that these forms are the only messages for streaming data, and are also used for the response to a pulling read. Streaming Write 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |A|R|S| SDATA | +---------------+ ~ SN ~ +---------------+ ~ RID | SID ~ +---------------+ ~ PRID ~ +---------------+ ~ Payload ~ +---------------+ 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |A|R|S| BDATA | +---------------+ ~ SN ~ +---------------+ ~ RID | SID ~ +---------------+ ~[RID,[Payload]]~ +---------------+
  71. 71. CopyrightPrismTech,2017 Fragmentation 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|N|X| FRAG | +-+-+-----------+ ~ SN-Base ~ +---------------+ ~ Total-Frags ~ +---------------+ XRCE needs to support small MTUs, therefore, it needs to automatically fragment larger payloads. Fragmentation in XRCE is done by prefixing a WDATA or SDATA with a small message (in the same packet) • SN-Base is first sequence number of fragmented payload, present only if N=1 • N=1 indicates that the total number of fragments following this packet is known. • fragments must be ~MTU large
  72. 72. Reading Data
  73. 73. CopyrightPrismTech,2017 Pulling Data 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|S|N| PULL | +---------------+ ~ SN ~ +---------------+ ~ RID | SID ~ +---------------+ ~ PullID ~ +---------------+ ~ MaxSamples ~ +---------------+ XRCE supports both push and pull modes. In a pull mode, the broker maintains the data and the client explicitly pulls the data towards it. • Pull is always reliable • N is set iff PullID and MaxSamples present • PullID is “like” a cursor in an RDMS, MaxSamples is the maximum number of samples to be returned at a time. A second Pull with the same ID will continue enumerating data from the set. The combination of PullID and N allow allowing iterating through large data sets in nested loops.
  74. 74. RFP Requirements
  75. 75. CopyrightPrismTech,2017 RFP Req. # Mandatory Requirement Text Comment 6.5.1 Submitters shall define a DDS-XRCE protocol between a Client and an Agent. This submission defines a protocol that can be used between a client and a broker/agent, between peers as well as a broker-to-broker protocol. 6.5.2 The DDS-XRCE protocol shall allow DDS-XRCE clients to be perceived by DDS Participants as at least minimum profile DDS Participants. This submission allows to expose to DDS functionalities compatible with the minimum, the durability and the content awareness profile. 6.5.3 DDS-XRCE protocol overhead, when sending or receiving user data, shall not exceed 24 bytes per packet. This submission has an overhead of 4 bytes for non- batched data. When sending a batch of n samples then the overhead reduces to (n+3)/n. As a consequence, the submission not only meets but greatly improves the bound posed by the RFP. It is also worth mentioning that several industrial customers that had provided requirements for XRCE had requested a wire-overhead smaller than 7 bytes – as this is what they experience today with Modbus TCP/IP. This submission meets the needs of this industrial sector represented by manufacturing and smart grids. 6.5.4 Submissions shall address clients operating with sleep/wakeup periods. This submission provides rich support for clients that undergo aggressive sleep cycles by providing several reader modes, such as push, pull, periodic-push, periodic-pull and push-pull. 6.5.5 Submissions shall define the DDS-XRCE protocol for the UDP/IP transport. The submission specifies a protocol for any kind of best- effort message-oriented transport, UDP/IP being one of those. 6.5.6 Submissions shall define the DDS-XRCE protocol for the TCP/IP transport. The submission specifies how to deal with transport that don’t preserve with message boundaries, such as TPC/IP, but equally any other stream oriented transport.
  76. 76. CopyrightPrismTech,2017 RFP Req. # Non-Mandatory Requirement Text Comment 6.6.1 Submitters may consider defining support for transparent user payload compression This can be easily added between the user API and the protocol. We don’t think that this feature belongs to the protocol. 6.6 .2 Submitters may consider defining a custom mapping to IEEE 802.15.4 that does not rely on IP. The submission does not leverage anything specific concerning IP, thus the protocol as is can be implemented over IEEE 802.15.4. As a side note the submitter have implemented the protocol over UDP/IP as well as over Bluetooth Low Energy. 6.6.3 Submissions may define the use of the TCP/IP transport mapping over HTML5 WebSockets. The submission can be used as it on binary WebSockets.
  77. 77. How does it compares
  78. 78. CopyrightPrismTech,2017 PrismTech’s XRCE RTI &Co XRCE PrismTech XRCE Efficiency Factor Header Size 1 Byte 12 bytes 8 bytes message header + 4 bytes sub message header 12x Write Wire Overhead 4 bytes 16 bytes 4x Read Wire Overhead 4 Bytes 24 bytes 6x Wire Overhead
  79. 79. XRCE @ Work
  80. 80. Live Demo!
  81. 81. Summing Up
  82. 82. CopyrightPrismTech,2017 Defines the most wire/ power/memory efficient protocol in the market to provide DDS connectivity to extremely constrained targets DDS-XRCE eXtremely Resource Constrained Environments DDS (DDS-XRCE) TCP UDP IP 802.3 802.11 DDSI-RTPS DDS-XRCE XRCE Application DCPS pp App App TCP UDP IP 6LowPAN 802.15.4 BLE 2G/3G/ LTE Unspecified API App App App ... DDS Application TCP UDP IP 6LowPAN 802.15.4 802.3/11 Cellular DDSI-RTPS DDS-XRCE DDS-XRCE Agent …
  83. 83. CopyrightPrismTech,2017 Supports peer-to-peer as well as broker-based communication Provides reliability and fragmentation above packet- oriented best-effort transports Can leverage multicast DDS-XRCE TCP UDP IP 802.3 802.11 DDSI-RTPS DDS-XRCE XRCE Application DCPS pp App App TCP UDP IP 6LowPAN 802.15.4 BLE 2G/3G/ LTE Unspecified API App App App ... DDS Application TCP UDP IP 6LowPAN 802.15.4 802.3/11 Cellular DDSI-RTPS DDS-XRCE DDS-XRCE Agent …
  84. 84. CopyrightPrismTech,2017 Current prototype runs on 8-bit micro-controllers and takes in 1 KByte of RAM and has wire-overhead of 4 bytes for data samples DDS-XRCE TCP UDP IP 802.3 802.11 DDSI-RTPS DDS-XRCE XRCE Application DCPS pp App App TCP UDP IP 6LowPAN 802.15.4 BLE 2G/3G/ LTE Unspecified API App App App ... DDS Application TCP UDP IP 6LowPAN 802.15.4 802.3/11 Cellular DDSI-RTPS DDS-XRCE DDS-XRCE Agent …
  85. 85. CopyrightPrismTech,2017

×