Reply To: use question

Home Forums PeerfactSim Forum use question Reply To: use question

tobias amft

Hello MH,

yes, you can use Peerfactsim.Kom for your purpose.
In the following I briefly describe how to do this:

Simulations in PeerfactSim.Kom are configured using a simple xml-file.
Please consider “chord.xml” in folder “config/visualization”, which is structured as follows:
– First, you can specify variables you want to use in this config-xml-file.
– Next, you define and configure different layers you want to use: NetLayer, Translayer, Overlay, Application, and Monitor
– Most Important: with the HostBuilder you define how many nodes to simulate and what layers each host/group comprises
– As a last step you can choose between different churnmodels, and select an “actions-file”

In the actions file (here: config/visualization/chord-actions.dat) you can specify actions, a specific group should perform at given time
(Be aware that all nodes in the group perform this action.)
Note that actions in the action-file (in “chord-actions.dat”: startLookups or …:join) are implemented in the “component”- or “additionalClasses” you select in the xml-file (last few lines in “chord.xml”)

The given config file should fulfil your purpose.
– Chord is selected
– DHTLookupGenerator is installed as application on all simulates hosts

You can implement your applications either directly in chord, or as standalone application on top.
For the former, consider “org.peerfact.impl.overlay.dht.chord.chord.components.ChordNode”.
For the latter, consider the DHTLookupGenerator in “org.peerfact.impl.application.dhtlookupgenerator.DHTLookupGenerator”.
This class simply starts some lookups in the given p2p overlay.

Have fun!

Comments are closed.