The getDecision procedure is provided only by coordinators. Define a new version of getDecision to be provided by participants for use by other participants that need to obtain a decision when the coordinator is unavailable.

Assume that any active participant can make a getDecision request to any other active participant. Does this solve the problem of delay during the ‘uncertain’ period? Explain your answer.

At what point in the two-phase commit protocol would the coordinator inform the participants of the other participants’ identities (to enable this communication)?


The signature for the new version is:

getDecision (trans) -> Yes/ No/ Uncertain

The worker replies as follows:

If it has already received the doCommit or doAbort from the coordinator or received the result via another worker, then reply Yes or No;

if it has not yet voted, reply No (the workers can abort because a decision cannot yet have been reached);

if it is uncertain, reply uncertain.

This does not solve the problem of delay during the ‘uncertain’ period. If all of the currently active workers are uncertain, they will remain uncertain.

The coordinator can inform the workers of the other workers’ identities when it sends out the canCommit request.

Computer Science & Information Technology

You might also like to view...

The next generation of the World Wide Web is called __________.

Fill in the blank(s) with correct word

Computer Science & Information Technology

Describe two of the four methods of digital signal modulation.

What will be an ideal response?

Computer Science & Information Technology

Create a base class called Vehicle that has the manufacturer’s name (type String), number of cylinders in the engine (type int), and owner (type Person given in Listing 8.1). Then create a class called Truck that is derived from Vehicle and has additional properties: the load capacity in tons (type double, since it may contain a fractional part) and towing capacity in tons (type double).

Give your classes a reasonable complement of constructors and accessor methods, and an equals method as well. Write a driver program (no pun intended) that tests all your methods. This project requires most of the same type of thinking as previous problems to write constructors, accessor and mutator methods except that one of Vehicle’s data members is an instance of a class rather than a fundamental data type (owner is an instance of the class Person). Operations involving the owner, therefore, must use the methods of the Person class. NOTE: early editions of the text may have an error in the definition of sameName()in Person. If the method definition is ``` return (this.name.equalsIgnoreCase(otherPerson.name));``` it should be changed to ``` return (this.name.equalsIgnoreCase(otherPerson.gettName())); ``` The sameName() method is called in the code for the equals method of Vehicle to test if two vehicles have the same owner. A methodical approach that makes this problem manageable is to develop one method in Vehicle, then write a test for the method in VehicleTest and run it. Add the next method to Vehicle only when VehicleTest runs successfully. When all the methods for Vehicle have been written and tested with VehicleTest, then do a similar piece-wise development for Truck and TruckTest, first testing all the methods inherited from Vehicle, then writing one new method at a time and testing it before going on to the next.

Computer Science & Information Technology

Write a script that blurs images and slowly unblurs them when they are finished loading into the browser (use event ON- LOAD for the image).

What will be an ideal response?

Computer Science & Information Technology