You are on page 1of 30

Communication

Chapter 4
Topics to Cover
 Fundamentals
 Remote Procedure Calls
 Message-Oriented Communication
 Stream-Oriented Communication
 Multicast Communication
Basic Network Model

Open Systems Interconnection Reference Model


Low Level Layers
 Physical Layer
 Concerned with transmitting 0s and 1s

 Data Link Layer


 Concerned with putting special bit patterns on head and tail of data frames

 Network Layer
 Concerned with routing.
Transport Layer

Packets are sometimes Provide service which will TL will break the message
lost on its way from the ensure the reliability of into pieces small enough
sender to receiver. packets for transmission, assigns
a number for each, then
sends them all

Problem Solution Principle


High Level Layers
 Application Layer
 In practice, this is the only layer that is used.

 Session Layer
 Provides dialog controls, to keep track of which party is currently talking, and provides
synchronization facilities

 Presentation Layer
 Concerned with the meaning of bits
Middleware Protocols
 It is an application that logically lives (mostly) in the application layer
 It contains many general-purpose protocols that warrant their own layers,
independent of others, for more specific application.
 Examples are: Authentication protocols, Commit protocols, locking protocols
Types of Communication

Persistent Communication – message submitted for transmission are kept in MW


as long as necessary
TRANSIENT COMM - messages are stored only as long as the sending/receiving
application are executing
ASYNCHRONOUS – sender can send messages continuously.
SYNCHRONOUS – sender is blocked until messages are received by recepient.
REMOTE PROCEDURE CALL
 When a Process on machine A calls for a procedure on machine B, the
calling process on machine A is suspended, and the execution of the called
procedure takes place in B. Information can be transported from the caller
to the callee in the parameters and come back with procedure results. No
message passing at all is visible to the programmer.
Basic RPC Operation
RPC: Parameter Passing
 The function of the client stub is to take its parameters, pack them into a
message and send them to the server stub.
 Passing Value Parameter
Parameter marshaling
 Passing Reference Parameter
Pointers, addresses
 Parameter Specification and Stub Generation
Encoding rules, actual exchange of data
Asynchronous RPC’s
ESSENCE:
Try to get rid of the strict request-reply behavior, but
let the client continue without waiting for an answer
from the server.
Message-Oriented Communication
 Transient Messaging
 Message-Queuing System
 Message Brokers
Transient Communication
 Sockets
 It is a communication end-point to which an application can write data that are to be sent
out over network and from which data can be read as well.

SOCKET Create new communication endpoint


BIND Attach a local address to a socket
LISTEN Announce the willingness to accept n connections
ACCEPT Block until request to establish connection
SEND Send data over network
RECEIVE Receive data over a connection
CLOSE Release the connection
Diagram
Message Queuing System
 Applications communicate by inserting messages in specific queues. These
messages are forwarded over a series of communication servers and are
eventually delivered to the destination, even if it was down when the
message was sent.
 In practice, most communication servers are directly connected to each
other.
Basic Interface to a Queue in a Message-Queuing System
PRIMITIVE Meaning

PUT Append a message to a specified queue


GET Block until specified queue in nonempty
POLL Check a specified queue for messages and
remove the firsts. Never block
NOTIFY Install a handler to be called when a
message is put into the specified queue
Message Brokers
Observation
Message queuing systems assume a common messaging protocol: all
applications agree on message format (i.e., structure and data representation)

Message broker
 Centralized component that takes care of application heterogeneity in an MQ
system:
 Transforms incoming messages to target format
 Very often acts as an application gateway
 May provide subject-based routing capabilities  Enterprise Application Integration
STREAM-ORIENTED COMMUNICATION
 Support for continuous media
 Streams in distributed systems
 Stream management
Continuous Media
Observation
 All communication facilities discussed so far are essentially based on a
discrete, that is time-independent exchange of information
Continuous media
 Characterized by the fact that values are time dependent:
 Audio
 Video
 Animations
 Sensor data (temperature, pressure, etc.)
Transmission Modes
Different timing guarantees with respect to data transfer:
 Asynchronous: no restrictions with respect to when data is to be delivered
 Synchronous: define a maximum end-to-end delay for individual data
packets
 Isochronous: define a maximum and minimum end-to-end delay (jitter is
bounded)
Stream
Definition
 A (continuous) data stream is a connection-oriented communication facility
that supports isochronous data transmission.
 Some common stream characteristics
 Streams are unidirectional
 There is generally a single source, and one or more sinks
 Often, either the sink and/or source is a wrapper around hardware (e.g., camera, CD
device, TV monitor)
 Simple stream: a single flow of data, e.g., audio or video
 Complex stream: multiple data flows, e.g., stereo audio or combination audio/video
Streams & Quality of Service
 The required bit rate at which data should be transported.
 The maximum delay until a session has been set up
 The maximum end-to-end delay
 The maximum delay variance (jitter)
 The maximum round trip delay
Enforcing Quality of Service
Observation
 There are various network-level tools, such as differentiated
services by which certain packets can be prioritized.
Also
 Use buffers to reduce jitter:
Stream Synchronization

Multiplex all substreams into a single stream, and


demultiplex at the receiver. Synchronization is handled
at multiplexing/demultiplexing point (MPEG).
Multicast Communication
 Application-level multicasting
 Gossip-based data dissemination
Application Level Multicasting
 The basic idea in application-level multicasting is that nodes organize into an
overlay network, which is then used to disseminate information to its
members.
Epidemic Algorithm
 Main goal is to rapidly propagate information among a large collection of
nodes using only local information.
 Assume there are no write–write conflicts:
 Update operations are performed at a single server
 A replica passes updated state to only a few neighbors
 Update propagation is lazy, i.e., not immediate
 Eventually, each update should reach every replica
Two forms of epidemics
 Anti-entropy: Each replica regularly chooses another replica at random, and
exchanges state differences, leading to identical states at both afterwards
 Gossiping: A replica which has just been updated (i.e., has been
contaminated), tells a number of other replicas about its update
(contaminating them as well).
Deleting Values
Fundamental problem
 We cannot remove an old value from a server and expect the removal to
propagate. Instead, mere removal will be undone in due time using
epidemic algorithms.
Solution
 Removal has to be registered as a special update by inserting a death
certificate

You might also like