Giter Site home page Giter Site logo

viktor-platform / sample-distributed-algorithms Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.91 MB

When working with Distributed Systems we want to achieve truly distributed solutions. There might not be a central component that regulates the whole network. Sometimes, however, a system might need to be assigned priority over other systems. In a truly distributed system, the priority of each component is not globally known. Luckily there exist selection algorithms to overcome this issue.

Python 88.51% HTML 11.49%
ai algorithms data-science distributed-algorithms distributed-systems leader-election machine-learning python viktor-ai

sample-distributed-algorithms's Introduction

Distributed Algorithms

When working with Distributed Systems we want to achieve truly distributed solutions. There might not be a central component that regulates the whole network. Sometimes, however, a system might need to be assigned priority over other systems. In a truly distributed system, the priority of each component is not globally known. Luckily there exist selection algorithms to overcome this issue.

Hirschberg's and Sinclair's election algorithm in a bidirectional ring

This algorithm works for a bidirectional ring, meaning that each component can connect to two neighbours. No direct broadcasting is available. We assign each component with a random id indicating its priority. The algorithm then works in phases trying to figure out if it has the highest priority in its neighbourhood. Every phase the highest components of the phase try to extend their neighbourhood. In the end, only one component remains.

Simulation

For the simulation of the algorithm, we build a local network with Pyro4, see an animitation of the VIKTOR app above. This package allows us to build objects that can talk to each other, not limited by only a local network. This makes the simulation close to how it would be implemented on a WAN. Ofcourse because our implementation runs locally we cheat a bit in the optimization by shutting down the algorithm after the node that we know is going to win. In reality, if a node is selected, it will notify the other nodes. Our method does not alter the algorithm itself.

sample-distributed-algorithms's People

Contributors

ddijkhuizen avatar khameeteman avatar luukboot avatar puijterwaal avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.