Skip to content

Implementation of the Bully Algorithm for leader election in distributed systems.

Notifications You must be signed in to change notification settings

OmarDawoud4/quorum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Democratic Counter

A distributed system demonstrating leader election using the Bully Algorithm.

How It Works

The Bully Algorithm

  • Each node has a unique ID (1, 2, 3)
  • When election starts, nodes "bully" others with lower IDs
  • Highest ID node becomes the leader
  • Leader manages the shared counter

Nodes

API Endpoints

  • GET /ping - Health check
  • GET /status - Node status (ID, leader, state)
  • POST /election - Trigger election
  • POST /victory - Announce new leader

Run with Docker

Pull the image

docker pull omardawoud/democratic-quorum:latest

Run the container

docker run -p 8001:8001 omardawoud/democratic-quorum

Docker Hub Link

https://hub.docker.com/r/omardawoud/democratic-quorum

About

Implementation of the Bully Algorithm for leader election in distributed systems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published