- 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.
Steve Yegge: It's easy to come up with new product ideas if you start with the understanding that everything sucks. Everything can stand improvement. Just think about what you'd change if you were doing it for yourself, and everything should start falling into place.
Thursday, October 1, 2015
Network simulation with threads
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment