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
CTO,	ADLINK	Tech.	Inc.	
Co-Chair,	OMG	DDS-SIG	
angelo.corsaro@adlinktech.com
M...
CopyrightPrismTech,2017
DDS Refresher
CopyrightPrismTech,2017
DDS provides
applications with
a Virtual Global
Data Space
abstraction
DDS Abstraction
DDS Global ...
CopyrightPrismTech,2017
Applications
coordinate by
autonomously and
asynchronously
reading and
writing data in the
Data Sp...
CopyrightPrismTech,2017
DDS data streams are
defined by means of
Topics
A Topic represented is
by means of a <name,
type, ...
CopyrightPrismTech,2017
Topic may mark some of their
associated type attributes as key-
fields
Each unique key value (tupl...
CopyrightPrismTech,2017
A topic cans be seen as
defining a relation
Topics and Relations
struct	LightBulbState	{	
			strin...
CopyrightPrismTech,2017
DDS Entities
CopyrightPrismTech,2017
DDS Entities
DDS provides three different
entities to control where and
what data is read/written
...
CopyrightPrismTech,2017
DDS Entities
DDS QoS Policies control,
at a large extent, to the
“how” data is shared
QoS Policies...
CopyrightPrismTech,2017
For data to flow from a
DataWriter (DW) to one or
many DataReader (DR) a few
conditions have to ap...
CopyrightPrismTech,2017
DataWriter and DataReaders
have an associated samples
cache
In a sense, what DDS does is to
projec...
QoS Policies
CopyrightPrismTech,2017
DDS QoS Policies
HISTORY
LIFESPAN
DURABILITY
DEADLINE
LATENCY BUDGET
TRANSPORT PRIO
TIME-BASED FIL...
CopyrightPrismTech,2017
A subset of the QoS
Policies impact the
matching
Most of thee QoS relate to
end-to-end properties ...
CopyrightPrismTech,2017
Domain Participant
QoS Policies
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADLINE
LATE...
CopyrightPrismTech,2017
Topic
QoS Policies
ENTITY FACTORY
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADLINE
LA...
CopyrightPrismTech,2017
Publisher
QoS Policies
ENTITY FACTORY
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADLIN...
CopyrightPrismTech,2017
Subscriber
QoS Policies
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADLINE
LATENCY BUDG...
CopyrightPrismTech,2017
DataWriter
QoS Policies
ENTITY FACTORY
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADLI...
CopyrightPrismTech,2017
Data Reader
QoS Policies
ENTITY FACTORY
HISTORY
LIFESPAN
DURABILITY
OWENERSHIP
OWN. STRENGTH
DEADL...
QoS Categorisation
CopyrightPrismTech,2017
Data Delivery
Reliability
Presentation
Destination
Order
Partition
Ownership
Ownership
Strength
Da...
CopyrightPrismTech,2017
Temporal Properties
Throughput
TimeBasedFilter
[Inbound]
[Outbound]
Latency
Deadline
TransportPrio...
CopyrightPrismTech,2017
Data Availability
History
DurabilityLifespan Data Availability
Durabiliy
Service
CopyrightPrismTech,2017
Writer Cache
Durability
History
Resource
Limits
Writer Cache
Writer Data
Lifecycle
Reliability
Lif...
CopyrightPrismTech,2017
Reader Cache
History
Resource
Limits
Reader Cache
Reader Data
Lifecycle
Destination
Order
QoS Semantics
History
CopyrightPrismTech,2017
The HISTORY QoS Policy
provide controls on the
replacement strategy and
depth of the cache
History...
CopyrightPrismTech,2017
The DataWriter HISTORY QoS
Policy controls the amount of
data that can be made
available to late j...
CopyrightPrismTech,2017
The DataReader HISTORY QoS
Policy controls how many
samples will be kept on the
reader cache
Keep ...
CopyrightPrismTech,2017
As we saw earlier a topic can
be seen as a relation (in the
sense of relational algebra)
The histo...
CopyrightPrismTech,2017
Durability
CopyrightPrismTech,2017
The DURABILITY QoS controls the data availability w.r.t. late
joiners, specifically the DDS provid...
CopyrightPrismTech,2017
No Time Decoupling
Readers get only data produced after they joined the Global Data Space
Volatile...
CopyrightPrismTech,2017
No Time Decoupling
Readers get only data produced after they joined the Global Data Space
Volatile...
CopyrightPrismTech,2017
Some Time Decoupling
Data availability is tied to the availability of the data writer and the hist...
CopyrightPrismTech,2017
Some Time Decoupling
Data availability is tied to the availability of the data writer and the hist...
CopyrightPrismTech,2017
Some Time Decoupling
Data availability is tied to the availability of the data writer and the hist...
CopyrightPrismTech,2017
Some Time Decoupling
Data availability is tied to the availability of the data writer and the hist...
CopyrightPrismTech,2017
Time Decoupling
Data availability is tied to the availability of the durability service
Transient ...
CopyrightPrismTech,2017
Time Decoupling
Data availability is tied to the availability of the durability service
Transient ...
CopyrightPrismTech,2017
Time Decoupling
Data availability is tied to the availability of the durability service
Transient ...
CopyrightPrismTech,2017
Time Decoupling
Data availability is tied to the availability of the durability service
Transient ...
CopyrightPrismTech,2017
Time Decoupling
Data availability is tied to the availability of the durability service
Transient ...
CopyrightPrismTech,2017
Reliability
CopyrightPrismTech,2017
The RELIABILITY QoS Policy controls one of the dimensions
of reliability in DDS
Yet, the full sema...
CopyrightPrismTech,2017
DDS will deliver an arbitrary subsequence of the samples
written against a Topic Instance
Samples ...
CopyrightPrismTech,2017
Under stationary conditions an application is guaranteed to receive the
last n-samples written for...
CopyrightPrismTech,2017
All samples written against a Topic Instance are
delivered. Since from a theoretical perspective
r...
CopyrightPrismTech,2017
Memory…
CopyrightPrismTech,2017
The Resource Limits QoS Policy
controls the maximum size of the
DataReader and DataWriter
cache th...
CopyrightPrismTech,2017
Configures the purge delay for
instances that have no writer or which
have been disposed
This is c...
CopyrightPrismTech,2017
Controls whether unregistered
instances are automatically disposed
or not
This is controlled throu...
CopyrightPrismTech,2017
Fault-Tolerance
CopyrightPrismTech,2017
Availability of data producers can be controlled via two
QoS Policies:
OWNERSHIP (SHARED vs. EXCLU...
CopyrightPrismTech,2017
The Ownership can be used as a
fault-masking mechanism that
allow to replicate Sources and
transpa...
CopyrightPrismTech,2017
Temporal Properties
CopyrightPrismTech,2017
The LATENCY_BUDGET QoS
policy specifies the maximum
acceptable delay from the
time the data is wri...
CopyrightPrismTech,2017
The DEADLINE QoS policy defines the maximum inter-
arrival time between data samples
DataWriter in...
CopyrightPrismTech,2017
DDS provides mechanism for detecting
traditional faults as well as
performance failures
The Fault-...
CopyrightPrismTech,2017
The TRANSPORT_PRIORITY QoS policy is a hint to the
infrastructure as to how to set the priority of...
CopyrightPrismTech,2017
The Time Based Filter allows
to control the throughput at
which data is received by a
data reader
...
QoS Modeling Idioms
CopyrightPrismTech,2017
Identify the QoS Policies that
capture the key non-functional
properties of the various kinds of
i...
CopyrightPrismTech,2017
Allo for deploy-time refinement of DDS QoS Policies
To allow for this leverage the QoS Provider
Qo...
CopyrightPrismTech,2017
DDS provides first class support for modelling distributed
state and events
Different QoS combinat...
CopyrightPrismTech,2017
In distributed systems you often need to model soft-state -- a
state that is periodically updated
...
CopyrightPrismTech,2017
In distributed systems you often need to model hard-state -- a
state that is sporadically updated ...
CopyrightPrismTech,2017
In distributed systems you often need to model events -- the
occurrence of something noteworthy fo...
CopyrightPrismTech,2017
Summing Up
CopyrightPrismTech,2017
DDS provides a rich set of QoS
Policies to control the key
aspects of data distribution,
availabil...
CopyrightPrismTech,2017
Upcoming SlideShare
Loading in …5
×

Mastering DDS Qualities of Service

380 views

Published on

The Data Distribution Service (DDS) is the only standard for data sharing that provides programmatic control over the non-functional properties of data. DDS enables this control through a rich set of policies controlling key local and end-to-end Qualities of Service (QoS), such as resource utilization, temporal constraints, data availability, and resource management.

This presentation does a deep dive into the DDS QoS, in particular it allows you to (1) understand the QoS mechanism, (2) learn all DDS’s QoS and their implications, (3) understand when to use which QoS, and (4) master the pattern of usage of individual as well as groups of QoS.

Published in: Software
  • Be the first to comment

Mastering DDS Qualities of Service

  1. 1. CopyrightPrismTech,2017 Angelo Corsaro, PhD CTO, ADLINK Tech. Inc. Co-Chair, OMG DDS-SIG angelo.corsaro@adlinktech.com Mastering DDS QoS
  2. 2. CopyrightPrismTech,2017 DDS Refresher
  3. 3. CopyrightPrismTech,2017 DDS provides applications with a Virtual Global Data Space abstraction DDS Abstraction DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS
  4. 4. CopyrightPrismTech,2017 Applications coordinate by autonomously and asynchronously reading and writing data in the Data Space enjoying spatial and temporal decoupling DDS Abstraction DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS
  5. 5. CopyrightPrismTech,2017 DDS data streams are defined by means of Topics A Topic represented is by means of a <name, type, qos> Topics DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Topic Type Name QoS struct LightBulbState { string sn; float luminosity; long hue; boolean on; }; #pragma keylist LightBulgState sn “LightBulb” “ Reliability, Durability ... ”
  6. 6. CopyrightPrismTech,2017 Topic may mark some of their associated type attributes as key- fields Each unique key value (tuple of key attributes) identifies a Topic Instance. Each Topic Instance has associated a FIFO ordered stream of samples DDS provides useful instance life- cycle management and samples demultiplexing Topic Instances
  7. 7. CopyrightPrismTech,2017 A topic cans be seen as defining a relation Topics and Relations struct LightBulbState { string sn; float luminosity; long hue; boolean on; }; #pragma keylist LightBulgState sn sn luminosity hue on a123-21ef 0.5 12750 TRUE 600d-caf3 0.8 46920 FALSE 1234-c001 0.75 25500 TRUE
  8. 8. CopyrightPrismTech,2017 DDS Entities
  9. 9. CopyrightPrismTech,2017 DDS Entities DDS provides three different entities to control where and what data is read/written The DomainParticipant, Publisher and Subscriber relate to the “where” DataReader and DataWriter relate to the “what” Domain Topic Partitions Domain Participant Publisher DataWriter Subscriber Domain Participant Writes Reads Joins Joins Produces Into Consumes From DataReader
  10. 10. CopyrightPrismTech,2017 DDS Entities DDS QoS Policies control, at a large extent, to the “how” data is shared QoS Policies also control resource utilisation Domain Topic Partitions Domain Participant Publisher DataWriter Subscriber Domain Participant Writes Reads Joins Joins Produces Into Consumes From DataReader
  11. 11. CopyrightPrismTech,2017 For data to flow from a DataWriter (DW) to one or many DataReader (DR) a few conditions have to apply: The DR and DW have to be in the same domain The partition expression of the DR’s Subscriber and the DW’s Publisher should match (in terms of regular expression match) The QoS Policies offered by the DW should exceed or match those requested by the DR Matching Model QoS Policy Offered QoS Policies RxO QoS Policies Requested QoS Policies Domain Topic Partition Domain Participant Publisher DataWriter Subscriber Domain Participant Writes Reads Joins Joins Produces Into Consumes From DataReader
  12. 12. CopyrightPrismTech,2017 DataWriter and DataReaders have an associated samples cache In a sense, what DDS does is to project, eventually, the relevant content of the writer cache into matching reader caches As a consequence of these caches reads and writes are always local and non-blocking* Storage Model QoS Policy Offered QoS Policies RxO QoS Policies Requested QoS Policies Domain Topic Partition Domain Participant Publisher Subscriber Domain Participant Writes Reads Joins Joins Produces Into Consumes From DataWriter DataReader * reads never block and a write will only block, depending on QoS settings if sufficient resources are not available
  13. 13. QoS Policies
  14. 14. CopyrightPrismTech,2017 DDS QoS Policies HISTORY LIFESPAN DURABILITY DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA OWENERSHIP OWN. STRENGTH LIVELINESS ENTITY FACTORY DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER RxO QoS Local QoSImmutable DDS provides 20+ standard QoS Policies While this may seem a lot of complexity they are often used in combination to achieve certain patterns
  15. 15. CopyrightPrismTech,2017 A subset of the QoS Policies impact the matching Most of thee QoS relate to end-to-end properties of data RxO Model DURABILITY OWENERSHIP DEADLINE LATENCY BUDGET LIVELINESS RELIABILITY DEST. ORDER offered QoS RxO QoS Policies requested QoS Domain Topic Partitions Domain Participant Publisher DataWriter Subscriber Domain Participant Writes Reads Joins Joins Produces Into Consumes From DataReader PRESENTATION
  16. 16. CopyrightPrismTech,2017 Domain Participant QoS Policies HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER Domain Participant ENTITY FACTORY Local QoS Not Applicable Immutable RxO QoS
  17. 17. CopyrightPrismTech,2017 Topic QoS Policies ENTITY FACTORY HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER Topic RxO QoS Local QoS Not Applicable Immutable
  18. 18. CopyrightPrismTech,2017 Publisher QoS Policies ENTITY FACTORY HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER Publisher RxO QoS Local QoS Not Applicable Immutable
  19. 19. CopyrightPrismTech,2017 Subscriber QoS Policies HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER Subscriber ENTITY FACTORY RxO QoS Local QoS Not Applicable Immutable
  20. 20. CopyrightPrismTech,2017 DataWriter QoS Policies ENTITY FACTORY HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER DataWriter RxO QoS Local QoS Not Applicable Immutable
  21. 21. CopyrightPrismTech,2017 Data Reader QoS Policies ENTITY FACTORY HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER DataReader RxO QoS Local QoS Not Applicable Immutable
  22. 22. QoS Categorisation
  23. 23. CopyrightPrismTech,2017 Data Delivery Reliability Presentation Destination Order Partition Ownership Ownership Strength Data Delivery
  24. 24. CopyrightPrismTech,2017 Temporal Properties Throughput TimeBasedFilter [Inbound] [Outbound] Latency Deadline TransportPriority LatencyBudget
  25. 25. CopyrightPrismTech,2017 Data Availability History DurabilityLifespan Data Availability Durabiliy Service
  26. 26. CopyrightPrismTech,2017 Writer Cache Durability History Resource Limits Writer Cache Writer Data Lifecycle Reliability Lifespan
  27. 27. CopyrightPrismTech,2017 Reader Cache History Resource Limits Reader Cache Reader Data Lifecycle Destination Order
  28. 28. QoS Semantics
  29. 29. History
  30. 30. CopyrightPrismTech,2017 The HISTORY QoS Policy provide controls on the replacement strategy and depth of the cache History Cache DataReader/DataWriter ... QoS Policy Applicability RxO Modifiable HISTORY T, DR, DW N N
  31. 31. CopyrightPrismTech,2017 The DataWriter HISTORY QoS Policy controls the amount of data that can be made available to late joining DataReaders under TRANSIENT_LOCAL Durability Data Writer History time time time KeepLast(3) KeepLast(1) KeepAll QoS Policy Applicability RxO Modifiable HISTORY T, DR, DW N N
  32. 32. CopyrightPrismTech,2017 The DataReader HISTORY QoS Policy controls how many samples will be kept on the reader cache Keep Last. DDS will keep the most recent “depth” samples of each instance of data identified by its key Keep All. The DDS keep all the samples of each instance of data identified by its key -- up to reaching some configurable resource limits DataReader History QoS Policy Applicability RxO Modifiable HISTORY T, DR, DW N N time time time KeepLast(3) KeepLast(1) KeepAll
  33. 33. CopyrightPrismTech,2017 As we saw earlier a topic can be seen as a relation (in the sense of relational algebra) The history makes the table a cube, where each slice of the cube represents a value of the relation at some point in time History: Another Perspective sn luminosity hue on a123-21ef 0.7 12750 TRUE 600d-caf3 0.4 46920 FALSE 1234-c001 0.75 25500 TRUEsn luminosity hue on a123-21ef 0.5 12750 TRUE 600d-caf3 0.8 46920 FALSE 1234-c001 0.75 25500 TRUE sn luminosity hue on a123-21ef 0.5 12750 TRUE 600d-caf3 0.8 46920 FALSE 1234-c001 0.75 25500 TRUE
  34. 34. CopyrightPrismTech,2017 Durability
  35. 35. CopyrightPrismTech,2017 The DURABILITY QoS controls the data availability w.r.t. late joiners, specifically the DDS provides the following variants: Volatile. No need to keep data instances for late joining data readers Transient Local. Data instance availability for late joining data reader is tied to the data writer availability Transient. Data instance availability outlives the data writer Persistent. Data instance availability outlives system restarts Durability QoS Policy Applicability RxO Modifiable DURABILITY T, DR, DW Y N
  36. 36. CopyrightPrismTech,2017 No Time Decoupling Readers get only data produced after they joined the Global Data Space Volatile Durability Data Writer Data Reader TopicA QoS1
  37. 37. CopyrightPrismTech,2017 No Time Decoupling Readers get only data produced after they joined the Global Data Space Volatile Durability Data Writer Data Reader TopicA QoS Data Reader 1 Late Joiner 22
  38. 38. CopyrightPrismTech,2017 Some Time Decoupling Data availability is tied to the availability of the data writer and the history settings Transient Local Data Writer Data Reader TopicA QoS11
  39. 39. CopyrightPrismTech,2017 Some Time Decoupling Data availability is tied to the availability of the data writer and the history settings Transient Local Data Writer Data Reader TopicA QoS Data Reader 1 Late Joiner 11
  40. 40. CopyrightPrismTech,2017 Some Time Decoupling Data availability is tied to the availability of the data writer and the history settings Transient Local Late Joiner Data Reader TopicA QoS Data Reader 1 1
  41. 41. CopyrightPrismTech,2017 Some Time Decoupling Data availability is tied to the availability of the data writer and the history settings Transient Local Late Joiner 1 1 Data Reader TopicA QoS Data Reader Data Reader This late joiner will not get any data as the writer is gone…
  42. 42. CopyrightPrismTech,2017 Time Decoupling Data availability is tied to the availability of the durability service Transient Durability Data Writer Data Reader TopicA QoS1 1
  43. 43. CopyrightPrismTech,2017 Time Decoupling Data availability is tied to the availability of the durability service Transient Durability Data Writer Data Reader TopicA QoS Data Reader 1 1 Late Joiner 1
  44. 44. CopyrightPrismTech,2017 Time Decoupling Data availability is tied to the availability of the durability service Transient DurabilityLate Joiner Data Writer Data Reader TopicA QoS Data Reader 2 1 2 1 1 2
  45. 45. CopyrightPrismTech,2017 Time Decoupling Data availability is tied to the availability of the durability service Transient DurabilityLate Joiner Data Reader TopicA QoS Data Reader 1 1 2 2 12
  46. 46. CopyrightPrismTech,2017 Time Decoupling Data availability is tied to the availability of the durability service Transient DurabilityLate Joiner 1 1 Data Reader TopicA QoS Data Reader Data Reader 2 2 12 12 Late Joiner
  47. 47. CopyrightPrismTech,2017 Reliability
  48. 48. CopyrightPrismTech,2017 The RELIABILITY QoS Policy controls one of the dimensions of reliability in DDS Yet, the full semantics of DDS reliability is controlled by a combination of the RELIABILITY and the HISTORY QoS Data Reliability QoS Policy Applicability RxO Modifiable RELIABILITY T, DR, DW Y N
  49. 49. CopyrightPrismTech,2017 DDS will deliver an arbitrary subsequence of the samples written against a Topic Instance Samples may be dropped because of network loss or because of flow-control Best Effort RELIBILITY = BEST EFFORT
  50. 50. CopyrightPrismTech,2017 Under stationary conditions an application is guaranteed to receive the last n-samples written for a Topic Instance Samples falling outside the history may be dropped at the sending or receiving side for flow/resource control Notice that this kind of reliability behaves as a circuit breaker for slow consumers Last n-values Reliability RELIABILITY = RELIABLE HISTORY = KEEP_LAST(n)
  51. 51. CopyrightPrismTech,2017 All samples written against a Topic Instance are delivered. Since from a theoretical perspective reliability in asynchronous systems either violate progress or requires infinite memory, DDS provides QoS to control both resources as well as blocking time Reliable RELIABILITY = RELIABLE HISTORY = KEEP_ALL
  52. 52. CopyrightPrismTech,2017 Memory…
  53. 53. CopyrightPrismTech,2017 The Resource Limits QoS Policy controls the maximum size of the DataReader and DataWriter cache through three parameters max_samples: max number of samples the cache may hold max_instances: max number of instances the cache may hold max_samples_ per_instance: max number of samples allowed per instance Resource Limits Cache DataReader/DataWriter ... QoS Policy Applicability RxO Modifiable RESOURCE LIMITS T, DR, DW N N
  54. 54. CopyrightPrismTech,2017 Configures the purge delay for instances that have no writer or which have been disposed This is controlled through the autopurge_nowriter_samples _delay and the autopurge_disposed_samples_delay parameters For both parameters the default delay is infinite ReaderData Lifecycle Cache DataReader ... QoS Policy Applicability RxO Modifiable READER DATA LIFECYCLE DR N Y
  55. 55. CopyrightPrismTech,2017 Controls whether unregistered instances are automatically disposed or not This is controlled through the autodispose_unregistered_instance parameter This parameter is set to true by default WriterData Lifecycle Cache DataWriter ... QoS Policy Applicability RxO Modifiable WRITER DATA LIFECYCLE DW N Y
  56. 56. CopyrightPrismTech,2017 Fault-Tolerance
  57. 57. CopyrightPrismTech,2017 Availability of data producers can be controlled via two QoS Policies: OWNERSHIP (SHARED vs. EXCLUSIVE) OWNERSHIP STRENGTH Instances of exclusively owned Topics can be modified (are owned) by the higher strength writer Writer strength is used to coordinate replicated writers Ownership QoS Policy Applicability RxO Modifiable OWNERSHIP T, DR, DW Y N OWNERSHIP STRENGTH DW N Y
  58. 58. CopyrightPrismTech,2017 The Ownership can be used as a fault-masking mechanism that allow to replicate Sources and transparently switch over when a failure occurs At any point in time the “active” source is the one with the highest strength. Where the strength is an integer parameter controller by the user Fault-Masking Source tSink Source t
  59. 59. CopyrightPrismTech,2017 Temporal Properties
  60. 60. CopyrightPrismTech,2017 The LATENCY_BUDGET QoS policy specifies the maximum acceptable delay from the time the data is written until the data is inserted in the receiver's application-cache A non-zero latency-budget allows a DDS implementation to batch samples and improve CPU/Network utilisation Latency Budget QoS Policy Applicability RxO Modifiable LATENCY BUDGET T, DR, DW Y Y
  61. 61. CopyrightPrismTech,2017 The DEADLINE QoS policy defines the maximum inter- arrival time between data samples DataWriter indicates that the application commits to write a new sample at least once every deadline period DataReaders are notified when the DEADLINE is violated Deadline QoS Policy Applicability RxO Modifiable DEADLINE T, DR, DW Y Y
  62. 62. CopyrightPrismTech,2017 DDS provides mechanism for detecting traditional faults as well as performance failures The Fault-Detection mechanism is controlled by means of the DDS Liveliness policy Performance Failures can be detected using the Deadline Policy which allows to receive notification when data is not received within the expected delays Failure Detection Source tSink Fault Notification TD Source t Sink Performance Failure Notification P t P P
  63. 63. CopyrightPrismTech,2017 The TRANSPORT_PRIORITY QoS policy is a hint to the infrastructure as to how to set the priority of the underlying transport used to send the data. Transport Priority QoS Policy Applicability RxO Modifiable TRANSPORT PRIORITY T, DW N Y
  64. 64. CopyrightPrismTech,2017 The Time Based Filter allows to control the throughput at which data is received by a data reader Samples produced more often than the minimum inter-arrival time are not delivered to the data reader Time-Based Filter QoS Policy Applicability RxO Modifiable TIME BASED FILTER DR N Y
  65. 65. QoS Modeling Idioms
  66. 66. CopyrightPrismTech,2017 Identify the QoS Policies that capture the key non-functional properties of the various kinds of information flow in your system Define these QoS as Topics QoS Create DataReaders and DataWriters but inheriting the Topic QoS System-Level QoS Policies ENTITY FACTORY HISTORY LIFESPAN DURABILITY OWENERSHIP OWN. STRENGTH DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA LIVELINESS DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER Topic RxO QoS Local QoS Not Applicable Immutable
  67. 67. CopyrightPrismTech,2017 Allo for deploy-time refinement of DDS QoS Policies To allow for this leverage the QoS Provider QoS Provider // QosProvider... QosProvider qos_provider( “file:///some/meaningful/path/qos.xml”, “my-qos-profile"); DataReader<AType> dr(sub, topic, qos_provider.datareader_qos());
  68. 68. CopyrightPrismTech,2017 DDS provides first class support for modelling distributed state and events Different QoS combination should be used to associate with the topic representing a state or an event the proper semantics State vs. Events
  69. 69. CopyrightPrismTech,2017 In distributed systems you often need to model soft-state -- a state that is periodically updated Examples are the reading of a sensor (e.g. Temperature Sensor), the position of a vehicle, etc. The QoS combination to model Soft-State is the following: Soft State Reliability => BestEffort Durability => Volatile History => KeepLast(n) [with n = 1 in most of the cases] Deadline => updatePeriod LatencyBudget => updatePeriod/3 [rule of thumb] DestinationOrder => SourceTimestamp [if multiple writers per instance]
  70. 70. CopyrightPrismTech,2017 In distributed systems you often need to model hard-state -- a state that is sporadically updated and that often has temporal persistence requirements Examples are system configuration, a price estimate, etc. The QoS combination to model Hard-State is the following: Hard State Reliability => Reliable Durability => Transient | Persistent History => KeepLast(n) [with n = 1 in most of the cases] DestinationOrder => SourceTimestamp [if multiple writers per instance] WriterDataLifecycle => autodispose_unregistered_instances = false
  71. 71. CopyrightPrismTech,2017 In distributed systems you often need to model events -- the occurrence of something noteworthy for our system Examples are a collision alert, the temperature beyond a given threshold, etc. The QoS combination to model Events is the following: Event Reliability => Reliable Durability => any [depends on system requirements] History => KeepAll [on both DataWriter and DataReader!] DestinationOrder => SourceTimestamp WriterDataLifecycle => autodispose_unregistered_instances = false ResourceLimits => [define appropriate bounds]
  72. 72. CopyrightPrismTech,2017 Summing Up
  73. 73. CopyrightPrismTech,2017 DDS provides a rich set of QoS Policies to control the key aspects of data distribution, availability and resource utilisation These QoS Policies are often applied in synergies to implement key patters Final Remarks HISTORY LIFESPAN DURABILITY DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA OWENERSHIP OWN. STRENGTH LIVELINESS ENTITY FACTORY DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER RxO QoS Local QoSImmutable
  74. 74. CopyrightPrismTech,2017

×