SlideShare a Scribd company logo
©2017 Real-Time Innovations,
Inc.
Tutorial: DDS first steps with Connector
Javier Povedano, PhD.
javier@rti.com
Real-Time Innovations Inc.
©2017 Real-Time Innovations,
Inc.
Agenda
• DDS
• Connector
• Setup your environment
• Hands On!
– Publishing/Subscribing to Data
– Data Filtering
– High-Availability
– Late joiners
– Partitions
©2017 Real-Time Innovations,
Inc.
DDS Shapes Demo
https://www.rti.com/downloads/shapes-demo
©2017 Real-Time Innovations,
Inc.
What is Connector?
• Simple API for Data-Centric Publish/Subscribe
– Built on top of DDS
– Very few methods
– Experimental
• Scripting language bindings
– node.js, python, nodered
• Prototyping
– Entities and QoS configured by XML
©2017 Real-Time Innovations,
Inc.
2016 © Real-Time Innovations Inc.
Classical DDS Workflow
IDL/XML
struct Position2D {
long id; //@key
double x;
double y;
};
Code
Generation
struct Temp {
long id;
//@key
double
value;
};
struct Temp {
long id;
//@key
double
value;
};
#include <...>
define Position2D;
Pos2DWriter::write
Pos2DReader::read
C/C++/Java/C#
<xml QoS>
QoS Settings
Type
Definition
Code ready to be built in +50 architectures: Linux, Windows,
VxWorks, Integrity….
This process can be simplified even more: RTI
Prototyper/Connector
©2017 Real-Time Innovations,
Inc.
Connector Workflow
Python/Lua/NodeJS
Interpreter
<xml QoS>
<types>
<scenario description>
Python/Lua/NodeJS
script
©2017 Real-Time Innovations,
Inc.
Input
Data Port
(DataReader+)Output
Data Port
(DataWriter+)
DDS Connector Input & Output ports
Connector (DomainParticipant+)
output()
write() / dispose() /
unregister()
clear_members()
instance
input()
wait() / on()
read() / take()
samples[]
config.xml
User
Defined
Structure
XML Config
©2017 Real-Time Innovations,
Inc.
2016 © Real-Time Innovations Inc.
Anatomy of a Publisher in Connector
1. connector =
rti.Connector("MyParticipantLibrary::Sensor",'Tutorial.xml')
2. writer = connector.getOutput("TempPublisher::TempWriter")
3. writer.instance.setString('id', sensor.id)
4. writer.write()
1. Create a connector
2. Get the DataWriter
3. Set the instance values
4. Write the value
©2017 Real-Time Innovations,
Inc.
2016 © Real-Time Innovations Inc.
Anatomy of a Subscriber in Connector
1. connector = rti.Connector("MyParticipantLibrary::Sensor", 'Tutorial.xml')
2. reader = connector.getInput("TempPublisher::TempWriter")
3. reader.read()
4. for i in nsamples:
if reader.infos.isvalid(i)
sample = reader.samples.getDictionary(i)
1. Create a connector
2. Get the datareader
3. Read/Take the value
4. Iterate for all the samples
a. if is valid
i. get the sample
©2017 Real-Time Innovations,
Inc.
Setup
Installing the tutorial
> git clone https://github.com/jpovedano/dds-firststeps
> ./setup
In each terminal:
> . rticonnectenv/bin/activate
©2017 Real-Time Innovations,
Inc.
Let's Rock!
Hands On Exercise
©2017 Real-Time Innovations,
Inc.
About the examples
• Temperature sensor scenario
– Sensors (publishers)
• Publish temperature data every
second
– Console (suscribers)
• Shows a table with data being
published
• Configured by XML
– Tutorial.xml
• Define the DDS entities and their QoS
settings
struct Sensor {
string id; //@key
long value;
long timestamp;
};
©2017 Real-Time Innovations,
Inc.
Anatomy of the XML
1. QoS Library
a. QoS Settings
2. Types
a. Type Definition
3. Domain Library
a. Domains and Topics
4. Participant Library
a. DDS Entities hierarchy
<!-- Qos Library -->
<qos_library name="QosLibrary">
<qos_profile name="DefaultProfile" is_default_qos="true">
<participant_qos>
<transport_builtin>
<!-- <mask>UDPV4 | SHMEM</mask>-->
<mask> SHMEM</mask>
</transport_builtin>
</participant_qos>
<datareader_qos>
<!-- Modify reader values here -->
</datareader_qos>
</qos_profile>
</qos_library>
©2017 Real-Time Innovations,
Inc.
Anatomy of the XML
1. QoS Library
a. QoS Settings
2. Types
a. Type Definition
3. Domain Library
a. Domains and Topics
4. Participant Library
a. DDS Entities hierarchy
<types>
<struct name="Sensor" extensibility="extensible">
<member name="id" stringMaxLength="128" id="0" type="string"
key="true"/>
<member name="value" id="1" type="long"/>
<member name="timestamp" id="2" type="long"/>
</struct>
</types>
©2017 Real-Time Innovations,
Inc.
Anatomy of the XML
1. QoS Library
a. QoS Settings
2. Types
a. Type Definition
3. Domain Library
a. Domains and Topics
4. Participant Library
a. DDS Entities hierarchy
<!-- Domain Library -->
<domain_library name="MyDomainLibrary">
<domain name="MyDomain" domain_id="0">
<register_type name="Sensor" kind="dynamicData"
type_ref="Sensor"/>
<topic name="Temperature" register_type_ref="Sensor"/>
</domain>
</domain_library>
©2017 Real-Time Innovations,
Inc.
Anatomy of the XML
1. QoS Library
a. QoS Settings
2. Types
a. Type Definition
3. Domain Library
a. Domains and Topics
4. Participant Library
a. DDS Entities hierarchy
<!-- Participant library -->
<participant_library name="MyParticipantLibrary">
<domain_participant name="Console"
domain_ref="MyDomainLibrary::MyDomain">
<subscriber name="TempSubscriber">
<data_reader name="TempReader" topic_ref="Temperature"/>
</subscriber>
</domain_participant>
<domain_participant name="Sensor"
domain_ref="MyDomainLibrary::MyDomain">
<publisher name="TempPublisher">
<data_writer name="TempWriter" topic_ref="Temperature"/>
</publisher>
</domain_participant>
</participant_library>
©2017 Real-Time Innovations,
Inc.
Example 1: Basic pub/sub
• Goal
– In this example we show how to publish data
– Learn differences between read/take
– Learn how to change QoS settings in Connector
• Documentation:
– QoS Policy Reference Guide (cheat-sheet)
©2017 Real-Time Innovations,
Inc.
Example 2: Filtering
• Goal
– Learn how to filter data per subscriber
• Description
– The console application will only receive the data matching a
certain criteria
• Two types of Filtering:
– Content Based
• Use a filter with SQL Expression
– Time Based
• time_based_filter QoS
©2017 Real-Time Innovations,
Inc.
Example 3: High availability
• Goal
– Learn how to add robustness using DDS QoS
• Description
– Adding a backup sensor that substitute the primary sensor in case
of failure
• QoS:
– Liveliness
– Ownership
– Ownership strength
©2017 Real-Time Innovations,
Inc.
Example 4: Durability
• Goal
– Learn how to provide recent history to late joiners
• Description
– A console application will receive the recent history published
before it was started
• QoS:
– Durability QoS
©2017 Real-Time Innovations,
Inc.
Example 5: Data Isolation/Partition
• Goal
– Learn how to isolate publishers and subscribers within the same
domain
• Description
– A console application will receive sensor updates only for
subscribers in certain zones
• QoS:
– Partition QoS
©2017 Real-Time Innovations,
Inc.
Example 6
• Goal
– create your own distributed application and share it with the
community
• Description
– Let your imagination fly!
• References
– XML Application creation
©2017 Real-Time Innovations,
Inc.
Thanks for your attention!

