HI,
which are the algorithms to generate a network with grid topology?
Thanks
The project requires to define a centralized simulation, i.e. a centralized coordinator which initializes a data structure containing the descriptors of the peers belonging to the network. In this scenario, you can simply pair each peer with a point in a predefined 2-dimensional space. Then, if the coordinate of a peer are (x,y), connect it to its four neighbors located at (x+1,y) (x-1,y) (x,y+1) (x,y-1), to generate the initial topology. The algorithm should be straightforward, because of the centralized control.
If you need to generate a random network, you can exploit the procedure presented in the lesson of 16/3/2018. Again, it is not complex to implement this procedure, given that you are required to simulate the P2P network in a centralized simulator.
I have some other questions about the Newscast Prootcol:
1)for the simulation of the Newscast Prootcol we have to implement only SelectPeer() e UpdateState() or also selectToSend(), sendTo(), receiveFrom(),
etc...?
2)we can use the central coordinator to simulate sequentially the calling of selectPeer and UpdateState or we have to implement the active and passive thread like slide 42 of 18-05-18-Gossip.pdf lesson?
3) at the start of the Newscast Prootcol all timestamp of each peer of each view have the same initial value?
4)we need a param indicating number of iteration of the protocol? if yes, the current timestamp into each iteration is the same for each node processed by the protocol?
Thanks
1) If you implement Newscast, as required by the project, you need not implement selectToSend, because each peer exchanges its own view with the selected neighbor. sendTo() and ReceiveFrom() will be simulated by the central coordinator (no message is actually exchanged).
2) This is up to you. The central coordinator may simulate the behavior of each peer with 2 or more threads, but this can also be avoided if you want to keep things simple.
3) YES, even if in a distributed system it is very difficult to maintain clocks synchronized.
4) I do not see the need for this param, but it is possible it is useful in your implementation. In any case, yes, you can do the simplifying assumption that the timestamp is the same for each node.
• Average length of the shortest paths. • Average clustering coefficient. • Average node degree. • Connectivity. evaluate if the overlay is connected and if it is not connected, how many clusters are present in the overlay." we can use the network analyzer of cytoscape to retrive these data?
Thanks
I personally think yes, and I am actually using it.