Can we "emulate" this tree structure by using znodes in different levels?
For example if we can make a znode for a job and in the next level are the groom names and in the very next levels are the tasks
So we can simply sync on grooms in the tasks and they get notified once all grooms have sync'd theirselfs.
It this the idea behind the tree based sync?
There should have no problem to simulate the above tree structure, which is similar to our implementation with double barrier, in zookeeper. For tree based barrier sync, it divides processes into subgroup and then synchronize among each other. Taken into an example of 8 processes, ranging from p0 to p7. At first stage, p1 sends message to p0 for sync; p3 to p2; p5 to p4; p7 to p6. At the seconds stage, p6 sends message to p4; p2 to p0. At the third stage, p4 sends message to p0 for reaching the barrier and then reverses notifying for leaving the barrier.