I don't understand what it is you don't understand. An InsertRequest is handled just like a DataRequest, forward it to the one (1) node which is the reference for the closest key. Then wait, the results are either:
- RequestFailed: Means that the node had already had this message, send the InsertRequest on the to the next closest instead. - DataReply: Data for this key was found. Pass the data back and forget about the message. - TimedOut: References for this key was found, but data was not. Pass back the TimedOut and forget about the message. - InsertReply: The last node which you sent a RequestFailed to sent the message on and everything worked until it timed out. Pass this message back, and prepare to send a DataInsert to the node which you got the InsertReply from (the last node you sent an InsertRequest to). >From what you write, it sounds almost like you are sending DataRequests to more then one node, which is of course devastatingly wrong. On Sun, 21 May 2000, Adam Langley wrote: > > I know I've asked people this in IRC before but I'm *still* not sure about > this. I don't want to rewrite pages of code because I misunderstood. (just > assume I'm stupid, you should have to tax your imagination too hard ;) > > What should a node do when it gets a InsertRequest? > > If I start forwarding the InsertRequest then all the nodes that return an > InsertReply are expecting the DataInsert. But I shouldn't forward the data to > multiple nodes (because they will also forward the many nodes etc..) > > Should I forward a DataRequest and if I get a failure then should I > InsertRequest simply to the 'best match' node? > > AGL > > -- > If you think things can't get worse it's probably only because you lack > sufficient imagination. > ---------------------------------------- Content-Type: application/pgp-signature; name="unnamed" Content-Transfer-Encoding: 7bit Content-Description: ---------------------------------------- -- Oskar Sandberg md98-osa at nada.kth.se _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
