Distributed System Seminar 7

Home > Preview

The flashcards below were created by user fregoton on FreezingBlue Flashcards.

  1. Describe how connectionless communication between a client and a server proceeds when using sockets.
    Both the client and the server create a socket, but only the server binds the socket to a local endpoint. The server can then subsequently do a blocking read call in which it waits for incoming data from any client. Likewise, after creating the socket, the client simply does a blocking call to write data to the server. There is no need to close a connection.
  2. Suppose that you could make use of only transient asynchronous communication primitives, including only an asynchronous receive primitive. Howwould you implement primitives for transient synchronous communication?
    Consider a synchronous send primitive. A simple implementation is to send a message to the server using asynchronous communication, and subsequently let the caller continuously poll for an incoming acknowledgment or response from the server. If we assume that the local operating system stores incoming messages into a local bu ffer, then an alternative implementation is to block the caller until it receives a signal from the operating system that a message has arrived, after which the caller does an asynchronous receive.
  3. Suppose that you could make use of only transient synchronous communication primitives. How would you implement primitives for transient asynchronous communication?
    This situation is actually simpler. An asynchronous send is implemented by having a caller append its message to a buff er that is shared with a process that handles the actual message transfer. Each time a client appends a message to the buff er, it wakes up the send process, which subsequently removes the message from the bu ffer and sends it its destination using a blocking call to the original send primitive. The receiver is implemented in a similar fashion by off ering a buff er that can be checked for incoming messages by an application.
  4. Does it make sense to implement persistent asynchronous communicationby means of RPCs?
    Yes, but only on a hop-to-hop basis in which a process managing a queue passes a message to a next queue manager by means of an RPC. Eff ectively,the service o ffered by a queue manager to another is the storage of a message.The calling queue manager is off ered a proxy implementation of the interfaceto the remote queue, possibly receiving a status indicating the success or failure of each operation. In this way, even queue managers see only queues and no further communication.

Card Set Information

Distributed System Seminar 7
2013-07-17 13:58:35
Distributed System Seminar

Distributed System Seminar 7
Show Answers:

What would you like to do?

Home > Flashcards > Print Preview