How would you implement the equivalent of a remote procedure call using a tuple space? What
are the advantages and disadvantages of implementing a remote procedure call–style interaction
in this way?

What will be an ideal response?


To implement a remote procedure call, it is necessary for the ‘client’ to write a tuple to the tuple space that is
effectively directed towards a given server and operation name within this server. This tuple would include the
following fields: an indicator that this is a request, a nonce uniquely representing this request, the server name,
the operation name and then the list of parameters. The client would then immediately perform a take
operation, thus blocking the client until the remote procedure call completes (it is also important this is a take
operation to remove the tuple from the tuple space). The server will sit in a loop performing take operations
on tuples that match the server name, picking up the other values as required to carry out the operation. The
server will then write a tuple with the following fields: an indication that this is a reply message, the nonce as
picked up from the request, and the list of results. The corresponding take operation at the client is blocking
awaiting a tuple that is a reply with the same nonce as the request. This operation can then collect the intended
results and return them to the application.
One advantage of this implementation is that a server need not be present at the time the request is made
(whether through failure or temporary disconnection) and then the server will match associated tuples when it
reconnects with the tuple space. In addition, if we allow multiple servers to co-exist matching on the same
server name, this would automatically provide a form of load balancing and would also introduce a level of
fault-tolerance enabling the system to cope with failure of servers and continue to provide a level of service.
The disadvantage of implementing a remote procedure call in this way is the extra indirection involved
in the implementation, hence inevitably adding to the latency of the interaction.

Computer Science & Information Technology

You might also like to view...

What is the purpose of the Get property procedure?

(A) etrieve the value of a property (B) assign values (C) access private methods (D) erify the data

Computer Science & Information Technology

When you swap variables, you need to use a(n) ____________________ variable.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Because you often work with multiple navigation points simultaneously, it is good practice to give each navigation point a(n) _______________name .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A bus that connects major computer components (processor, memory, I/O) is called a __________.

A. system bus B. address bus C. data bus D. control bus

Computer Science & Information Technology