Skip to content

[Go] - Bully algorithm visualization & implementation written in Golang.

License

Notifications You must be signed in to change notification settings

zanjs/bully-algorithm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bully Algorithm Visualization

GoDoc Go Report Card

Intro

What this repository is about ?

This repository contains source code of an implementation of the bully algorithm written in Go and a small browser visualization tool.

This has been made for learning purposes about distributed algorithms, Bully algorithm being the simplest leader election algorithm to implement.

Finally, I feel like implementing an algorithm myself helps me to understands it better and I thought it could be interesting to someone else.

Quickstart

First, go get this repository:

go get -d github.com/timtosi/bully-algorithm

Then compiles and launch the visualization server:

cd $GOPATH/src/github.com/timtosi/bully-algorithm/cmd/data-viz
go build && ./data-viz

Visu

Finally launch two nodes with specifying their ID in argument:

cd $GOPATH/src/github.com/timtosi/bully-algorithm/cmd/bully
go build && ./bully 0

Nodes

You can access the visualization through your browser at localhost:8080.

What is the Bully algorithm ?

The Bully algorithm is one of the simplest algorithm made to design a coordinator among a set of machines.

License

Every file provided here is available under the MIT License.

Not Good Enough ?

If you encouter any issue by using what is provided here, please let me know ! Help me to improve by sending your thoughts to [email protected] !

About

[Go] - Bully algorithm visualization & implementation written in Golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 61.7%
  • CSS 19.9%
  • HTML 13.5%
  • JavaScript 4.9%