communicationberaldi/psd09/s4.pdf · – sub-streams (audio, video, title) general architecture for...

46
Communication

Upload: others

Post on 24-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Communication

Page 2: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Communication Model

Page 3: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Types of communication

• Number of destinations– Unicast, multicast, brodacast, [anycast,..]

• Address of the destinations– Explicit, Implicit [content…]

• Message oriented – Persistent vs transient

– Synchronous (blocking) vs Asynchronous

• Stream oriented

Page 4: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Type of communication: Persistent

• Middleware stores the message until it has been delivered

• Sender has NOT be active when the message is delivered to the destination

• Destination has NOT to be active when the message is generated by the source

Page 5: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Type of communication: Transient

• Middleware stores the message during when source/destination are active

Page 6: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Communication middleware

Page 7: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RPC - principle

• Simple idea (?!)• Process on machine A can (remotely) call

a procedure on machine B• All the administrative stuffs are done

automatically by a middleware – At compile time (generation of additional SW)– At runt time (SW support)

Page 8: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RPC – run time architecture

Client

Calling procedure

Stub

Server

Calledprocedure

Skeleton

Network

parametersresult

Request message Reply message

parameters result

Page 9: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RPC – time diagram

Page 10: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RPC - example

Page 11: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

MarshallingMEMORY (little-endian)(number 5 and “JILL”)

50…

MEMORY (big-endian)(number 5x224 and “JILL”)

Page 12: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Invert positions doesn’t work

Page 13: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Asynchronous RPC

Page 14: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Example of a-RPC

Page 15: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Using RPC

Page 16: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Run time support (in DCE)

Page 17: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RPC semantic

• (a) Normal case• (b) server crash after execution• (c) server crash before execution

• Maybe • At least once• At most once• Exactly once

Page 18: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Remote Service Invocation

• Allows to call a service, mostly offered by a web

• It uses the same RPC architecture • The stub code is given by the service

provider as a package, or generated from the service description

Page 19: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RSI (=RPC over http)

Client

Calling Service

Stub

Web Server

CalledService

Skeleton

Network

parametersresult

Request message (XML, SOAP,HTTP) Reply message

parameters result

Sercice definition (WSDL)

Generates

Publish

Page 20: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Remote Method Invocation

Client

Proxy (OID interface

nota a comp time,Marsh/unmarsh)

Network

OID.method(args)

Request message Reply message

Invoke (Dynamic

Invocation interface,)

Invoke(OID,method,args_in,arg_out)

Operating System

Skeleton (comp time)

(Dynamic Skeleton interface)

Server

Oggetto OIDdata

methods

Remote OID is a paramenter

Operating System

Page 21: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

RMI – parameter passing

Page 22: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Java RMI case study

• Java-RMI aims at assuring the highest degree of distribution transparency

• A remote object is an object whose state resides on a machine, but whose interface may be invoked from other (remote) machines

• Remote methods invocation is supported by a local proxy

Page 23: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Transient communication via socket

Page 24: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

MPI

Page 25: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Communication using queues

Higher loosely-coupled

Page 26: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Basic interface to a queue

Page 27: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

General Architecture of a Message-Queuing System (1)

Page 28: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

General Architecture of a Message-Queuing System (2)

Page 29: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Message broker

Page 30: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

IBM’s WebSphere

Page 31: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Example of message routing

Page 32: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Stream communication

• Asynchronous • Synchronous

– Bound on the maximum delay

• Isochronous – Bounds on the minimum and maximum delay

• Simple• Compound

– Sub-streams (audio, video, title)

Page 33: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

General architecture for stored streaming

Page 34: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Quality of Service

• Bit rate at which data should be transported.

• The maximum end-to-end delay (delay lag)

• The maximum delay until a session has been set up (set-up time)

• The maximum delay variance, or jitter.• The maximum round-trip delay

Page 35: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Enforcing QoS

Page 36: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Interleaving

Page 37: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Multicast communication

• Network layer multicast (IP multicast)• Application level multicast

– Tree based– Mesh based

Page 38: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Tree based ALM using Chord

• To set-up a new group (tree) a node generates a random key, say mid, and sends a tree set-up request to R=succ(mid)

• R becomes the root of the tree

• To join the tree, a node P sends a join request to succ(mid).

• An intermediate node becomes a forwarder; any further request is not propagated upward

Page 39: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Root

Q

P

Forwarder

Root

Q

P

Forwarder

P’

Lookup(mid)Lookup(mid)

Page 40: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Quality of the tree

• Link stress– Given a network link, the number of times a

link is used

• Stretch (or Relative Delay Penalty, RDP)– Given two nodes, the ratio between the

transmission delay at the overlay layer and at network layer

• Cost of the tree – For example total delay

Page 41: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Example

The stress of this link is 2

Page 42: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

IP vs Overlay multicast

Page 43: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported
Page 44: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

switch-trees

Page 45: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Problems with single tree

• Disruptive delivery due to failures of high-level nodes

• Out-going bandwidth of leaf nodes is not used

Page 46: Communicationberaldi/PSD09/S4.pdf · – Sub-streams (audio, video, title) General architecture for stored streaming. Quality of Service • Bit rate at which data should be transported

Multiple trees

from “Opportunities and Challenges of Peer-to-Peer Internet Video Broadcast”, Liu et al. Proceedings of the IEEE.

stream is interleaved