public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* Suggestions to make ACK easier
@ 2023-07-11 14:28 John Goerzen
  2023-07-11 15:55 ` John Goerzen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: John Goerzen @ 2023-07-11 14:28 UTC (permalink / raw)
  To: nncp-devel

Hi,

A question about ACKs came up on the Matrix channel today, which
prompted me to revisit my previous article about it, at
https://www.complete.org/dead-usb-drives-are-fine-building-a-reliable-sneakernet/

There are two sort of pain points:

1) There is a race condition in that nncp-ack must run before nncp-toss
for incoming packets.

2) We have to save off the list of generated ACKs so that we can remove
them from the queue later.

I think the situation could be simplified with two tweaks:

First, nncp-xfer (and all the others, nncp-call, caller, daemon, bundle,
etc) could have a -ack mode that will cause it to automatically generate
an ack after successful receipt of a packet, eliminating the nncp-toss
race condition.  (Or maybe it would make more sense to put this in toss?
But there I think it would be more easy to generate multiple ACKs)

Then, nncp-xfer -tx could have a -keepexceptacks or something, that would
cause it to keep all packets it sends, EXCEPT for the acks.  That
eliminates the need to save off the list of generated ACKs from an
earlier step.  It may be that the status of a packet as an ACK isn't
available at this point, in which case a separate flag file or something
may be useful.

Thanks,

John

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-13 17:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 14:28 Suggestions to make ACK easier John Goerzen
2023-07-11 15:55 ` John Goerzen
2023-07-30  7:47 ` Sergey Matveev
2023-08-09 12:04 ` Sergey Matveev
2023-08-10  2:04   ` John Goerzen
2023-08-13 20:30     ` Sergey Matveev
2023-09-13 17:29       ` John Goerzen