I am using leader latch Curator to implement a distributed project . The idea is that given a set of processes/threads only one should become leader and the others follow. The leader should assign tasks to the followers and they should print out the reuslts at the end of execution. I also need to handle any problems with the leader crashing and electing a new one .
How can I implement such logic with Leader Latch Curator?