From: Mirco M. <m.m...@cs...> - 2007-01-16 22:16:56
|
Hi, As you know, I am implementing a forwarding algorithm for Haggle based on periodic retransmissions to the final destinations or to intermediate message carriers -- using a more hagglish terminology, FO carriers. I am trying to encapsulate all the code in a class implementing the ForwardingAlgorithm interface (and some accessory classes). I have a suggestion about the specification of the interface ForwardingManager (and its current implementation DefaultForwardingManager). In the current implementation, the setForwardingTask() method is called periodically by the ForwardingManager. However, this call is repeated at a fixed interval (set using a sleep with a constant duration). I suggest to add a primitive to allow the developers to set this value - I think that this may be quite useful for all the protocols based on re-transmissions to reach the final destinations (also using intermediate carriers). The downside of this solution may be that the creation of the Forwarding Object may be delayed (i.e., the first attempt of transmission of a DO may be delayed). To avoid this, another method may be added (setPeriodicForwardingTask()?) that is called periodically (with an interval specified by the user). Another alternative is the implementation of this mechanism in the forwarding algorithm (i.e. in the class implementing ForwardingAlgorithm). However, this is quite complicated, since the control of the list of the pending FOs is in the forwarding manager (in particular, the addition and deletion of FOs). I am really interested in your opinion about these design issues... Thanks, Mirco -- Mirco Musolesi Dept. of Computer Science, University College London Gower Street London WC1E 6BT United Kingdom Phone: +44 20 7679 0391 Fax: +44 20 7387 1397 Web: http://www.cs.ucl.ac.uk/staff/m.musolesi |