0% found this document useful (0 votes)
71 views10 pages

Last Class: Rpcs and Rmi: Case Study: Sun RPC Lightweight Rpcs Remote Method Invocation (Rmi)

The document discusses different types of communication in distributed systems, including message-oriented and stream-oriented communication. It describes concepts like persistence, synchronicity, and quality of service (QoS). Examples of message-oriented communication include RPCs, sockets, and message queuing. Stream-oriented communication is important for real-time applications like audio and video. The document outlines protocols and interfaces for different communication types, such as Berkeley sockets, MPI, and RSVP for setting up streams.

Uploaded by

Thyaga Raj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views10 pages

Last Class: Rpcs and Rmi: Case Study: Sun RPC Lightweight Rpcs Remote Method Invocation (Rmi)

The document discusses different types of communication in distributed systems, including message-oriented and stream-oriented communication. It describes concepts like persistence, synchronicity, and quality of service (QoS). Examples of message-oriented communication include RPCs, sockets, and message queuing. Stream-oriented communication is important for real-time applications like audio and video. The document outlines protocols and interfaces for different communication types, such as Berkeley sockets, MPI, and RSVP for setting up streams.

Uploaded by

Thyaga Raj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Last Class: RPCs and RMI

Case Study: Sun RPC Lightweight RPCs Remote Method Invocation (RMI)
Design issues

Computer Science

CS677: Distributed OS

Lecture 1, page 1

Today: Communication Issues


Message-oriented communication
Persistence and synchronicity

Stream-oriented communication

Computer Science

CS677: Distributed OS

Lecture 1, page 2

Persistence and Synchronicity in Communication


General organization of a communication system in which hosts are connected through a network

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

Six combinations of persistence and synchronicity


Computer Science
CS677: Distributed OS Lecture 1, page 6

Persistence and Synchronicity Combinations

2-22.1

a) b)
Computer Science

Persistent asynchronous communication (e.g., email) Persistent synchronous communication


CS677: Distributed OS Lecture 1, page 7

Persistence and Synchronicity Combinations

2-22.2

c) d)

Transient asynchronous communication (e.g., UDP) Receipt-based transient synchronous communication


CS677: Distributed OS Lecture 1, page 8

Computer Science

Persistence and Synchronicity Combinations

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

Message-oriented Transient Communication


Many distributed systems built on top of simple message-oriented model
Example: Berkeley sockets

Computer Science

CS677: Distributed OS

Lecture 1, page 10

Berkeley Socket Primitives


Primitive Socket Bind Listen Accept Connect Send Receive Close Meaning Create a new communication endpoint Attach a local address to a socket Announce willingness to accept connections Block caller until a connection request arrives Actively attempt to establish a connection Send some data over the connection Receive some data over the connection Release the connection

Computer Science

CS677: Distributed OS

Lecture 1, page 11

Message-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 of workstations 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) pair
Computer Science

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

Message-oriented Persistent Communication


Message queuing systems
Support asynchronous persistent communication Intermediate storage for message while sender/receiver are inactive Example application: email

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

Primitive Put Get Poll Notify

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

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

Single sender and receiver

One sender Multiple receivers

Computer Science

CS677: Distributed OS

Lecture 1, page 17

Quality 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
Characteristics of the Input maximum data unit size (bytes) Token bucket rate (bytes/sec) Toke bucket size (bytes) Maximum transmission rate (bytes/sec) Service Required Loss sensitivity (bytes) Loss interval (sec) Burst loss sensitivity (data units) Minimum delay noticed (sec) Maximum delay variation (sec) Quality of guarantee

Computer Science

CS677: Distributed OS

Lecture 1, page 18

Specifying QoS: Token bucket

The principle of a token bucket algorithm


Parameters (rate r, burst b) Rate is the average rate, burst is the maximum number of packets that can arrive simultaneously
Computer Science

CS677: Distributed OS

Lecture 1, page 19

Setting Up a Stream: RSVP

Computer Science

CS677: Distributed OS

Lecture 1, page 20

You might also like