Skip to content

Reliable topicsย #21

@pavel-kirienko

Description

@pavel-kirienko

There are two main strategies: positive and negative acknowledgements. Negative acknowledgements work well with streamed data but do not appear to be a good choice for ad-hoc exchanges, since the failure will not be discovered until the next successful delivery. Positive acknowledgements, on the other hand, cause undue network loading in high-fanout topics.

One issue with naive multicast positive acks is the uncertainty of how many nodes have actually received the transfer if we assume it delivered based on a single ack. We can assume that for positive acks, the links are either point-to-point (single subscriber), OR the application only cares about one acknowledgement (anycast), OR the application assumes that if one copy was delivered successfully, then the other copy has probably succeeded as well (depends on the required reliability guarantees).

It seems clear that paks/naks should be produced at the transport library level because any higher level lacks the necessary context. If we take paks as an example, the transport library will need to emit one when a transfer is successfully received, OR when a transport frame with a transfer-ID from the past is received; the higher layers are not even notified when the latter occurs. If we take naks, the transport library also has access to the required state to notice that a transfer-ID was skipped; similarly, it will also notice when a transfer could not be reassembled due to a CRC error, which also warrants a nak.

Contrary to pak/nak production, retransmission can be handled at the Cy level, and it is more convenient also since this is a highly stateful process.

Depending on the reliability mode, the transport can notify the sender when:

  • A transfer is successfully received (pak).

  • A transfer-ID from the past is observed on a transport frame (pak). This case occurs if an earlier pak was lost while in transit to the sender and the sender attempts to retransmit; the received does not need to bother receiving that transfer, simply acknowledging it speculatively.

  • A transfer-ID from the future is observed on a transport frame (nak). Should the sender still attempt to receive the out-of-order transfer? If it does, the transfer will need to be stashed away somewhere until the earlier transfer-ID is received, since transfer-ID monotonicity is a fairly fundamental property. This gets convoluted quickly.

  • A transfer could not be reassembled due to CRC error (nak).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions