Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krishnakeshav/gossip
Simulation of Gossip protocol in distributed systems
https://github.com/krishnakeshav/gossip
concurrent-programming distributed-systems erlang
Last synced: about 1 month ago
JSON representation
Simulation of Gossip protocol in distributed systems
- Host: GitHub
- URL: https://github.com/krishnakeshav/gossip
- Owner: krishnakeshav
- Created: 2024-02-23T07:31:53.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-23T07:41:09.000Z (9 months ago)
- Last Synced: 2024-10-12T18:41:56.018Z (about 1 month ago)
- Topics: concurrent-programming, distributed-systems, erlang
- Language: Erlang
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gossip Protocol
## Problem Statement
The goal of this project is to determine the convergence of such algorithms through a simulator based on actors written in Erlang. Since actors are fully asynchronous, the particular type of Gossip implemented is the so-called Asynchronous Gossip.
Gossip Algorithm for information propagation The Gossip algorithm involves the following:
- Starting: A participant(actor) told/sent a rumor (fact) by the main process
- Step: Each actor selects a random neighbor and tells it the rumor.
- Termination: Each actor keeps track of rumors and how many times he has heard the rumor. It stops transmitting once it has heard the rumor 10 times (10 is arbitrary, you can select other values).Push-Sum algorithm for sum computation
- State: Each actor Ai maintains two quantities: s and w. Initially, s = xi = i (that is actor number i has value i, play with other distribution if you so desire) and w = 1
- Starting: Ask one of the actors to start from the main process.
- Receive: Messages sent and received are pairs of the form (s, w). Upon receiving, an actor should add the received pair to its own corresponding values. Upon receiving, each actor selects a random neighbor and sends it a message.
- Send: When sending a message to another actor, half of s and w is kept by the sending actor, and half is placed in the message.
- Sum Estimate: At any given moment of time, the sum estimate is s/w where s and w are the current values of an actor.
- Termination: If an actor's ratio s/w did not change more than 10−10 in 3 consecutive rounds the actor terminates. WARNING: the values s and w independently never converge, only the ratio does.Topologies:
The actual network topology plays a critical role in the dissemination speed of Gossip protocols. The topology determines who is considered a neighbor in the above algorithms.
- Full Network: Every actor is a neighbor of all other actors. That is, every actor can talk directly to any other actor.
- 2D Grid: Actors form a 2D grid. The actors can only talk to the grid neighbors
- Line: Actors are arranged in a line. Each actor has only 2 neighbors (one left and one right, unless you are the first or last actor).
- Imperfect 3D Grid: Grid arrangement but one random other neighbor is selected from the list of all actors (8+1 neighbors).