Last Class: Rpcs and Rmi: Case Study: Sun RPC Lightweight Rpcs Remote Method Invocation (Rmi)
Last Class: Rpcs and Rmi: Case Study: Sun RPC Lightweight Rpcs Remote Method Invocation (Rmi)
Case Study: Sun RPC Lightweight RPCs Remote Method Invocation (RMI)
Design issues
Computer Science
CS677: Distributed OS
Lecture 1, page 1
Stream-oriented communication
Computer Science
CS677: Distributed OS
Lecture 1, page 2
2-20
Computer Science
CS677: Distributed OS
Lecture 1, page 3
Persistence
Persistent communication
Messages are stored until (next) receiver is ready Examples: email, pony express
Computer Science
CS677: Distributed OS
Lecture 1, page 4
Transient Communication
Transient communication
Message is stored only so long as sending/receiving application are executing Discard message if it cant be delivered to next server/receiver Example: transport-level communication services offer transient communication Example: Typical network router discard message if it cant be delivered next router or destination
Computer Science
CS677: Distributed OS
Lecture 1, page 5
Synchronicity
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 the receiving host or actually delivered to sending Variant: block until receiver processes the message
2-22.1
a) b)
Computer Science
2-22.2
c) d)
Computer Science
e) f)
Delivery-based transient synchronous communication at message delivery (e.g., asynchronous RCP) Response-based transient synchronous communication (RPC)
CS677: Distributed OS Lecture 1, page 9
Computer Science
Computer Science
CS677: Distributed OS
Lecture 1, page 10
Computer Science
CS677: Distributed OS
Lecture 1, page 11
Abstraction not suitable for other protocols in clusters of workstations or massively parallel systems
Need an interface with more advanced primitives
CS677: Distributed OS
Lecture 1, page 12
MPI Primitives
Primitive MPI_bsend MPI_send MPI_ssend MPI_sendrecv MPI_isend MPI_issend MPI_recv MPI_irecv Meaning Append outgoing message to a local send buffer Send a message and wait until copied to local or remote buffer Send a message and wait until receipt starts Send a message and wait for reply Pass reference to outgoing message, and continue Pass reference to outgoing message, and wait until receipt starts Receive a message; block if there are none Check if there is an incoming message, but do not block
Computer Science
CS677: Distributed OS
Lecture 1, page 13
Communicate by inserting messages in queues Sender is only guaranteed that message will be eventually inserted in recipients queue
No guarantees on when or if the message will be read Loosely coupled communication
Computer Science
CS677: Distributed OS Lecture 1, page 14
Message-Queuing Model
Meaning Append a message to a specified queue Block until the specified queue is nonempty, and remove the first message Check a specified queue for messages, and remove the first. Never block. Install a handler to be called when a message is put into the specified queue.
Computer Science
CS677: Distributed OS
Lecture 1, page 15
Characteristics
Isochronous communication Data transfers have a maximum bound on end-end delay and jitter Push mode: no explicit requests for individual data units beyond the first play request
Computer Science
CS677: Distributed OS Lecture 1, page 16
Examples
Computer Science
CS677: Distributed OS
Lecture 1, page 17
Computer Science
CS677: Distributed OS
Lecture 1, page 18
CS677: Distributed OS
Lecture 1, page 19
Computer Science
CS677: Distributed OS
Lecture 1, page 20