View
235
Download
0
Category
Preview:
Citation preview
© 2006 RTI and THALES - All rights Reserved 1
Data Distribution Service (DDS)Introduction
Space Focus Day
26 September 2006
Anaheim CA
dds/2006-09-02
Gerardo Pardo-Castellote – RTI
gerardo@rti.com
26 September 2006
© 2006 RTI - All rights Reserved 2
The DDS Standard
Data Distribution Service for Real-Time Systems
� Adopted in June 2003
� Finalized in June 2004
� Revised June 2005
� Joint submission (RTI, THALES, OIS)
� Specification of API required to facilitate the Data-Centric Publish-Subscribe communication environment for real-time distributed systems.
3
EU Air Traffic Management
RETF (USA)Train Communications
Tokyo JapanTraffic Control
Army FutureCombat System
Boeing AWACSProgram
US Navy, DD(X)LCS, SSDS, LPD-17
and 13 Navies
DDS Adoption
© 2006 RTI - All rights Reserved 4
DDS mandated for data-distribution
DISR (formerly JTA)
� DoD Information TechnologyStandards Registry
US Navy Open Architecture
FCS SOSCOE
� Future Combat System –System of System CommonOperating Environment
In Progress
� RETF
� Railroad Electronics Task Force
� UK MOD
� Advocating Open Systems
© 2006 RTI - All rights Reserved 5
DDS
Point-to-PointTelephone, TCPSimple, high-bandwidthLeads to stove-pipe systems
Client-ServerFile systems, Database, RPC, CORBA, DCOMGood if information is naturally centralizedSingle point failure, performance bottlenecks
Publish/Subscribe MessagingMagazines, Newspaper, TVExcels at many-to-many communicationExcels at distributing time-critical information
Middleware Information Models
Replicated DataLibraries, Distributed databasesExcels at data-mining and analysis
© 2006 RTI - All rights Reserved 6
DDS Enables Global Data
InstanceInstance
Instance 2Instance 2
InstanceInstance
Data Writer1
Data Writer1
Data Writer2
Data Writer2
Instance 1Instance 1
Instance 3Instance 3
Data ReaderData Reader
Data Reader
Data ReaderData Writer
Topic “Square”Topic “ Topic “Topic “Circle”
Address in Global Data Space = (DomainId, Topic, Key)
� Each topic corresponds to a multiple data instances
� Each DataWriter can write to multiple instances of a single topic
� Multiple DataWriters may write to the same instance
� Each DataReader can read from multiple instances of a single topic
� Multiple DataReaders may read from the same instances
© 2006 RTI - All rights Reserved 7
DataReader“Circle”
DomainParticipant
DataWriter
“Circle”
DomainParticipant
DDS Communications Model
Publisher declares information it has and specifies the Topic
� and the offered QoS contract
� and an associated listener to be alerted of any significant status changes
Subscriber declares information it wants and specifies the Topic
� and the requested QoS contract
� and an associated listener to be alerted of any significant status changes
DDS automatically discovers publishers and subscribers
� DDS ensures QoS matching and alerts of inconsistencies
Failed to produce
data
Listener
Offered
QoS Listener
Failed to get data
Offered
QoS
© 2006 RTI - All rights Reserved 8
DDS: Quality of Service
TRANSPORT PRIORITYCONTENT FILTERS
PRESENTATIONLIFESPAN
DESTINATION ORDERENTITY FACTORY
LATENCY BUDGETDEADLINE
LIVELINESSTIME BASED FILTER
OWNERSHIP STRENGTHRELIABILITY
OWNERSHIPRESOURCE LIMITS
PARTITIONWRITER DATA LIFECYCLE
GROUP DATAREADER DATA LIFECYCLE
TOPIC DATAHISTORY
USER DATADURABILITY
QoS PolicyQoS Policy
Vol
atili
tyU
ser QoS
Del
iver
yP
resentationR
edundancyIn
fras
truc
ture
Transport
© 2006 RTI - All rights Reserved 9
What makes DDS different?
Data-centricity
� High level of data abstraction: Domain, Topic, Key
� Proven scalable model for RT systems
� “Smart” services such as:
� Ownership, ContentFilteredTopics, KeepLast History
� Built-in support for redundancy
� Automatic discovery
� Directly supports state propagation/caching
Configurability by QoS
� Wide range of applicability: Enterprise to real-time
� P2P infrastructure:
� High-performance and scalability
� Fault-tolerance
� Scalability
� Subsumes message-oriented and data-centric
Object models are built as local cache
© 2006 RTI - All rights Reserved 10
Data-Distribution and Real-Time
Non-real-time Soft real-time Hard real-time Extreme real-time
Java/RMIJava/JMS
CORBA
MPI
Java RTSJ (soft RT) RTSJ (hard RT)
Web Services
Mes
sag
ing
Tec
hn
olo
gie
s an
d S
tan
dar
ds
Mes
sag
ing
Tec
hn
olo
gie
s an
d S
tan
dar
ds
Data Distribution Service / DDS
RT CORBA
Adapted from NSWC-DD OA Documentation
Enterprise BusinessLogic Integration
Real-TimeTacticalInformation
© 2006 RTI - All rights Reserved 11
DDS/DCPS
Provides a “Global Data Space” that is accessible to all interested applications.
� Data objects addressed by DpmainId, Topic and Key
� Subscriptions are decoupled from Publications
� Contracts established by means of QoS
� Automatic discovery and configuration
DistributedNode
Global Data Space
DistributedNode
DistributedNode
DistributedNode
DistributedNode
DistributedNode
P
PPP
P
P
X
P
P
© 2006 RTI - All rights Reserved 12
Example without Keys
When not using keys:
� Each Topic corresponds to a single data instance.
� A DataWriter associated with a Topic can write to the instance corresponding to That topic.
� Multiple DataWriters may write to the same instance.
� A DataReader specifies the Topic (instance) it wants to receive updates from.
Topic “green” Topic “orange”
InstanceDW 1
DW 2
DW 3
Instance
DR 1
DR 2
write
write
write
read
read
DR 3read
© 2006 RTI - All rights Reserved 13
Example with Keys
Address in Global Data Space = (DomainId,Topic, Key)
� Each Topic corresponds to multiple data instances
� Each DataWriter can write to multiple instances of a single Topic
� Multiple DataWriters may write to the same instance
� Each DataReader can receive updates from multiple instances of a single Topic
� Multiple DataReaders may read from the same instances
DW 1
DW 2
DW 3
DR 1
DR 2
write
write
write
read
read
DR 3read
Instance
Instance
Instance
Instance
write read
© 2006 RTI - All rights Reserved 14
Domain Separation
Instance
DW 3
DW 4
DW 5Instance
DR 4
DR 5
DR 6
Topic “green” Topic “orange”
InstanceDW 1
DW 2Instance
DR 1
DR 2
DR 3
Domain2
Domain1
2
1
1
2
DomainParticipant Node
© 2006 RTI - All rights Reserved 15
Example: Publication
// Entities creationPublisher publisher = domain->create_publisher(
publisher_qos, publisher_listener);
Topic topic = domain->create_topic(“Track”, “TrackStruct”,topic_qos, topic_listener);
DataWriter writer = publisher->create_datawriter( topic, writer_qos, writer_listener);
TrackStructDataWriter twriter = TrackStructDataWriter::narrow(writer);
TrackStruct my_track;// (Repeat each time data needs to be written)twriter->write(&my_track);
© 2006 RTI - All rights Reserved 16
Example: Subscription
// Entities creationSubscriber subscriber = domain->create_subscriber(
subscriber_qos, subscriber_listener);
Topic topic = domain->create_topic(“Track”, “TrackStruct”, topic_qos, topic_listener);
DataReader reader = subscriber->create_datareader( topic, reader_qos, reader_listener);
// Use listener-based or wait-based access
© 2006 RTI - All rights Reserved 17
How to Get Data? (Listener-Based)
// Listener creation and attachmentListener listener = new MyListener();reader->set_listener(listener);
// Listener codeMyListener::on_data_available( DataReader reader ){
TrackStructSeq received_data;SampleInfoSeq sample_info;TrackStructDataReader treader =
TrackStructDataReader::narrow(reader);
treader->take( &received_data, &sample_info, …)
// Use received_data}
© 2006 RTI - All rights Reserved 18
QoS Contract “Request / Offered”
QoS Request / Offered: Ensure that compatible QoS parameters are set.
QoS:DurabilityQoS:PresentationQoS:DeadlineQoS:Latency_BudgetQoS:OwnershipQoS:LivelinessQoS:Reliability
Offered
QoSRequested
QoS
X
QoS not compatible
Communication not established
Topic
Subscriber
DataReader
DataWriter
Publisher
Topic
© 2006 RTI - All rights Reserved 19
QoS: RELIABILITY
DataWriter
R
BEST_EFFORTSample delivery is not guaranteed
TopicBE
DataReader
BE
SubscriberPublisher
DataWriter
BE
Publisher
TopicR
DataReader
R
SS S S
Missed samples
S7 S5S6 S4 S3S2 S1
RELIABLESample delivery is
guaranteed
S7
S5S6
S4S3S2S1
history
© 2006 RTI - All rights Reserved 20
QoS: HISTORY – Last x or All
DataWriter
Keep All
KEEP_LAST: “depth”integer for the number of
samples to keep at any one time
DataReaderKeep all
Publisher Subscriber
Topic
S5S7 S2S4 S1
KEEP_ALL:Publisher : keep all until deliveredSubscriber : keep each sample until the application processes that instance
S7
S5S6
S4S3S2S1
S7
S5S6
S4S3 Data
ReaderKeepLast4
Subscriber
S7
S5S6
S4
S3S6
DataWriter
KeepLast 2
Publisher
S7S6
Topic
S7 S6 S5 S4 S3
© 2006 RTI - All rights Reserved 21
QoS: DEADLINE
Topic
Publisher
DataWriter
Subscriber
DataReader
DEADLINE “deadline period”
deadline
Commits to provide data each deadline period.
Expects data every deadline period.
S X S S S S S
Listener
Failed to get data
© 2006 RTI - All rights Reserved 22
QoS: LIVELINESS – Type, Duration
Domain Participant
DataWriter
Topic
Publisher
LP S LP LP
lease_duration
X
DataReader
Subscriber
Listener
Liveliness Message
Domain Participant
"type"• AUTOMATIC = Infrastructure Managed• MANUAL = Application Managed
Failed to renew lease
© 2006 RTI - All rights Reserved 23
QoS: TIME_BASED_FILTER
Domain Participant
DataWriter
Topic
Publisher
SS S S S
minimum separation
DataReader
Subscriber
Data Samples
“minimum_separation”: Data Reader does not want to receive data faster than the min_separation time
SS
Discardedsamples
© 2006 RTI - All rights Reserved 24
DDS Subscription ( ContentFilteredTopic)
Content Filtered Topic
“Filter Expression ”Ex. Value > 260
Value = 249
Topic Instances in Domain
Instance 1
Value = 230Instance 2
Value = 275Instance 3
Value = 262Instance 4
Value = 258Instance 5
Value = 261Instance 6
Value = 259Instance 7
The Filter Expression and Expression Params will determine which instances of the Topic will be received by the subscriber.
Topic
optionaloptional
© 2006 RTI - All rights Reserved 25
QoS: OWNERSHIP_STRENGTH
DataWriter
Topic
DataReader
Subscriber
Domain Participant
Publisher
DataWriter
Publisher
S=1 S=4 S=4
Note: Only applies to Topics with OWNERSHIP=Exclus ive
OWNERSHIP_STRENGTH: Specifies which writer is allowed to update the val ues of data-objects
S
© 2006 RTI - All rights Reserved 26
QoS: LATENCY_BUDGET
� Intended to provide time-critical information to the publisher for framework tuning where possible.
� Will not prevent data transmission and/or receipt.
Physical I/F
Transport
DDS
Application
Publication
t1
t2
Physical I/F
Transport
DDS
Application
Subscription
t3
Latency = t1 + t2 + t3
© 2006 RTI - All rights Reserved 27
QoS: RESOURCE_LIMITS
� Specifies the resources that the Service can consume to meet requested QoS
Domain Participant
Topic
123
12
4
123
DataReader
Subscriber
max_samples: max # data samples for a single DW or DR, across all instances
max_instances: max # instances for a single DW or DRmax_samples_per
_instance: max # data samples per instance
……
© 2006 RTI - All rights Reserved 28
QoS: USER_DATA
� User-defined portion of Topic metadata
� Example of use: Security Authentication
Entity:
Domain Participant (user_data)DataReader (user_data)DataWriter (user_data)
DDS Node
ignore_participant()ignore_publication()ignore_subscription()ignore_topic()
USER_DATA can be used to authenticate an origination entity.
Remote Application
Authenticate Origin
DDS Node
Accept Entities
yes
no
Note: USER_DATA is contained within the DDS metadata.
© 2006 RTI - All rights Reserved 29
QoS: PARTITION
Publisher
Domain Participant
TopicA
TopicB
Subscriber
DataWriter
DataWriter
DataReader
DataReader
TopicC
DataWriter
DataReader
PartitionU,Z
DataReader
Logical “namespace” for topics
** Partition string namesmust match between publisher and subscriber
Subscriber
PartitionX,Y
PartitionU,W
© 2006 RTI - All rights Reserved 30
QoS: DURABILITY
Topic
Publisher
Domain Participant
DataWriter
# saved in Transient affected by QoS: History and QoS: Resource_Limits
Publisher
Domain Participant
DataWriter
LocalMemory
Durability =Transient
Durability =Volatile
Durability Kind:VOLATILE – No Instance History SavedTRANSIENT – History Saved in Local MemoryPERSISTENT – History Saved in Permanent storage
Perm.Storage
Durability = Persistent
Determines if/how instances of a topic are saved.
© 2006 RTI - All rights Reserved 31
DistributedNodeGlobal Data
Space
DistributedNode
DistributedNode
PPP
P
DDS-DCPS Summary
DDS targets applications that need to distribute data in a real-time environment
DDS is highly configurable by QoS settings
DDS provides a shared “global data space”
� Any application can publish data it has
� Any application can subscribe to data it needs
� Automatic discovery
� Facilities for fault tolerance
� Heterogeneous systems easily accommodated
Recommended