[Csci551-talk] RE:Random selections

nikhil bhatia nikhilbh at usc.edu
Wed Apr 20 13:53:00 PDT 2005


How do you know that the random peer will have the random  segment or vice versa.
There are two levels of randomness.  It will help but not to a very lage extent.

However there is one method which is computationally and memory effcient.
and It works :)

Concept :Make the decision where the information is.
Algo Crux:(Client to client protocol)
1> While making request info , each nodes sends the information which segments it has.
2> While sending segment info the other node will only send information about segments the node does not have.
3> So while requesting segments we do not have to maintain the complete client table (not for all segments). Only maintain segments for GRP_DNLD_LMT (8) no of segments which the node has not down loaded. 
4> Now select a peer/segment randomly (immaterial)( however i think rashmi is correct is selecting peer first will be better ) untill 8 have been requested or there is a timeout then request the smaller number. Also a check has to be added to verify that not more than 8 segments have been downloaded otherwise timeout.

The above protocol is 
1>memory efficient : only maintains 
-GRP_DNLD_LMT   * no_nb dynamic arrray ( O(MAX_CLIENTS)  in comparison to O(MAX_CLIENTS*MAXSEGMENTS))
2>time efficient
- it is trivial to notice that in the loop statement while selecting a random peer/seg it will have less no of iterations.


i hope it helps

-Nikhil Bhatia



More information about the Csci551-talk mailing list