In a decentralized variant of the two-phase commit protocol the participants communicate directly
with one another instead of indirectly via the coordinator. In Phase 1, the coordinator sends its vote
to all the participants. In Phase 2, if the coordinator's vote is No, the participants just abort the
transaction; if it is Yes, each participant sends its vote to the coordinator and the other participants,
each of which decides on the outcome according to the vote and carries it out. Calculate the
number of messages and the number of rounds it takes. What are its advantages or disadvantages
in comparison with the centralized variant?

What will be an ideal response?

In both cases, we consider the normal case with no time outs.
In the decentralised version of the two-phase commit protocol:
No of messages:
Phase 1: coordinator sends its vote to N workers = N
Phase 2: each of N workers sends its vote to (N-1) other workers + coordinator = N*(N - 1).
Total = N*N.
No. of rounds:
coordinator to workers + workers to others = 2 rounds.
Advantages: the number of rounds is less than for normal two-phase commit protocol which requires 3.
Disadvantages: the number of messages is far more: N*N instead of 3N.

Computer Science & Information Technology

You might also like to view...

A bibliography must begin on a new page

Indicate whether the statement is true or false

Computer Science & Information Technology

To insert a photo album, you click the Photo Album button in the:

A) Illustrations group on the Insert tab. B) Pictures group on the Insert tab. C) Pictures group on the Home tab. D) Illustrations group on the Home tab.

Computer Science & Information Technology