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

________ charts can show trends over time

Fill in the blank(s) with correct word

Computer Science & Information Technology

The
element will insert a line ____________________.

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

Computer Science & Information Technology

A Local Group Policy (LGP) has more options than a Group Policy.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

If you add text or graphics to a document, but you don't make any changes to the headings, you need to update ____.

A. the entire table B. only the page numbers C. the footnotes D. the alignment

Computer Science & Information Technology