Chapter 36 Guaranteed Delivery of Data
Some application scenarios need to ensure that the information produced by certain producers is delivered to all the intended consumers. This chapter describes the mechanisms available in Connext to guarantee the delivery of information from producers to consumers such that the delivery is robust to many kinds of failures in the infrastructure, deployment, and even the producing/consuming applications themselves.
Guaranteed information delivery is not the same as protocol-level reliability (described in Chapter 35 Reliability Models for Sending Data) or information durability (described in Chapter 24 Mechanisms for Achieving Information Durability and Persistence). Guaranteed information delivery is an end-to-end application-level QoS, whereas the others are middleware-level QoS. There are significant differences between these two:
- With protocol-level reliability alone, the producing application knows that the information is received by the protocol layer on the consuming side. However the producing application cannot be certain that the consuming application read that information or was able to successfully understand and process it. The information could arrive in the consumer’s protocol stack and be placed in the DataReader cache but the consuming application could either crash before it reads it from the cache, not read its cache, or read the cache using queries or conditions that prevent that particular DDS data sample from being accessed. Furthermore, the consuming application could access the DDS sample, but not be able to interpret its meaning or process it in the intended way.
- With information durability alone, there is no way to specify or characterize the intended consumers of the information. Therefore the infrastructure has no way to know when the information has been consumed by all the intended recipients. The information may be persisted such that it is not lost and is available to future applications, but the infrastructure and producing applications have no way to know that all the intended consumers have joined the system, received the information, and processed it successfully.
The guaranteed data-delivery mechanism provided in Connext overcomes the limitations described above by providing the following features:
- Required subscriptions. This feature provides a way to configure, identify and detect the applications that are intended to consume the information. See 34.13 Required Subscriptions.
- Application-level acknowledgments. This feature provides the means ensure that the information was successfully processed by the application-layer in a consumer application. See 34.12 Application Acknowledgment.
- Durable subscriptions. This feature leverages the RTI Persistence Service to persist DDS DDS samples intended for the required subscriptions such that they are delivered even if the originating application is not available. See 86.9 Configuring Durable Subscriptions in Persistence Service.
These features used in combination with the mechanisms provided for Information Durability and Persistence (see Chapter 24 Mechanisms for Achieving Information Durability and Persistence) enable the creation of applications where the information delivery is guaranteed despite application and infrastructure failures. 36.4 Use Cases describes various guaranteed-delivery scenarios and how to configure the applications to achieve them.
When implementing an application that needs guaranteed data delivery, we have to consider three key aspects:
|
Key Aspects to Consider |
Related Features and QoS |
|
Identifying the required consumers of information |
Required subscriptions Durable subscriptions EntityName QoS policy Availability QoS policy |
|
Ensuring the intended consumer applications process the data successfully |
Application-level acknowledgment Acknowledgment by a quorum of required and durable subscriptions Reliability QoS policy (acknowledgment mode) Availability QoS policy |
|
Ensuring information is available to late joining applications |
Persistence Service Durable Subscriptions Durability QoS Durable Writer History |