by Matteo Caliandro, [email protected], [email protected]
Lab Project for Distributed System 2 course @ University of Trento - Italy
The project implementation is based on:
- L. Rodrigues, S. Hansurukande, J. Pereira, R. Guerraoui, A-M. Kermarrec. (2003). Adaptive Gossip-Based Broadcast.
The chosen gossip-based algorithm is:
- P. Eugster, R. Guerraoui, S. Handurukande, P. Kuznetsov, A-M. Kermarrec. (2001). Lightweight Probabilistic Broadcast.
- JRE version >= 8
- Gradle version >= 6.1 (optional)
You can run the project as a console application with Gradle, open a terminal on the project root directory and execute:
gradle run
If Gradle is not installed in your OS, just use the script (gradlew for Linux/MacOS, or gradlew.bat for Windows) available in the root directory of the project:
./gradlew run
The applications uses a configuration file called system.conf
(placed in src/main/resources
) that contains all the paramenters used by the Akka actors (system nodes) to perform the following setups:
- initialize the internal buffers dimension (a random number within the range [min-buffer, max-buffer] and an always changing random timeout to generate a new event (within [min-delay, max-delay]);
- configure the Lightweight Probabilistic Broadcast (lpbcast) algorithm with the parameters T, F and k;
- configure the Adaptive Gossip-Based Broadcast (agbbcast) algorithm with the parameters max (maximum tokens available for each node), rate (the initial emission rate at each node), S, delta, H, L, alpha, rH, rL, and W.
When nodes finish the initialization procedure, they start the protocol by generating new events and gossiping them. During the execution, it is possible to pause and resume the system in order to take a look at the logs generated by each node. By default, the application is configured to show the logs in debug mode (see the configuration file src/main/resources/application.conf
), in order to show the information about the internal state of the node and the content of a gossip message when it is received by a node.
The console application accepts the following commands when the protocol is running:
- s: pause the system if each node is in running state, otherwise resume it (all nodes in paused state).
- q: terminate the system.