|
From: Sebastian K. <ka...@ko...> - 2008-10-16 13:45:49
|
Hi Jonas, Can somebody tell me how the churn model is used for a p2p overlay? 1. Implement a churn model by your own => Generate a component (FooModel) which implements the de.tud.kom.p2psim.api.churn.ChurnModel interface. This model should be specified in the xml-configurations file as follows: <ChurnGenerator class="de.tud.kom.p2psim.impl.churn.DefaultChurnGenerator" start="0s" stop="$finishTime"> <ChurnModel class="de.tud.kom.p2psim.impl.churn.FooModel"/> </ChurnGenerator> I think you can find a lot of example churn models in the package de.tud.kom.p2psim.impl.churn. 2. My problem is how does the churn model let each peer know what type (longlasting etc.) they are? I think this would make sense to put in the NodeFactory but in the Kademlia implementation I could not find anything there. Good point, however the NodeFactory should be independent from the churn process. So, we split up functionalities, because not each simulation requires peer turnover. So, simply shift this functionality into the ChurnModel and everything should work fine. 3. Second problem is how does it let a peer know when to go online/offline? Each OverlayNode implements the so called ConnectivityListener-Interface (de.tud.kom.p2psim.api.network.NetLayer), by default. As a consequence, each time the network-layer changes the status of a node (offline/online), the connectivityChanged(ConnectivityEvent ce)-function is invoked. I think that's exactly what you need. Cheers, Sebastian -----Ursprüngliche Nachricht----- Von: Jonas Kühne [mailto:jon...@gm...] Gesendet: Donnerstag, 16. Oktober 2008 14:50 An: pee...@li... Betreff: [Peerfactsim-developer] churn model Hello! I programmed GIA for peerfactsim. Now I am supposed to use the churn model for GIA. Can somebody tell me how the churn model is used for a p2p overlay? My problem is how does the churn model let each peer know what type (longlasting etc.) they are? I think this would make sense to put in the NodeFactory but in the Kademlia implementation I could not find anything there. Second problem is how does it let a peer know when to go online/offline? thanks in advance Jonas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Peerfactsim-developer mailing list Pee...@li... https://lists.sourceforge.net/lists/listinfo/peerfactsim-developer |