Exercises
Starting from the lab skeleton, you will need to perform the following tasks:
- Find the cluster leader node using a heartbeat algorithm (
leader_chosing
function in the skeleton). - Create the spanning tree starting from the leader using a flood-fill algorithm (
get_dst
function in the skeleton). - Ensure that the number of elements in the spanning tree has been accurately determined by calculating the number of nodes using an epidemic algorithm (
get_number_of_nodes
function in the skeleton). - Using the spanning tree, send the configuration of each node to the leader and create the topology matrix of the cluster in the leader. Distribute the topology to all nodes (
get_topology
function in the skeleton).