A simulator for gossip algorithm written in elixir. There are two algorithms implemented in this project. One for spreading epidemic and one for calculating average. Many topologies have been implemented in order to simulate the spreading of epidemic. The systems converges based on a condition for a algorithm. In case of spreading epidemic we have use the push-pull model of gossip with counter. In case of computing aggregate we use push-pull as well.
- Pulkit Tripathi
- Akash Shingte
- Install dependecies
mix deps.get
- Compile the source
mix compile
- Run the proj2.exs
mix run --no-halt proj2.exs <nodes> <topology> <algorithm>
Here,
<nodes>
is a integer
between 1 and 100
<topology>
is a string
which is one of
fulll
3D
line
imp2D
torrus
rand2D
<algorithm>
is a string
which is one of
gossip
pushsum
For example for gossip algorithm with 100 nodes in full topology
mix run --no-halt proj2.exs 100 full gossip
mix test --trace --exclude pending
Following implementations are working
- Gossip algorithm for -
- Full topology
- Line topology
- Imperfect line topology
- Torrus topology
- 3d topology
- Pushsum algorithm for
- Full topology
- Line topology
- Imperfect line topology
- Torrus topology
- 3d topology
Following implementations have bugs to be sorted out in future release(test cases should fail for only these two implementations)
- Gossip algorithm
- rand 2d topology
- Pushsum algorithm
- rand 2d topology
We used a GenServer monitor which will collect convergence events. Once convergence event for all nodes have reached the time is reported as the convergence time.