*) How to make a simulation event driven and cycle driven at the same time with Peersim.
Answer by Giuseppe Miraglia
Use the class "CDScheduler" and add the following lines in the configuration file:
-------
protocol.myprot MyProtocolClassName
protocol.myprot.step NUMOFSTEPS
init.scheduler peersim.edsim.CDScheduler
init.scheduler.protocol myprot
-------
where "myprot" is the PID of the class protocol implementing both the interfaces "CDProtocol" and "EDProtocol".
*) What distribution must be used to assign the ID to keys inserted into the network
Uniform Distribution
*) FreeNet objects replication
When executing a PUT action, k replicas must be inserted into the network
The parameter k must be configurable and can be used during experiments to evaluate the impacts of the replica factor during GET and PUT operation.
*) TTL Update
The TTL value must be decremented when searching a key at every hop.
The TTL must not be decremented when the key has been found or during a backtracking phase of the search.
The search is depth first. If the key is not found and the TTL is different from 0, the search becktracks and further paths
are considered, by choosing first the nodes which have the most similar key with respect to the search key.