Implementation of Gossip Algorithm using different topologies using Scala