Coder Social home page Coder Social logo

park-gates-distributed-system's People

Contributors

miscer avatar

Watchers

 avatar

park-gates-distributed-system's Issues

Mutex in the coordinator

  1. Node requests the mutex
  2. If mutex is available, grant it to the node
  3. If not, add node to the queue
  4. When the node releases the mutex, grant it to the first node in the queue, if there is any

Enter/leave requests in nodes

  1. Visitor node connects to a gate node and sends enter/leave request
  2. Gate node adds the visitor to a queue and requests the mutex, if it hasn't already
  3. When the request is granted, process all visitor nodes in the queue
  4. Release the mutex

Election gets stuck

INFO:amusementpark.broker:Node 395/idle receive local message: start_election {}
INFO:amusementpark.broker:Node 395/initiated send to 528: election_started {}
INFO:amusementpark.broker:Node 395/initiated send to 479: election_started {}
INFO:amusementpark.broker:Node 528/idle receive from 395: election_started {}
INFO:amusementpark.broker:Node 528/electing send to 408: election_started {}
INFO:amusementpark.broker:Node 528/electing send to 883: election_started {}
INFO:amusementpark.broker:Node 528/electing send to 707: election_started {}
INFO:amusementpark.broker:Node 479/idle receive from 395: election_started {}
INFO:amusementpark.broker:Node 479/electing send to 230: election_started {}
INFO:amusementpark.broker:Node 408/idle receive from 528: election_started {}
INFO:amusementpark.broker:Node 408/electing send to 328: election_started {}
INFO:amusementpark.broker:Node 230/idle receive from 479: election_started {}
INFO:amusementpark.broker:Node 230/electing send to 883: election_started {}
INFO:amusementpark.broker:Node 230/electing send to 957: election_started {}
INFO:amusementpark.broker:Node 328/idle receive from 408: election_started {}
INFO:amusementpark.broker:Node 883/idle receive from 528: election_started {}
INFO:amusementpark.broker:Node 328/electing send to 707: election_started {}
INFO:amusementpark.broker:Node 883/electing send to 957: election_started {}
INFO:amusementpark.broker:Node 883/electing send to 230: election_started {}
INFO:amusementpark.broker:Node 883/electing send to 891: election_started {}
INFO:amusementpark.broker:Node 883/electing receive from 230: election_started {}
INFO:amusementpark.broker:Node 883/electing send to 230: election_voted {'leader': None}
INFO:amusementpark.broker:Node 707/idle receive from 528: election_started {}
INFO:amusementpark.broker:Node 707/electing send to 328: election_started {}
INFO:amusementpark.broker:Node 707/electing send to 891: election_started {}
INFO:amusementpark.broker:Node 957/idle receive from 883: election_started {}
INFO:amusementpark.broker:Node 957/electing send to 230: election_started {}
INFO:amusementpark.broker:Node 957/electing send to 891: election_started {}
INFO:amusementpark.broker:Node 707/electing receive from 328: election_started {}
INFO:amusementpark.broker:Node 707/electing send to 328: election_voted {'leader': None}
INFO:amusementpark.broker:Node 957/electing receive from 230: election_started {}
INFO:amusementpark.broker:Node 957/electing send to 230: election_voted {'leader': None}
INFO:amusementpark.broker:Node 328/electing receive from 707: election_started {}
INFO:amusementpark.broker:Node 230/electing receive from 883: election_started {}
INFO:amusementpark.broker:Node 328/electing send to 707: election_voted {'leader': None}
INFO:amusementpark.broker:Node 230/electing send to 883: election_voted {'leader': None}
INFO:amusementpark.broker:Node 230/electing receive from 957: election_started {}
INFO:amusementpark.broker:Node 230/electing send to 957: election_voted {'leader': None}
INFO:amusementpark.broker:Node 707/electing receive from 328: election_voted {'leader': None}
INFO:amusementpark.broker:Node 891/idle receive from 707: election_started {}
INFO:amusementpark.broker:Node 883/electing receive from 230: election_voted {'leader': None}
INFO:amusementpark.broker:Node 230/electing receive from 883: election_voted {'leader': None}
INFO:amusementpark.broker:Node 957/electing receive from 230: election_voted {'leader': None}
INFO:amusementpark.broker:Node 328/electing receive from 707: election_voted {'leader': None}
INFO:amusementpark.broker:Node 328/waiting send to 408: election_voted {'leader': NodeInfo(id=328, address=('localhost', 8001))}
INFO:amusementpark.broker:Node 891/electing send to 883: election_started {}
INFO:amusementpark.broker:Node 230/electing receive from 957: election_voted {'leader': None}
INFO:amusementpark.broker:Node 891/electing send to 957: election_started {}
INFO:amusementpark.broker:Node 230/waiting send to 479: election_voted {'leader': NodeInfo(id=230, address=('localhost', 8006))}
INFO:amusementpark.broker:Node 891/electing receive from 883: election_started {}
INFO:amusementpark.broker:Node 891/electing send to 883: election_voted {'leader': None}
INFO:amusementpark.broker:Node 891/electing receive from 957: election_started {}
INFO:amusementpark.broker:Node 891/electing send to 957: election_voted {'leader': None}
INFO:amusementpark.broker:Node 408/electing receive from 328: election_voted {'leader': NodeInfo(id=328, address=('localhost', 8001))}
INFO:amusementpark.broker:Node 408/waiting send to 528: election_voted {'leader': NodeInfo(id=408, address=('localhost', 8010))}
INFO:amusementpark.broker:Node 883/electing receive from 891: election_started {}
INFO:amusementpark.broker:Node 883/electing send to 891: election_voted {'leader': None}
INFO:amusementpark.broker:Node 479/electing receive from 230: election_voted {'leader': NodeInfo(id=230, address=('localhost', 8006))}
INFO:amusementpark.broker:Node 479/waiting send to 395: election_voted {'leader': NodeInfo(id=479, address=('localhost', 8009))}
INFO:amusementpark.broker:Node 891/electing receive from 883: election_voted {'leader': None}
INFO:amusementpark.broker:Node 395/initiated receive from 479: election_voted {'leader': NodeInfo(id=479, address=('localhost', 8009))}
INFO:amusementpark.broker:Node 528/electing receive from 408: election_voted {'leader': NodeInfo(id=408, address=('localhost', 8010))}
INFO:amusementpark.broker:Node 883/electing receive from 891: election_voted {'leader': None}
INFO:amusementpark.broker:Node 957/electing receive from 891: election_started {}
INFO:amusementpark.broker:Node 957/electing send to 891: election_voted {'leader': None}
INFO:amusementpark.broker:Node 891/electing receive from 957: election_voted {'leader': None}
INFO:amusementpark.broker:Node 891/waiting send to 707: election_voted {'leader': NodeInfo(id=891, address=('localhost', 8003))}
INFO:amusementpark.broker:Node 707/electing receive from 891: election_voted {'leader': NodeInfo(id=891, address=('localhost', 8003))}
INFO:amusementpark.broker:Node 707/waiting send to 528: election_voted {'leader': NodeInfo(id=891, address=('localhost', 8003))}
INFO:amusementpark.broker:Node 528/electing receive from 707: election_voted {'leader': NodeInfo(id=891, address=('localhost', 8003))}

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.