• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
The DDS Tutorial Part II
 

The DDS Tutorial Part II

on

  • 3,505 views

The Data Distribution Service for Real-Time Systems (DDS) is an Object Management Group (OMG) standard for publish/subscribe designed to address the needs of a large class of mission- and ...

The Data Distribution Service for Real-Time Systems (DDS) is an Object Management Group (OMG) standard for publish/subscribe designed to address the needs of a large class of mission- and business-critical distributed real-time systems and system of systems. The DDS standard was formally adopted in 2004 and in less than five years from its inception has experienced swift adoption in a wide variety of application domains. These application domains are characterized by the need to distribute high volumes of data with predictable low latencies, such as, Radar Processors, Flying and Land Drones, Combat Management Systems, Air Traffic Management, High Performance Telemetry, Large Scale Supervisory Systems, and Automated Stocks and Options Trading. Along with wide commercial adoption, the DDS Standard has been recommended and mandated as the technology for real-time data distribution by key administrations worldwide such as the US Navy, the DoD Information-Technology Standards Registry (DISR), the UK MoD, and EUROCONTROL.

Statistics

Views

Total Views
3,505
Views on SlideShare
3,270
Embed Views
235

Actions

Likes
2
Downloads
272
Comments
2

3 Embeds 235

http://www.prismtech.com 218
http://www.slideshare.net 16
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Your observation would be right for the IDL derived C++ API. The tutorial relies on the upcoming ISO C++ API for DDS (See http://www.slideshare.net/Angelo.Corsaro/iso-c-dds-psm for a description). This C++ API does not have neither _ptr nor _var pointer, it has by-references types and by-values types, where by-reference types have the memory automatically managed.
    Are you sure you want to
    Your message goes here
    Processing…
  • note:

    dds::QueryCondition is pointer-based. If you do not define it immediately use dds::QueryCondition_var to reference it.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    The DDS Tutorial Part II The DDS Tutorial Part II Presentation Transcript

    • OpenSplice DDS Delivering Performance, Openness, and Freedom The DDS Tutorial Angelo Corsaro, Ph.D. Chief Technology Officer OMG DDS SIG Co-Chair angelo.corsaro@prismtech.com ::Part II 1
    • Tutorial Scope Scope & Goals ‣ The Tutorial will cover the DCPS layer of DDS Application ‣ It will give you enough details and examples Object/Relational Mapping to make sure that you can get started Data Local Reconstruction Layer (DLRL) writing DDS applications Content Ownership Durability Subscription Software ‣ OpenSplice DDS Minimum Profile Data Centric Publish/Subscribe (DCPS) ‣ http://www.opensplice.org Real-Time Publish/Subscribe Protocol ‣ SIMple Dds (SIMD) DDS Interoperability Wire Protocol ‣http://code.google.com/p/simd-cxx UDP/IP Prerequisite ‣ Basic C++ understanding © 2010, PrismTech. All Rights Reserved 2
    • What You’ve Learned on Part I ‣Defining Topics and Topic Types ‣Scoping Information with Partitions ‣Writing Data ‣Reading (Taking) data with Waitsets and Listeners ‣Writing an example that demonstrate all of the above © 2010, PrismTech. All Rights Reserved 3
    • What we’ll Cover Today ‣Content Filtered Topics and Queries ‣QoS and the Request vs. Offered Model ‣Setting QoS on DDS Entities ‣Tuning OpenSplice DDS Configuration © 2010, PrismTech. All Rights Reserved 4
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Your will learn: - What Filters and Queries are - The available SQL92 subset - Programming Filters and Queries Filters and Queries 5
    • DDS Filters & Queries ‣ DDS provides means for filtering data using an application specified condition expression ‣ The two mechanism provided in order to filter data are: ‣ ContentFilteredTopics ‣ QueryCondition ‣ Both working in conjunction with a DataReader © 2010, PrismTech. All Rights Reserved 6
    • ContentFilteredTopic ‣ A ContentFilteredTopic can be seen as a decorator of a user defined topic defining a specific filter over the data published for the given topic ‣ As a result, a ContentFilteredTopic always exist in conjunction with its related Topic related topic ‣ A DataReader created with a specific ContentFilteredTopic will only receive the data that matches the filter condition ‣ ContentFilteredTopic can be thought of as Continuous Queries © 2010, PrismTech. All Rights Reserved 7
    • QueryCondition ‣ A QueryCondition can be created over an existing DataReader in order to select, among received data, only the subset matching the condition associated with the QueryCondition ‣ QueryCondition are created for a specific DataReader and used as an argument of the DataReader::read_w_condition method © 2010, PrismTech. All Rights Reserved 8
    • Filters & Queries Grammar Condition::= Predicate | Condition ‘AND’ Condition | Condition ‘OR’ Condition | ‘NOT’ Condition | ‘(’ Condition ‘)’ Predicate::= ComparisonPredicate | BetweenPredicate ComparisonPredicate::= FIELDNAME RelOp Parameter | Parameter RelOp FIELDNAME BetweenPredicate::= FIELDNAME ‘BETWEEN’ Range | FIELDNAME ‘NOT BETWEEN’ Range RelOp::= ‘=’ | ‘>’ | ‘>=’ | ‘<’ | ‘<=’ | ‘<>’ | like Range::= Parameter ‘AND’ Parameter Parameter::= INTEGERVALUE | FLOATVALUE | STRING | ENUMERATEDVALUE | PARAMETER where PARAMETER has the for %n (with n in 0..100) © 2010, PrismTech. All Rights Reserved 9
    • ContentFilteredTopics in SIMD template <typename T> class dds::ContentFilteredTopic : public dds::TopicDescription { public: ContentFilteredTopic(const std::string& name, const dds::Topic<T>& t, const std::string& filter, const std::vector<std::string>& params); virtual ~ContentFilteredTopic(); public: std::string get_filter_expression() const; std::vector<std::string> get_expression_parameters() const; void set_expression_parameters(const std::vector<std::string>& params); dds::Topic<T> get_related_topic() const; virtual std::string get_name() const; virtual std::string get_type_name() const; virtual dds::DomainParticipant get_participant() const; TopicQos get_qos() const; void set_qos(const TopicQos& qos); }; © 2010, PrismTech. All Rights Reserved 10
    • Using ContentFilteredTopics enum TemperatureScale { CELSIUS, // Create the "TempSensor" Topic FAHRENHEIT, dds::Topic<TempSensorType> tsTopic("TempSensor"); KELVIN }; // Create the filter parameters std::vector<std::string> params(2); struct TempSensorType { short id; params[0] = "30"; float temp; params[1] = "0.6"; float hum; TemperatureScale scale; // Create the ContentFilteredTopic }; dds::ContentFilteredTopic<TempSensorType> #pragma keylist TempSensorType id cfTsTopic("TempSensor-1", tsTopic, "(temp < %0) AND (hum < %1)", params); // Create the DataReader with for the ContentFilteredTopic dds::DataReader<TempSensorType> dr(cfTsTopic); © 2010, PrismTech. All Rights Reserved 11
    • QueryCondition in SIMD template <typename T> class DataReader { public: // [...] Other DataReader methods QueryCondition create_querycondition(const std::string& expression, const std::vector& params); QueryCondition create_querycondition(const SampleStateMask& samples_state, const ViewStateMask& views_state, const InstanceStateMask& instances_state, const std::string& expression, const std::vector& params); ReturnCode_t read_w_condition(TSeq& samples, SampleInfoSeq& infos, const QueryCondition& cond); ReturnCode_t read_w_condition(TSeq& samples, SampleInfoSeq& infos, const QueryCondition& cond, long max_samples); ReturnCode_t take_w_condition(TSeq& samples, SampleInfoSeq& infos, const QueryCondition& cond); ReturnCode_t take_w_condition(TSeq& samples, SampleInfoSeq& infos, const QueryCondition& cond, long max_samples); } © 2010, PrismTech. All Rights Reserved 12
    • Using QueryConditions dds::Topic<TempSensorType> tsTopic("TempSensor"); dds::DataReader<TempSensorType> dr(tsTopic); std::vector<std::string> params(2); params[0] = "30"; params[1] = "0.6"; // Create Query Condition dds::QueryCondition cond = dr.create_querycondition("(temp < %0) AND (hum < %1)", params); TempSensorTypeSeq data; SampleInfoSeq info; // Read with Condition dr.read_w_condition(data, info, cond); © 2010, PrismTech. All Rights Reserved 13
    • Filters vs Queries QueryCondition (temp < 30) AND (hum < 0.6) DataReader DataReader ReaderCache 1 26 0.4 C ReaderCache 1 28 0.5 C (temp < 30) AND (hum < 0.6) 1 31 0.5 C ContentFilteredTopic 1 30 0.7 C 1 29 0.5 C © 2010, PrismTech. All Rights Reserved 14
    • Filters vs Queries QueryCondition (temp < 30) AND (hum < 0.6) DataReader DataReader 1 26 0.4 C 1 26 0.4 C 1 28 0.5 C 1 28 0.5 C 1 31 0.5 C 1 29 0.5 C 1 30 0.7 C 1 29 0.5 C ReaderCache ReaderCache (temp < 30) AND (hum < 0.6) ContentFilteredTopic © 2010, PrismTech. All Rights Reserved 15
    • Filters vs Queries 1 26 0.4 C read() read_w_condition() 1 28 0.5 C QueryCondition 1 29 0.5 C (temp < 30) AND (hum < 0.6) DataReader DataReader 1 26 0.4 C 1 26 0.4 C 1 28 0.5 C 1 28 0.5 C 1 31 0.5 C 1 29 0.5 C 1 30 0.7 C 1 29 0.5 C ReaderCache ReaderCache (temp < 30) AND (hum < 0.6) ContentFilteredTopic © 2010, PrismTech. All Rights Reserved 16
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Your will learn: - What can you control with QoS - Request vs. Offered in DDS - QoS Patterns Quality of Service (QoS) 17
    • Anatomy of a DDS Application Topic Topic Topic Samples Samples Instances Samples Instances Instances 1 21 62 1 21 62 1 22 62 1 22 62 1 23 63 1 23 63 DataReader DataReader 1 21 0.6 C 2 20 61 2 19 60 1 22 0.6 C 1 23 0.7 C DataReader DataReader 2 20 61 2 20 0.6 F 2 19 60 DataWriter DataWriter DataReader DataReader 3 25 70 3 25 71 25 2 19 0.6 F 3 25 74 3 26 77 3 26 77 DataWriter DataWriter struct TempSensor { 3 25 70 3 25 71 25 3 25 74 int tID; 3 75 0.1 K 3 8 0.1 K 3 95 0.2 K float temp; float humidity; TemperatureScale scale; }; #pragma keylist TempSensor tID © 2010, PrismTech. All Rights Reserved 18
    • Anatomy of a DDS Application Topic Topic Topic Samples Samples Instances Samples Instances Instances 1 21 62 1 21 62 1 22 62 1 22 62 1 23 63 1 23 63 DataReader DataReader 1 21 0.6 C 2 20 61 2 19 60 1 22 0.6 C 1 23 0.7 C DataReader DataReader 2 20 61 2 20 0.6 F 2 19 60 DataWriter DataWriter DataReader DataReader 3 25 70 3 25 71 25 2 19 0.6 F 3 25 74 3 26 77 3 26 77 DataWriter DataWriter struct TempSensor { 3 25 70 3 25 71 25 3 25 74 int tID; 3 75 0.1 K 3 8 0.1 K 3 95 0.2 K float temp; float humidity; Arrows TemperatureScale scale; }; show #pragma keylist TempSensor tID structural relationship s, not data- Subscriber Publisher flows Partition © 2010, PrismTech. All Rights Reserved 19
    • Anatomy of a DDS Application Topic Topic Topic Samples Samples Instances Samples Instances Instances 1 21 62 1 21 62 1 22 62 1 22 62 1 23 63 1 23 63 DataReader DataReader 1 21 0.6 C 2 20 61 2 19 60 1 22 0.6 C 1 23 0.7 C DataReader DataReader 2 20 61 2 20 0.6 F 2 19 60 DataWriter DataWriter DataReader DataReader 3 25 70 3 25 71 25 2 19 0.6 F 3 25 74 3 26 77 3 26 77 DataWriter DataWriter struct TempSensor { 3 25 70 3 25 71 25 3 25 74 int tID; 3 75 0.1 K 3 8 0.1 K 3 95 0.2 K float temp; float humidity; Arrows TemperatureScale scale; }; show #pragma keylist TempSensor tID structural relationship s, not data- Subscriber Publisher flows Partition Domain Participant Domain © 2010, PrismTech. All Rights Reserved 20
    • QoS Model ‣ QoS-Policies are used to control relevant properties of OpenSplice DDS entities, Type Matching QoS matching such as: QoS QoS QoS QoS QoS QoS QoS ‣ Temporal Properties Topic ‣ Priority Publisher Name Subscriber ... DataWriter writes Type reads DataReader ... ‣ Durability ... ‣ Availability DomainParticipant DataWriter writes Type reads DataReader DomainParticipant ‣ ... Topic Name ‣ Some QoS-Policies are matched based on QoS QoS QoS a Request vs. Offered Model thus QoS- enforcement ‣ Publications and Subscriptions match only if the declared vs. requested QoS are compatible ‣ e.g., it is not possible to match a publisher which delivers data unreliably with a subscriber which requires reliability © 2010, PrismTech. All Rights Reserved 21
    • QoS Policies QoS Policy Applicability RxO Modifiable Type Matching QoS matching DURABILITY T, DR, DW Y N Data Availability QoS QoS QoS QoS QoS QoS QoS DURABILITY SERVICE T, DW N N Topic Name Publisher Subscriber LIFESPAN T, DW N/A Y ... DataWriter writes Type reads DataReader ... T, DR, DW N N ... HISTORY DomainParticipant DataWriter writes Type reads DataReader DomainParticipant PRESENTATION P, S Y N Data Delivery Name Topic RELIABILITY T, DR, DW Y N PARTITION P, S N Y QoS QoS QoS DESTINATION ORDER T, DR, DW Y N OWNERSHIP T, DR, DW Y N OWNERSHIP DW N/A Y STRENGTH DEADLINE T, DR, DW Y Y Data Timeliness ‣ Rich set of QoS allow to configure LATENCY BUDGET T, DR, DW Y Y several different aspects of data TRANSPORT PRIORITY T, DW N/A Y availability, delivery and timeliness TIME BASED FILTER DR N/A Y Resources ‣ QoS can be used to control and RESOURCE LIMITS T, DR, DW N N optimize network as well as DP, DR, DW N Y computing resource USER_DATA Configuration TOPIC_DATA T N Y GROUP_DATA P, S N Y © 2010, PrismTech. All Rights Reserved 22
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Controlling Reliability 23
    • Reliability The RELIABILITY QoS indicate the level of guarantee offered by the DDS in delivering data to subscribers. Possible variants are: QoS Policy Applicability RxO Modifiable ‣ Reliable. In steady-state the RELIABILITY T, DR, DW Y N middleware guarantees that all samples in the DataWriter history will QoS matching eventually be delivered to all the QoS QoS QoS DataReader QoS Topic QoS ‣ Best Effort. Indicates that it is DataWriter writes Type Name reads DataReader acceptable to not retry propagation of Publisher ... Subscriber ... ... any samples DataWriter writes Type reads DataReader Name Topic QoS QoS QoS QoS matching © 2010, PrismTech. All Rights Reserved 24
    • History ‣ The History QoS Controls the number of samples-per-instance that will be stored by the middleware on behalf of a Reader ‣ Keep Last K. The History QoS can be set so to always QoS matching have the latest K samples QoS QoS QoS ‣ Keep All. The History QoS can be set so keep all QoS Topic Name QoS samples produced by the writer and not yet taken, DataWriter writes Type reads DataReader until resource limits are not reached Publisher ... ... ... Subscriber DataWriter writes Type reads DataReader DataReader DataReader Topic Name QoS QoS QoS 1 1 1 1 1 2 1 3 1 4 1 5 QoS matching 2 1 2 1 2 2 2 3 2 4 2 5 3 1 3 1 3 2 3 3 3 4 3 5 QoS Policy Applicability RxO Modifiable HISTORY T, DR, DW N N Topic Topic History Depth = 1 (DDS Default) History Depth = 5 © 2010, PrismTech. All Rights Reserved 25
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Topic Used in next section. struct Counter { }; int cID; int count; #pragma keylist Counter cID History in Action 26
    • History in Action History Depth = 1 History Depth = 1 (DDS Default) (DDS Default) Network 1 1 1 2 DataReader 2 1 1 2 2 3 DataWriter 3 1 2 2 2 3 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 27
    • History in Action History Depth = 1 History Depth = 1 (DDS Default) (DDS Default) Network 1 2 1 2 DataReader 2 2 2 3 DataWriter 3 1 2 3 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 28
    • History in Action History Depth = 1 History Depth = 1 (DDS Default) (DDS Default) Network 1 2 1 2 DataReader 2 3 2 3 DataWriter 3 1 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 29
    • History in Action History Depth = 2 History Depth = 1 (DDS Default) Network 1 1 1 2 DataReader 2 1 1 2 2 3 DataWriter 3 1 2 2 2 3 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 30
    • History in Action History Depth = 2 History Depth = 1 (DDS Default) Network 1 1 1 2 1 2 DataReader 2 1 2 2 2 3 DataWriter 3 1 2 3 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 31
    • History in Action History Depth = 2 History Depth = 1 (DDS Default) Network 1 1 1 2 1 2 DataReader 2 2 2 3 2 3 DataWriter 3 1 3 1 Topic Topic DataReader Cache DataWriter Cache Note: The Reliability QoS controls wether data is sent reliably, or best-effort, from the DataWriter to matched DataReaders © 2010, PrismTech. All Rights Reserved 32
    • Putting it All Together The reliability with which data is delivered to applications is impacted in DDS by the following qualities of service ‣ RELIABILITY ‣ BEST_EFORT ‣ RELIABLE ‣ HISTORY ‣ KEEP_LAST (K) ‣ KEEP_ALL ‣ Theoretically, the only way to assure that an application will see all the samples produced by a writer is to use RELIABLE+KEEP_ALL. Any other combination could induce to samples being discarded on the receiving side because of the HISTORY depth © 2010, PrismTech. All Rights Reserved 33
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Controlling Real-Time Properties 34
    • Deadline You can’t be later than... The DEADLINE QoS policy allows to define the maximum inter-arrival time between data samples QoS Policy Applicability RxO Modifiable QoS matching DEADLINE T, DR, DW Y Y QoS QoS QoS ‣ DataWriter indicates that the application QoS Topic Name QoS commits to write a new value at least once DataWriter writes Type reads DataReader Publisher ... Subscriber every deadline period ... ... ‣ writes Type reads DataReader DataReaders are notified by the DDS when DataWriter Name the DEADLINE QoS contract is violated Topic QoS QoS QoS QoS matching Publisher Subscriber Deadline Deadline Deadline Deadline Deadline Deadline Violation © 2010, PrismTech. All Rights Reserved 35
    • Latency Budget I need to get there in at most... 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 QoS Policy Applicability RxO Modifiable LATENCY T, DR, DW Y Y BUDGET ‣ The default value of the duration is zero indicating that the delay should be minimized QoS matching ‣ This policy is a hint to the DDS, not something that must be QoS QoS QoS monitored or enforced. QoS Topic QoS Name DataWriter writes Type reads DataReader Publisher ... Subscriber ... ... DataWriter writes Type reads DataReader Name TBuff Latency Budget = Latency = TBuff +T1+T2+T3 Topic QoS QoS QoS QoS matching T3 T1 T2 © 2010, PrismTech. All Rights Reserved 36
    • Transport Priority VIP Data, stay clear! QoS Policy Applicability RxO Modifiable TRANSPORT T, DW - Y QoS matching PRIORITY QoS QoS QoS QoS Topic QoS Name The TRANSPORT_PRIORITY QoS policy DataWriter writes Type reads DataReader is a hint to the infrastructure as to how Publisher ... ... ... Subscriber to set the priority of the underlying DataWriter writes Type reads DataReader transport used to send the data. Name Topic QoS QoS QoS QoS matching © 2010, PrismTech. All Rights Reserved 37
    • Putting it all Together The real-time properties with which data is delivered to applications is impacted in DDS by the following qualities of service: Publisher Subscriber ‣ TRANSPORT_PRIORITY Deadline Deadline Deadline Deadline Deadline ‣ LATENCY_BUDGET Deadline Violation ‣ In addition, DDS provides means for detecting performance failure, e.g., Deadline miss, by means of the DEADLINE QoS ‣ Given a periodic task-set {T} with periods Di (with Di < Di+1) and deadline equal to the period, than QoS should be set as follows: ‣ Assign to each task Ti a TRANSPORT_PRIORITY Pi such that Pi > Pi+1 ‣ Set for each task Ti a DEADLINE QoS of Di ‣ For maximizing throughput and minimizing resource usage set for each Ti a LATENCY_BUDGET QoS between Di /2 and Di/3 (this is a rule of thumb, the upper bound is Di-(RTT/2)) © 2010, PrismTech. All Rights Reserved 38
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Controlling the Consistency Model 39
    • Durability The DURABILITY QoS controls the data availability w.r.t. late joiners, specifically the DDS provides the following variants: QoS Policy Applicability RxO Modifiable DURABILITY T, DR, DW Y N DURABILITY T, DW N N ‣ Volatile. No need to keep data instances SERVICE for late joining data readers ‣ Transient Local. Data instance availability QoS matching QoS QoS QoS for late joining data reader is tied to the data writer availability QoS Topic Name QoS ‣ Transient. Data instance availability Publisher ... DataWriter writes Type reads DataReader Subscriber ... ... outlives the data writer ‣ Persistent. Data instance availability DataWriter writes Type reads DataReader Name Topic outlives system restarts QoS QoS QoS QoS matching The DURABILITY_SERVICE QoS provide control over configuration of the service that implements the transient and persistent durability features © 2010, PrismTech. All Rights Reserved 40
    • Eventual Consistency & R/W Caches DataReader DataReader 1 1 2 1 DataWriter 1 1 3 1 2 1 1 2 Topic DataReader 1 2 2 3 3 1 DataReader Cache 2 2 2 3 3 1 Topic 1 1 DataReader Cache 2 Topic 1 DDS DataWriter Cache 3 1 Topic DataReader Cache Under an Eventual Consistency Model, DDS guarantees that all matched Reader Caches will eventually be identical of the respective Writer Cache © 2010, PrismTech. All Rights Reserved 41
    • QoS Impacting the Consistency Model The DDS Consistency Model is a property that can be associated to Topics or further refined by Reader/Writers. The property is controlled by the following QoS Policies: ‣ DURABILITY ‣ VOLATILE | TRANSIENT_LOCAL | TRANSIENT | PERSISTENT ‣ LIFESPAN ‣ RELIABILITY ‣ RELIABLE | BEST_EFFORT ‣ DESTINATION ORDER ‣ SOURCE_TIMESTAMP | DESTINATION_TIMESTAMP QoS Policy Applicability RxO Modifiable DURABILITY T, DR, DW Y N LIFESPAN T, DW - Y RELIABILITY T, DR, DW Y N DESTINATION ORDER T, DR, DW Y N © 2010, PrismTech. All Rights Reserved 42
    • QoS Impacting the Consistency Model DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency VOLATILE RELIABLE SOURCE_TIMESTAMP INF. (No Crash / Recovery) Eventual Consistency TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. (Reader Crash / Recovery) Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. (Crash/Recovery) Eventual Consistency PERSISTENT RELIABLE SOURCE_TIMESTAMP INF. (Crash/Recovery) Weak Consistency ANY ANY DESTINATION_TIMESTAMP ANY Weak Consistency ANY BEST_EFFORT ANY ANY Weak Consistency ANY ANY ANY N © 2010, PrismTech. All Rights Reserved 43
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B P1 m A F J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B P1 m A A F J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B A P1 m A A F J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B A P1 m B A A F J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B B A P1 m A A F J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B B A P1 m S= {A, B, J} A A F S2 J D C P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 P = {A, B} B B A P1 m S= {A, B, J} A A F S2 J D C BA P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 44
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 B B A m S= {A, B, J} A F S2 J D C BA P = {D, C, J} P2 K E S = {A} S4 © 2010, PrismTech. All Rights Reserved A 45
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 B B A m S= {A, B, J} A F S2 J D C BA P = {D, C, J} S= {A, B, D, J} P2 K E S3 S = {A} S4 © 2010, PrismTech. All Rights Reserved A 45
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 B B A m S= {A, B, J} A F S2 J J D D C BA P = {D, C, J} S= {A, B, D, J} P2 K E S3 S = {A} JB S4 © 2010, PrismTech. All Rights Reserved A 45
    • Eventual Consistency @ Work DURABILITY RELIABILITY DESTINATION_ORDER LIFESPAN Eventual Consistency (Reader TRANSIENT_LOCAL RELIABLE SOURCE_TIMESTAMP INF. Crash / Recovery) {A} Eventual Consistency TRANSIENT RELIABLE SOURCE_TIMESTAMP INF. {B} (Crash/Recovery) Weak Consistency ANY ANY ANY N {J} S = {A, D} S1 B B A m S= {A, B, J} A F S2 J D D C BA P = {D, C, J} S= {A, B, D, J} P2 K E S3 S = {A} JB S4 © 2010, PrismTech. All Rights Reserved A 45
    • OpenSplice DDS Delivering Performance, Openness, and Freedom Controlling Replication 46
    • Ownership Who owns the data? The OWNERSHIP QoS specifies whether it is allowed for multiple DataWriters to write the same instance of the data and if so, how these modifications should be arbitrated. Possible choices are: ‣ Shared. Multiple writers are allowed to QoS Policy Applicability RxO Modifiable update the same instance and all the OWNERSHIP T, DR, DW Y N updates are made available to the reader QoS matching ‣ Exclusive. Indicates that each instance can QoS QoS QoS only be owned by one DataWriter, but the Topic owner of an instance can change QoS Name QoS dynamically -- due to liveliness changes DataWriter writes Type reads DataReader Publisher ... Subscriber ... ‣ The selection of the owner is controlled by DataWriter writes ... Type reads DataReader the setting of the OWNERSHIP_STRENGTH Name QoS policy Topic QoS QoS QoS QoS matching © 2010, PrismTech. All Rights Reserved 47
    • Ownership Strength How strong are you? The OWNERSHIP_STRENGTH Specifies the value of the “strength” used to arbitrate among DataWriters that attempt to modify the same data instance ‣ Data instance are identified QoS matching by the couple (Topic, Key) QoS QoS QoS ‣ The policy applies only if the OWNERSHIP is EXCLUSIVE QoS Topic Name QoS DataWriter writes Type reads DataReader Publisher ... Subscriber ... ... QoS Policy Applicability RxO Modifiable OWNERSHIP DW - Y DataWriter writes Type reads DataReader STRENGTH Name Topic QoS QoS QoS QoS matching © 2010, PrismTech. All Rights Reserved 48
    • Next Steps ‣ By now you’ve learned most of what you need to write complex DDS applications ‣ However, as the wise Confucius used to say: ‣ I hear an I forget. I see and I remember. I do I understand. ‣ The best way of really getting into DDS is to write some DDS applications, utilities or extensions © 2010, PrismTech. All Rights Reserved 49
    • Online Resources http://www.opensplice.com/ http://www.slideshare.net/angelo.corsaro emailto:opensplicedds@prismtech.com http://bit.ly/1Sreg http://twitter.com/acorsaro/ http://opensplice.blogspot.com http://www.youtube.com/OpenSpliceTube © 2009, PrismTech. All Rights Reserved 50