Why did we decide that an extra State was necessary for asynchronously
sending DataRequests? AFAICS, it could work fine for this sequence, for
example:

We keep a SendFinished for each direction in Pending - one for the node
we are routing to, and one for the node we are sending feedback to.


We get a RequestInitiator
We route to a node and start the send, passing a new SendFinished
callback message to the async sender system. We transition to wherever
we would normally have transitioned to after successfully sending the
message.

We get a QueryRejected (before the send has finished)
We cancel the SendFinished, process the QueryRejected, route to another
node and create another SendFinished.

We get the original SendFinished. If it was successful, everything is
fine, we just had some time dilation. If it was not successful,
something wierd is going on so we log something, but there's not much we
can do about it. Either way, we ignore it. Any state necessary for
logging errors would be kept on the SendFinished itself.


We get an Accepted. Processed normally.

We get the new SendFinished. Which we cancel.

We get a QueryRestarted. We start a send (to relay it) to the orig node.

We get a QueryRejected, and start a send to yet another node as
previously.

We get a SendFinished for the QueryRestarted, which is unsuccessful.
Here is an interesting point. Our current non-async behaviour is to kill
the request. This is probably a good idea because we haven't gotten
anywhere near completion yet... Anyway, it is entirely possible to
transition to RequestDone at this point because the callback is a plain
old message. The only difference is that we started to route to another
node *before* sending the Restarted succeeded.


Bottom line: I don't see any need for a new State for making DataRequest
sends asynchronous. Only a new message. Does this make sense? Any
obvious reason why it would not work?

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.

Attachment: pgp00000.pgp
Description: PGP signature

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to