DDS in Action -- Part I
-
Upload
angelo-corsaro -
Category
Technology
-
view
146 -
download
1
Transcript of DDS in Action -- Part I
Angelo Corsaro, PhD Chief Technology Officer
ADLINK Technologies Inc. [email protected]
DDS in ActionPart-I
Cop
yrig
ht P
rism
Tech
, 201
5
Who is the Speaker?
Cop
yrig
ht P
rism
Tech
, 201
5
ANGELO CORSARO, PHDChief Technology Officer ADLINK Technologies, Inc.
Chief Technology Officer PrismTech
OMG DDS SIG Co-Chair
Interests: IoT/IIoT, Fog and Cloud Computing, Innovation Management, High Performance Computing, Large Scale Distributed Systems, Real-Time Systems, Functional Programming Languages
Angelo is a well-known and cited expert in the area of high performance and large scale distributed systems and with 100s of publications on referred journal, conferences, workshops, and magazines.
Senior Advisor ECC
Hobbies: Wind-surfing, Jazz/Fusion/Funk Bass Playing
Practices: Patanjali’s Ashtanga Yoga
Cop
yrig
ht P
rism
Tech
, 201
5
DDS, what?
Cop
yrig
ht P
rism
Tech
, 201
5DDS in131 Characters
DDS is a standard technology for ubiquitous, interoperable, secure, platform independent,
and real-time data sharing across network connected devices
Cop
yrig
ht P
rism
Tech
, 201
5
The DDS Standard
Cop
yrig
ht P
rism
Tech
, 201
5
DDS Standard Evolution
2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
‣ DDS 1.0 ‣ DDSI-RTPS 1.0 ‣ DDS-XTYPES 1.0
‣ DDS-SECURITY 1.0 ‣ DDS-XTYPES 1.1 ‣ DDSI-RTPS 2.2
‣ DDS 1.4 ‣ DLRL 1.4 ‣ DDS-RPC 1.0
‣ DDSI-RTPS 2.0
‣ DDS 1.2
‣ DDS-PSM-CXX 1.0 ‣ DDS-PSM-Java 1.0
‣ DDSI-RTPS 2.1
‣ DDSI-RTPS 1.0
2016
Cop
yrig
ht P
rism
Tech
, 201
5
Defines a high level API for programming language, OS and architecture independent data sharing
DDS Standards
TCP UDP
IP
802.3 802.11
DDSI-RTPS
L3: Network
App App App
L2: Data Link
L1: Physical
L4: Transport
L5: Session
L6: Presentation
User
L7: Application
Secu
rity
X-Ty
pes
DCPS
RPC
...
802.1 ...
C/C++, Java, .Net, JavaScript, Python, etc.Data Centric Publish Subscribe (DCPS)
Cop
yrig
ht P
rism
Tech
, 201
5
Defines a wire protocol for interoperable implementation of DCPS abstractions.
This protocol assumes a best-effort transport layer, i.e., reliability is provided by DDSI.
DDS Standards
TCP UDP
IP
802.3 802.11
DDSI-RTPS
L3: Network
App App App
L2: Data Link
L1: Physical
L4: Transport
L5: Session
L6: Presentation
User
L7: Application
Secu
rity
X-Ty
pes
DCPS
RPC
...
802.1 ...
C/C++, Java, .Net, JavaScript, Python, etc.DDS Interoperability Protocol (DDSI-RTPS)
Cop
yrig
ht P
rism
Tech
, 201
5
Extends the DDS type system from nominal to structural, thus providing very good support for evolutions and forward compatibility.
Defines APIs for dynamically defining and operating over DDS types
DDS Standards
TCP UDP
IP
802.3 802.11
DDSI-RTPS
L3: Network
App App App
L2: Data Link
L1: Physical
L4: Transport
L5: Session
L6: Presentation
User
L7: Application
Secu
rity
X-Ty
pes
DCPS
RPC
...
802.1 ...
C/C++, Java, .Net, JavaScript, Python, etc.eXtensible Types (DDS-XTypes)
Cop
yrig
ht P
rism
Tech
, 201
5
Defines a data-centric security architecture with pluggable Authentication, Access Control, Crypto and Logging.
DDS Standards
TCP UDP
IP
802.3 802.11
DDSI-RTPS
L3: Network
App App App
L2: Data Link
L1: Physical
L4: Transport
L5: Session
L6: Presentation
User
L7: Application
Secu
rity
X-Ty
pes
DCPS
RPC
...
802.1 ...
C/C++, Java, .Net, JavaScript, Python, etc.Security (DDS-Security)
Cop
yrig
ht P
rism
Tech
, 201
5
Extends DDS abstractions to support distributed service definition and remote operation invocations.
DDS Standards
TCP UDP
IP
802.3 802.11
DDSI-RTPS
L3: Network
App App App
L2: Data Link
L1: Physical
L4: Transport
L5: Session
L6: Presentation
User
L7: Application
Secu
rity
X-Ty
pes
DCPS
RPC
...
802.1 ...
C/C++, Java, .Net, JavaScript, Python, etc.Remote Procedure Calls (DDS-RPC)
Cop
yrig
ht P
rism
Tech
, 201
5
Upcoming Standards
2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
‣ DDS 1.0 ‣ DDSI-RTPS 1.0 ‣ DDS-XTYPES 1.0
‣ DDS-SECURITY 1.0 ‣ DDS-XTYPES 1.1 ‣ DDSI-RTPS 2.2
‣ DDS 1.4 ‣ DLRL 1.4 ‣ DDS-RPC 1.0
‣ DDSI-RTPS 2.0
‣ DDS 1.2
‣ DDS-PSM-CXX 1.0 ‣ DDS-PSM-Java 1.0
‣ DDSI-RTPS 2.1
‣ DDSI-RTPS 1.0
2016 2017
‣ DDS-XTYPES 1.2 ‣ DDSI-Security 1.1 ‣ DDS-XRCE (TBC) ‣ OPC-UA/DDS GTW (TBC)
Cop
yrig
ht P
rism
Tech
, 201
5
Defines the most wire/power/memory efficient protocol in the market to provide DDS connectivity to extremely constrained targets, such as battery powered devices with less than 100 Kbytes of memory and connected through constrained networks
DDS StandardseXtremely Resource Constrained Environments DDS (DDS-XRCE)
DDS-XRCE
XRCE Application
L3: Network
TCP UDP
IP
6LowPAN
802.15.4NB-IoT3G/4G
Unspecified API
App App App
L2: Data Link
L1: Physical
L4: Transport
L4: Session
…
Cop
yrig
ht P
rism
Tech
, 201
5
Defines a standard Gateway to simplify the bridging between from OPC-UA and DDS
DDS StandardsOPC-UA/DDS Gateway (DDS-OPCUA-GTW)
DDS Global Data Space
...
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
DDS/OPC-UA Gateway
OPC-UAServer+Client
DDSI-RTPS
OPC-UA Client
OPC-UA Client
OPC-UA Client
OPC-UA Client
Cop
yrig
ht P
rism
Tech
, 201
5
Who is using DDS?
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is used for data sharing within and across
the vehicle.
The environment is highly heterogeneous and
requires dynamic pairing along with coordination of
fast moving vehicles
AUTONOMOUS VEHICLES
Cop
yrig
ht P
rism
Tech
, 201
5DDS is used as the integration technology
for data sources and sinks.
DDS is also often used as a control plane to control and provision equipment
Smart Cities
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is used to integrate and normalise data sharing
among the various elements of a smart grid at scale
Duke’s Energy COW showed how only with DDS it was possible to distribute the
phase alignment signal at scale wit hthe required 20ms
periodicity
Smart Grid
Cop
yrig
ht P
rism
Tech
, 201
5DDS leveraged to virtualise I/O and
provide better decoupleng between I/
O, Control and Management functions
of the system
Smart Green Houses
Cop
yrig
ht P
rism
Tech
, 201
5
The NASA Kennedy Space Centre uses DDS to collect the Shuttle Launch System
Telemetry.
DDS streams over 400.000 Msgs/sec
In comparison, world-wide, Twitter deals with less than
7000 msgs/sec
NASA Launch Systems
Cop
yrig
ht P
rism
Tech
, 201
5DDS is uses to share Flight Data within and
across Air Traffic Control Centres.
These applications have extremely high
dependability constraints.
Air Traffic Control
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is used in Smart Factories to provide
horizontal and vertical data integration across
the traditional SCADA layers.
Smart Factory
Cop
yrig
ht P
rism
Tech
, 201
5
DDS used to control the 100.000 mirrors that make up ELT’s
optics.
These mirrors are adjusted 100 times per
second
Extremely Large Telescope (ELT)
Cop
yrig
ht P
rism
Tech
, 201
5DDS is uses inside several medical
devices to share data between the various
stages of data acquisition, processing
and visualisation
Medical Devices
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is heavily used for data sharing in
Robotics and is today at the heart of the Robot Operating
System (ROS)
Robotics
Cop
yrig
ht P
rism
Tech
, 201
5Why are these applications using DDS?
Cop
yrig
ht P
rism
Tech
, 201
5
DDS PROVIDES AN EXTREMELY HIGH LEVEL AND POWERFUL ABSTRACTIONS ALONG
WITH A ROCK SOLID INFRASTRUCTURE TO BUILD HIGHLY MODULAR AND DISTRIBUTED
SYSTEMS
Cop
yrig
ht P
rism
Tech
, 201
5
dds makes it much easier to solve some very hard distributed system problems, such as fault-tolerance, scalability and
asymmetry
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is like a universal glue that allows to seal together highly heterogeneous
environments while maintaining a single, elegant and efficient abstraction
Cop
yrig
ht P
rism
Tech
, 201
5
DDS implementation are available for an incredible
numbers of platforms, including enterprise,
desktop, embedded, real-time, mobile, and web
Platform Independent
Cop
yrig
ht P
rism
Tech
, 201
5DDS applications can be written in your favourite programming language.
Interoperability across languages is taken care by
DDS
Polyglot
Cop
yrig
ht P
rism
Tech
, 201
5
DDS: The Main Idea
Cop
yrig
ht P
rism
Tech
, 201
5
Applications can autonomously and
asynchronously read and write data enjoying
spatial and temporal decoupling
Virtualised Data Space
DDS Global Data Space
...
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
Cop
yrig
ht P
rism
Tech
, 201
5A domain-wide information’s class A
Topic defined by means of a <name,
type, qos>
Topic
DDS Global Data Space
...
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
TopicType
Name
QoS
Cop
yrig
ht P
rism
Tech
, 201
5
Built-in dynamic discovery isolates applications
from network topology and connectivity details
Dynamic Discovery
DDS Global Data Space
...
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
Cop
yrig
ht P
rism
Tech
, 201
5
QoS policies allow to express temporal and
availability constraints for data
QoS Enabled
DDS Global Data Space
...
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
Cop
yrig
ht P
rism
Tech
, 201
5
No single point of failure or bottleneck
Decentralised Data-Space Data
Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
TopicDQoS
TopicDQoS
TopicAQoS
DDS Global Data Space
...
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
Cop
yrig
ht P
rism
Tech
, 201
5Connectivity is dynamically adapted to
chose the most effective way of sharing data
Adaptive Connectivity
Data Writer
Data Writer
Data Writer
Data Reader
Data Reader
Data Reader
Data Writer
TopicAQoS
TopicBQoS
TopicCQoS
TopicDQoS
TopicDQoS
TopicDQoS
TopicAQoS
ThecommunicationbetweentheDataWriterandmatchingDataReaderscanbepeer-to-peerexploitingUDP/IP(UnicastandMulticast)orTCP/IP
ThecommunicationbetweentheDataWriterandmatchingDataReaderscanbe“brokered”butstillexploitingUDP/IP(UnicastandMulticast)orTCP/IP
Cop
yrig
ht P
rism
Tech
, 201
5
Most frequently heard misconceptions
Cop
yrig
ht P
rism
Tech
, 201
5
DDS can only work on a LAN as it requires multicast
misconception #1
Cop
yrig
ht P
rism
Tech
, 201
5
The only one thing that DDS assumes from the underlying transport is best effort one-to-one communication.
DDS can and will exploit multicast when available, but does not require it in order to work!
rectification #1
Cop
yrig
ht P
rism
Tech
, 201
5
use DDS only if you need real-time
misconception #2
Cop
yrig
ht P
rism
Tech
, 201
5While DDS support for predictable, real-time, communication is unparalleled, in a sense this is just a tiny detail.
DDS main value is simplifying the design, development, deployment and maintenance of distributed systems
rectification #2
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is not widely adopted
misconception #3
Cop
yrig
ht P
rism
Tech
, 201
5
DDS is not widely hyped as its main domain of applications has been thus far the mission and business critical applications as opposed to Internet applications.
That said, it has far more deployments than many of the technologies currently hyped in IoT/IIoT.
rectification #3
Cop
yrig
ht P
rism
Tech
, 201
5
There are no Open source DDS implementations
misconception #4
Cop
yrig
ht P
rism
Tech
, 201
5
There are at least two mainstream Open Source implementations of DDS. One of them, from PrismTech, is OpenSplice DDS
rectification #4
Cop
yrig
ht P
rism
Tech
, 201
5
DDS cannot go through Firewall or naTS nor it can support to internet scale applications
misconception #5
Cop
yrig
ht P
rism
Tech
, 201
5DDS vendors such as PrismTech have shown not only how DDS can be used to build Internet Scale systems but more importantly how some of the DDS features make it easier!
rectification #5
Cop
yrig
ht P
rism
Tech
, 201
5
Show me the Code
Cop
yrig
ht P
rism
Tech
, 201
5
Writing Data in C++#include <dds.hpp>
int main(int, char**) {
DomainParticipant dp(0); Topic<Meter> topic(“SmartMeter”); Publisher pub(dp); DataWriter<Meter> dw(pub, topic);
while (!done) { auto value = readMeter() dw.write(value); std::this_thread::sleep_for(SAMPLING_PERIOD); }
return 0; }
enumUtilityKind{ ELECTRICITY, GAS, WATER};structMeter{ stringsn; UtilityKindutility; floatreading; floaterror;};#pragmakeylistMetersn
Cop
yrig
ht P
rism
Tech
, 201
5
Reading Data in C++#include <dds.hpp>
int main(int, char**) {
DomainParticipant dp(0); Topic<Meter> topic(”SmartMeter”); Subscriber sub(dp); DataReader<Meter> dr(dp, topic);
auto samples = dr.read(); std::for_each(samples.begin(), samples.end(), [](Sample<Meter>& sample) { std::cout << sample.data() << std::endl; }); return 0; }
enumUtilityKind{ ELECTRICITY, GAS, WATER};structMeter{ stringsn; UtilityKindutility; floatreading; floaterror;};#pragmakeylistMetersn
Cop
yrig
ht P
rism
Tech
, 201
5
Homework
Cop
yrig
ht P
rism
Tech
, 201
5
Download Vortex from http://bit.ly/vortex-download
Run a few examples in the distribution, and look at the code
If you can install Wireshark on your machine
Before next Video…