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...

Which of the following statements is true?

a. Interpreted programs run faster than compiled programs. b. Compilers translate high-level language programs into machine language programs. c. Interpreter programs typically use machine language as input. d. None of the above.

Computer Science & Information Technology

Data normally enter a computer through an input device in __________ form.

a. binary b. floating-point c. bitmap d. string

Computer Science & Information Technology

Usability testing:

a. settles all internal debates b. should be used only at the end of the product design process c. often reveals problems that are more significant than the issues the test was supposed to resolve

Computer Science & Information Technology

Write the following query with and without the GROUP BY clause: List all students with their corresponding average grade.

Consider the following ODL de?nitions:

class Person : Object
          ( extent PersonExt ):PERSISTENT;
{
     attribute String Name;
     ... ... ...
}
class Student extends Person
          ( extent StudentExt ):PERSISTENT;
{
    attribute Integer Id;
    attribute Set Transcript;
    ... ... ...
}
struct TranscriptRecord {
       String CrsCode;
       float Grade;
       String Semester;
}

Computer Science & Information Technology