Unformatted text preview:

CS677: Distributed OSComputer ScienceLecture 5, page 1Last Class: RPCs and RMI• Case Study: Sun RPC• Lightweight RPCs• Remote Method Invocation (RMI)– Design issuesCS677: Distributed OSComputer ScienceLecture 5, page 2Today: Communication Issues• Message-oriented communication– Persistence and synchronicity• Stream-oriented communicationCS677: Distributed OSComputer ScienceLecture 5, page 3Persistence and Synchronicity in Communication• General organization of a communication system in which hosts are connectedthrough a network2-20CS677: Distributed OSComputer ScienceLecture 5, page 4Persistence• Persistent communication– Messages are stored until (next) receiver is ready– Examples: email, pony expressCS677: Distributed OSComputer ScienceLecture 5, page 5Transient Communication• Transient communication– Message is stored only so long as sending/receiving applicationare executing– Discard message if it can’t be delivered to next server/receiver– Example: transport-level communication services offertransient communication– Example: Typical network router – discard message if it can’tbe delivered next router or destinationCS677: Distributed OSComputer ScienceLecture 5, page 6Synchronicity• Asynchronous communication– Sender continues immediately after it has submitted the message– Need a local buffer at the sending host• Synchronous communication– Sender blocks until message is stored in a local buffer at thereceiving host or actually delivered to sending– Variant: block until receiver processes the message• Six combinations of persistence and synchronicityCS677: Distributed OSComputer ScienceLecture 5, page 7Persistence and Synchronicity Combinationsa) Persistent asynchronous communication (e.g., email)b) Persistent synchronous communication2-22.1CS677: Distributed OSComputer ScienceLecture 5, page 8Persistence and Synchronicity Combinationsc) Transient asynchronous communication (e.g., UDP)d) Receipt-based transient synchronous communication2-22.2CS677: Distributed OSComputer ScienceLecture 5, page 9Persistence and Synchronicity Combinationse) Delivery-based transient synchronous communication at message delivery(e.g., asynchronous RPC)f) Response-based transient synchronous communication (RPC)CS677: Distributed OSComputer ScienceLecture 5, page 10Message-oriented TransientCommunication• Many distributed systems built on top of simple message-oriented model– Example: Berkeley socketsCS677: Distributed OSComputer ScienceLecture 5, page 11Berkeley Socket PrimitivesRelease the connectionCloseReceive some data over the connectionReceiveSend some data over the connectionSendActively attempt to establish a connectionConnectBlock caller until a connection request arrivesAcceptAnnounce willingness to accept connectionsListenAttach a local address to a socketBindCreate a new communication endpointSocketMeaningPrimitiveCS677: Distributed OSComputer ScienceLecture 5, page 12Message-Passing Interface (MPI)• Sockets designed for network communication (e.g., TCP/IP)– Support simple send/receive primitives• Abstraction not suitable for other protocols in clusters ofworkstations or massively parallel systems– Need an interface with more advanced primitives• Large number of incompatible proprietary libraries and protocols– Need for a standard interface• Message-passing interface (MPI)– Hardware independent– Designed for parallel applications (uses transient communication)• Key idea: communication between groups of processes– Each endpoint is a (groupID, processID) pairCS677: Distributed OSComputer ScienceLecture 5, page 13MPI PrimitivesCheck if there is an incoming message, but do not blockMPI_irecvReceive a message; block if there are noneMPI_recvPass reference to outgoing message, and wait until receipt startsMPI_issendPass reference to outgoing message, and continueMPI_isendSend a message and wait for replyMPI_sendrecvSend a message and wait until receipt startsMPI_ssendSend a message and wait until copied to local or remote bufferMPI_sendAppend outgoing message to a local send bufferMPI_bsendMeaningPrimitiveCS677: Distributed OSComputer ScienceLecture 5, page 14Message-oriented PersistentCommunication• Message queuing systems– Support asynchronous persistent communication– Intermediate storage for message while sender/receiver areinactive– Example application: email• Communicate by inserting messages in queues• Sender is only guaranteed that message will beeventually inserted in recipient’s queue– No guarantees on when or if the message will be read– “Loosely coupled communication”CS677: Distributed OSComputer ScienceLecture 5, page 15Message-Queuing ModelInstall a handler to be called when a message is put into the specified queue.NotifyCheck a specified queue for messages, and remove the first. Never block.PollBlock until the specified queue is nonempty, and remove the first messageGetAppend a message to a specified queuePutMeaningPrimitiveCS677: Distributed OSComputer ScienceLecture 5, page 16Stream Oriented Communication• Message-oriented communication: request-response– When communication occurs and speed do not affect correctness• Timing is crucial in certain forms of communication– Examples: audio and video (“continuous media”)– 30 frames/s video => receive and display a frame every 33ms• Characteristics– Isochronous communication• Data transfers have a maximum bound on end-end delay andjitter– Push mode: no explicit requests for individual data units beyondthe first “play” requestCS677: Distributed OSComputer ScienceLecture 5, page 17ExamplesSingle sender and receiverOne senderMultiple receiversCS677: Distributed OSComputer ScienceLecture 5, page 18Quality of Service (QoS)• Time-dependent and other requirements are specified as quality of service (QoS)– Requirements/desired guarantees from the underlying systems– Application specifies workload and requests a certain service quality– Contract between the application and the system•Loss sensitivity (bytes)•Loss interval (µsec)•Burst loss sensitivity (data units)•Minimum delay noticed (µsec)•Maximum delay variation (µsec)•Quality of guarantee•maximum data unit size (bytes)•Token bucket rate (bytes/sec)•Toke bucket size (bytes)•Maximum transmission rate(bytes/sec)Service RequiredCharacteristics of the InputCS677: Distributed OSComputer ScienceLecture 5, page 19Specifying QoS: Token


View Full Document

UMass Amherst CS 677 - Last Class - RPCs and RMI

Download Last Class - RPCs and RMI
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Last Class - RPCs and RMI and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Last Class - RPCs and RMI 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?