Thursday, October 1, 2015

Network simulation with threads

  • One live master, two standby masters listening if there is a live master.
  • Live master broadcasts every second that he is alive (hearbeat)
  • If standby masters do not get heartbeat for 10 seconds, one of them randomly becomes new live master
  • Optional: Gossip protocol: One standby might get the heartbear while the other can't. In that case the one that gets the hearbeat refuses the request of the other to become live master.
  • Master distributes jobs to worker nodes.
  • Worker nodes tell master every second that they are alive
  • Worker nodes return with an answer when their job finishes. Note that job might take more than 1 second. We need one thread for heartbeat and one thread for job processing.
  • GUI: Show live master, standby masters, working nodes, idle nodes, offline nodes.


No comments:

Post a Comment