More Related Content

PDF
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
PPTX
KubeCon EU 2019 "Securing Cloud Native Communication: From End User to Service"
PDF
Lessons learned from writing over 300,000 lines of infrastructure code
PPTX
DEVNET-1140 InterCloud Mapreduce and Spark Workload Migration and Sharing: Fi...
PDF
Cloud for Kubernetes : Session3
PPTX
Sanger, upcoming Openstack for Bio-informaticians
PPT
10 Things you didn't know about Cloud Platforms: AWS, GAE, Azure
PPTX
Introducing SciaaS @ Sanger
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
KubeCon EU 2019 "Securing Cloud Native Communication: From End User to Service"
Lessons learned from writing over 300,000 lines of infrastructure code
DEVNET-1140 InterCloud Mapreduce and Spark Workload Migration and Sharing: Fi...
Cloud for Kubernetes : Session3
Sanger, upcoming Openstack for Bio-informaticians
10 Things you didn't know about Cloud Platforms: AWS, GAE, Azure
Introducing SciaaS @ Sanger

What's hot (16)

PPT
How to Protect Big Data in a Containerized Environment
PDF
The Data Mullet: From all SQL to No SQL back to Some SQL
PPT
Deploying Big-Data-as-a-Service (BDaaS) in the Enterprise
PPTX
Distributed Database DevOps Dilemmas? Kubernetes to the Rescue
PPTX
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
PPTX
Apache Spark and Apache Ignite: Where Fast Data Meets the IoT
PPTX
Implementing blue-green deployment with Atlassian Bamboo
PDF
Infrastructure-as-code: bridging the gap between Devs and Ops
KEY
OpenStack Report
PDF
Kubernetes stack reliability
PDF
Cloud for Kubernetes : Session4
PDF
Joyent Cloud Advantages
PPTX
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
PPTX
In-Memory Computing Essentials for Architects and Engineers
PPTX
Orchestration & provisioning
PPTX
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
How to Protect Big Data in a Containerized Environment
The Data Mullet: From all SQL to No SQL back to Some SQL
Deploying Big-Data-as-a-Service (BDaaS) in the Enterprise
Distributed Database DevOps Dilemmas? Kubernetes to the Rescue
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
Apache Spark and Apache Ignite: Where Fast Data Meets the IoT
Implementing blue-green deployment with Atlassian Bamboo
Infrastructure-as-code: bridging the gap between Devs and Ops
OpenStack Report
Kubernetes stack reliability
Cloud for Kubernetes : Session4
Joyent Cloud Advantages
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
In-Memory Computing Essentials for Architects and Engineers
Orchestration & provisioning
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
Ad

