Send Acknowledgment is just one of several software stories that got completed recently. In this new section of ‘Dev In-Depth’ we will try to shine a bit more light on what it is actually about, why it matters and how it works. Feel free to comment, or ask questions!
The aim of ‘Send Acknowledgement’ is to increase fault tolerance in routing when a message is passed on through the SAFE network.
Perhaps a short recap is in order first. In the SAFE network, messages are forwarded thanks to the address space with a XOR distance measure. A message is always destined for a specific nodeID. At routing level we don’t care whether it’s a MAID, PMID or other ID, so any ID is captured by the more general nodeID class. A node that receives a message for another nodeID will look through the list of all the nodes it knows of. Thanks to the XOR distance it can efficiently calculate which of these nodes is closest to the destination target, and send the message on. This way we have no need to flood the network with messages, hoping to reach the target; we know we will converge onto it efficiently.
The SAFE network also guarantees that your messages don’t get lost along the way. Messages in the SAFE network can be up to 2MB in size. (RUDP will break them up further into packets of 65kB.) This means we can’t just store the messages on all nodes it passed along its route, when would it be appropriate to clean them out? This is where ‘send acknowledgement’ plays its part.
Let’s follow one message along while it hops from node to node, increasingly closer to its destination. Reliable UDP (the layer underneath Routing) already reports back to the previous node that it received all RUDP packets correctly. When a node has forwarded a message successfully onto to the next node, it knows this through all the successfully sent RUDP packets for that message. The node will now send a Routing message back, a ‘Routing acknowledgment’ if you will, to it’s previous node.
Why is this important? The previous node knows that when it receives the Routing acknowledgment message the next and second next node now have a full copy of the message. Once acknowledged, the node can now forget about that routing message. There are always two full copies of the message further along in the network. If a message transfer fails at any point, the message can always continue along a new route. With ‘send acknowledgement’ the network achieves this in the most efficient way.
Let us know of what you think of the new format, and be sure to ask questions or comment !