Skip to main content

Repair Layer

This layer is responsible for handling packet loss and corruption. It attaches FEC (Forward Error Correction) to all outgoing packets and attempts to rebuild any inbound packets that are missing or corrupted. If it is unable to rebuild the packet, it will request a retransmission from the source automatically (Automatic Repeat Requests (ARQs)).

The routing and repair layers are closely related and work together to ensure our mesh networks are robust and reliable. They must be able to find paths through the network that are both efficient and reliable, even in the complicated roaming scenarios our primarily mobile devices will encounter. Additionally, they need to be able to re-route packets around nodes that are no longer functioning correctly, find new paths when the network topology changes or becomes inefficient, and handle the loss of packets due to interference, congestion, or other factors.

Accomplishing all of these goals in a way that is both efficient and secure is a significant challenge, which is why even though the repair and routing layers are distributed together, they are separated in our documentation and development to make it easier to reason about and test them. This repair layer will attempt to ignore the routing layer as much as possible, and instead focus on the specific challenges of handling packet loss and corruption. It can be succinctly described as a layer that need-not know about the network topology or conditions, but should do everything possible to make the routing layer's job easier.

📄️ Automatic Repeat Requests (ARQs)

Should the %%FEC%% of a packet fail to rebuild the packet, the repair layer will request a retransmission from the source automatically. This is known as an Automatic Repeat Request (ARQ). Specifically, we will be using a %%Selective Repeat ARQ|SelectiveRepeatARQ%% algorithm, as the alternatives would %%clog the network with ACKs|Stop-and-waitARQ%% or requires a %%correct order of packets|Go-Back-NARQ%% that we cannot guarantee, especially over dynamic routing paths like those in a mesh network. With ARQs, our FEC implementation can be dynamic similar to %%Type II Hybrid ARQ (HARQ)|Hybridautomaticrepeatrequest%%, meaning it could be removed nearly entirely in particularly stable networks to help increase %%throughput|Networkthroughput%%.