Similar to DDS tutorial with connector (20)

PPTX
Distributed Systems: How to connect your real-time applications
PDF
Deep Dive into the OPC UA / DDS Gateway Specification
PPTX
Fiware: Connecting to robots
PPTX
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
PPTX
Developing Mission-Critical Avionics and Defense Systems with Ada and DDS
PDF
The Data Distribution Service Tutorial
PDF
RTI Connext 5.1.0
PPTX
Fiware - communicating with ROS robots using Fast RTPS
PDF
Introduction to DDS: Context, Information Model, Security, and Applications.
PPTX
Introduction to DDS
PDF
Industrial Internet of Things: Protocols an Standards
PDF
RTI DDS Intro with DDS Secure
PPTX
Connext DDS Professional 5.1.0 Overview
PPTX
Data Distribution Service Security and the Industrial Internet of Things
PPTX
Fast RTPS Workshop at FIWARE Summit 2018
PDF
Build Safe & Secure Distributed Systems - RTI Huntsville Roadshow- 2014 09 25
PPTX
Web Enabled DDS - London Connext DDS Conference
PPTX
7 DDS Innovations to Improve your Next Distributed System
PDF
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
PPT
RTI Data-Distribution Service (DDS) Master Class 2011
Distributed Systems: How to connect your real-time applications
Deep Dive into the OPC UA / DDS Gateway Specification
Fiware: Connecting to robots
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
Developing Mission-Critical Avionics and Defense Systems with Ada and DDS
The Data Distribution Service Tutorial
RTI Connext 5.1.0
Fiware - communicating with ROS robots using Fast RTPS
Introduction to DDS: Context, Information Model, Security, and Applications.
Introduction to DDS
Industrial Internet of Things: Protocols an Standards
RTI DDS Intro with DDS Secure
Connext DDS Professional 5.1.0 Overview
Data Distribution Service Security and the Industrial Internet of Things
Fast RTPS Workshop at FIWARE Summit 2018
Build Safe & Secure Distributed Systems - RTI Huntsville Roadshow- 2014 09 25
Web Enabled DDS - London Connext DDS Conference
7 DDS Innovations to Improve your Next Distributed System
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
RTI Data-Distribution Service (DDS) Master Class 2011
Ad

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
top salesforce developer skills in 2025.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPT
Introduction Database Management System for Course Database
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Introduction to Artificial Intelligence
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
medical staffing services at VALiNTRY
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Digital Systems & Binary Numbers (comprehensive )
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
top salesforce developer skills in 2025.pdf
ai tools demonstartion for schools and inter college
Adobe Illustrator 28.6 Crack My Vision of Vector Design
wealthsignaloriginal-com-DS-text-... (1).pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Introduction Database Management System for Course Database
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PTS Company Brochure 2025 (1).pdf.......
Introduction to Artificial Intelligence
2025 Textile ERP Trends: SAP, Odoo & Oracle
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Wondershare Filmora 15 Crack With Activation Key [2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
medical staffing services at VALiNTRY
Embracing Complexity in Serverless! GOTO Serverless Bengaluru

DDS tutorial with connector

  • 1. ©2017 Real-Time Innovations, Inc. Tutorial: DDS first steps with Connector Javier Povedano, PhD. javier@rti.com Real-Time Innovations Inc.
  • 2. ©2017 Real-Time Innovations, Inc. Agenda • DDS • Connector • Setup your environment • Hands On! – Publishing/Subscribing to Data – Data Filtering – High-Availability – Late joiners – Partitions
  • 3. ©2017 Real-Time Innovations, Inc. DDS Shapes Demo https://www.rti.com/downloads/shapes-demo
  • 4. ©2017 Real-Time Innovations, Inc. What is Connector? • Simple API for Data-Centric Publish/Subscribe – Built on top of DDS – Very few methods – Experimental • Scripting language bindings – node.js, python, nodered • Prototyping – Entities and QoS configured by XML
  • 5. ©2017 Real-Time Innovations, Inc. 2016 © Real-Time Innovations Inc. Classical DDS Workflow IDL/XML struct Position2D { long id; //@key double x; double y; }; Code Generation struct Temp { long id; //@key double value; }; struct Temp { long id; //@key double value; }; #include <...> define Position2D; Pos2DWriter::write Pos2DReader::read C/C++/Java/C# <xml QoS> QoS Settings Type Definition Code ready to be built in +50 architectures: Linux, Windows, VxWorks, Integrity…. This process can be simplified even more: RTI Prototyper/Connector
  • 6. ©2017 Real-Time Innovations, Inc. Connector Workflow Python/Lua/NodeJS Interpreter <xml QoS> <types> <scenario description> Python/Lua/NodeJS script
  • 7. ©2017 Real-Time Innovations, Inc. Input Data Port (DataReader+)Output Data Port (DataWriter+) DDS Connector Input & Output ports Connector (DomainParticipant+) output() write() / dispose() / unregister() clear_members() instance input() wait() / on() read() / take() samples[] config.xml User Defined Structure XML Config
  • 8. ©2017 Real-Time Innovations, Inc. 2016 © Real-Time Innovations Inc. Anatomy of a Publisher in Connector 1. connector = rti.Connector("MyParticipantLibrary::Sensor",'Tutorial.xml') 2. writer = connector.getOutput("TempPublisher::TempWriter") 3. writer.instance.setString('id', sensor.id) 4. writer.write() 1. Create a connector 2. Get the DataWriter 3. Set the instance values 4. Write the value
  • 9. ©2017 Real-Time Innovations, Inc. 2016 © Real-Time Innovations Inc. Anatomy of a Subscriber in Connector 1. connector = rti.Connector("MyParticipantLibrary::Sensor", 'Tutorial.xml') 2. reader = connector.getInput("TempPublisher::TempWriter") 3. reader.read() 4. for i in nsamples: if reader.infos.isvalid(i) sample = reader.samples.getDictionary(i) 1. Create a connector 2. Get the datareader 3. Read/Take the value 4. Iterate for all the samples a. if is valid i. get the sample
  • 10. ©2017 Real-Time Innovations, Inc. Setup Installing the tutorial > git clone https://github.com/jpovedano/dds-firststeps > ./setup In each terminal: > . rticonnectenv/bin/activate
  • 11. ©2017 Real-Time Innovations, Inc. Let's Rock! Hands On Exercise
  • 12. ©2017 Real-Time Innovations, Inc. About the examples • Temperature sensor scenario – Sensors (publishers) • Publish temperature data every second – Console (suscribers) • Shows a table with data being published • Configured by XML – Tutorial.xml • Define the DDS entities and their QoS settings struct Sensor { string id; //@key long value; long timestamp; };
  • 13. ©2017 Real-Time Innovations, Inc. Anatomy of the XML 1. QoS Library a. QoS Settings 2. Types a. Type Definition 3. Domain Library a. Domains and Topics 4. Participant Library a. DDS Entities hierarchy <!-- Qos Library --> <qos_library name="QosLibrary"> <qos_profile name="DefaultProfile" is_default_qos="true"> <participant_qos> <transport_builtin> <!-- <mask>UDPV4 | SHMEM</mask>--> <mask> SHMEM</mask> </transport_builtin> </participant_qos> <datareader_qos> <!-- Modify reader values here --> </datareader_qos> </qos_profile> </qos_library>
  • 14. ©2017 Real-Time Innovations, Inc. Anatomy of the XML 1. QoS Library a. QoS Settings 2. Types a. Type Definition 3. Domain Library a. Domains and Topics 4. Participant Library a. DDS Entities hierarchy <types> <struct name="Sensor" extensibility="extensible"> <member name="id" stringMaxLength="128" id="0" type="string" key="true"/> <member name="value" id="1" type="long"/> <member name="timestamp" id="2" type="long"/> </struct> </types>
  • 15. ©2017 Real-Time Innovations, Inc. Anatomy of the XML 1. QoS Library a. QoS Settings 2. Types a. Type Definition 3. Domain Library a. Domains and Topics 4. Participant Library a. DDS Entities hierarchy <!-- Domain Library --> <domain_library name="MyDomainLibrary"> <domain name="MyDomain" domain_id="0"> <register_type name="Sensor" kind="dynamicData" type_ref="Sensor"/> <topic name="Temperature" register_type_ref="Sensor"/> </domain> </domain_library>
  • 16. ©2017 Real-Time Innovations, Inc. Anatomy of the XML 1. QoS Library a. QoS Settings 2. Types a. Type Definition 3. Domain Library a. Domains and Topics 4. Participant Library a. DDS Entities hierarchy <!-- Participant library --> <participant_library name="MyParticipantLibrary"> <domain_participant name="Console" domain_ref="MyDomainLibrary::MyDomain"> <subscriber name="TempSubscriber"> <data_reader name="TempReader" topic_ref="Temperature"/> </subscriber> </domain_participant> <domain_participant name="Sensor" domain_ref="MyDomainLibrary::MyDomain"> <publisher name="TempPublisher"> <data_writer name="TempWriter" topic_ref="Temperature"/> </publisher> </domain_participant> </participant_library>
  • 17. ©2017 Real-Time Innovations, Inc. Example 1: Basic pub/sub • Goal – In this example we show how to publish data – Learn differences between read/take – Learn how to change QoS settings in Connector • Documentation: – QoS Policy Reference Guide (cheat-sheet)
  • 18. ©2017 Real-Time Innovations, Inc. Example 2: Filtering • Goal – Learn how to filter data per subscriber • Description – The console application will only receive the data matching a certain criteria • Two types of Filtering: – Content Based • Use a filter with SQL Expression – Time Based • time_based_filter QoS
  • 19. ©2017 Real-Time Innovations, Inc. Example 3: High availability • Goal – Learn how to add robustness using DDS QoS • Description – Adding a backup sensor that substitute the primary sensor in case of failure • QoS: – Liveliness – Ownership – Ownership strength
  • 20. ©2017 Real-Time Innovations, Inc. Example 4: Durability • Goal – Learn how to provide recent history to late joiners • Description – A console application will receive the recent history published before it was started • QoS: – Durability QoS
  • 21. ©2017 Real-Time Innovations, Inc. Example 5: Data Isolation/Partition • Goal – Learn how to isolate publishers and subscribers within the same domain • Description – A console application will receive sensor updates only for subscribers in certain zones • QoS: – Partition QoS
  • 22. ©2017 Real-Time Innovations, Inc. Example 6 • Goal – create your own distributed application and share it with the community • Description – Let your imagination fly! • References – XML Application creation