HAMNET-Access-Protocol / HNAP4PlutoSDR

Main transceiver application
GNU Lesser General Public License v3.0
29 stars 5 forks source link

Implement ARQ for data transmission #10

Open dl1com opened 4 years ago

dl1com commented 4 years ago

I propose to add a selective acknowledgement algorithm (see also https://en.wikipedia.org/wiki/Retransmission_(data_networks)). Some thoughts on this:

Receiver:

Sender:

It should be configurable whether ARQ mode is used, or for which type(s) of data it is used (e.g. UDP traffic vs. TCP traffic).

Possible optimizations (later work):

lukasostendorf commented 4 years ago

I started to implement an ARQ scheme based on the selective repeat algorithm. I think selective repeat ARQ with a sender window will give us a better throughput. The idea of waiting until one frame is received and requesting retransmission of all missing fragments on a frame per frame basis gives us high waiting times especially if the number of fragments per frame is low.

Working branch: https://github.com/HAMNET-Access-Protocol/HNAP4PlutoSDR/tree/arq_scheme The following has been implemented:

Open questions

Shall we include a retransmission limit at the sender side? The difficulty with this is how can the receiver notice that the sender "gave up" to finish the transmission of a certain sequence. The current implementation expects that the sender window is small enough to avoid any sequence numbering ambiguities and that the sender retries transmissions until everything is received. If the first assumption is not valid anymore, this leads to partially received frames in the rx buffer, that are never released and therefore might be mixed up with later received frames.

dl1com commented 4 years ago

Shall we include a retransmission limit at the sender side? The difficulty with this is how can the receiver notice that the sender "gave up" to finish the transmission of a certain sequence. The current implementation expects that the sender window is small enough to avoid any sequence numbering ambiguities and that the sender retries transmissions until everything is received. If the first assumption is not valid anymore, this leads to partially received frames in the rx buffer, that are never released and therefore might be mixed up with later received frames.

@hgn Any comments/experiences on this? A short search on this topic brought up this paper: https://onlinelibrary.wiley.com/doi/pdf/10.1002/ecja.10181 (I don't have access to it, though).

@lukasostendorf Is packet ordering still maintained in AM? From what I see in the code, all fragments of a frame have to be transmitted successfully before sending the fragments of the next frame, is this correct?