What is communication, types of communication, Barriers in communication
Communication
description
Transcript of Communication
1
Communication
Chapter 2
Layered Protocol
Remote Procedure Call(RPC)
2
Communication
1. Communication Process1. Protocol
2. Form of layers
2. Four widely used models1. RPC
2. RMI
3. MOM
4. Stream
3
Layered Protocols (1)
Layers, interfaces, and protocols in the OSI model.
2-1
4
Layered Protocols (2)
A typical message as it appears on the network.
2-2
5
Layered Protocol
Lower-Level ProtocolsPhysical LayerData Link LayerNetwork Layer
Transport ProtocolHigh Level Protocol
Session and Presentation ProtocolsApplication ProtocolsMiddleware Protocols=>Application Layer
6
Physical Layer
• Transmitting 0s and 1s.
• Standardizing the electrical, mechanical, and signaling interface.
7
Data Link Layer
Discussion between a receiver and a sender in the data link layer.
2-3
Consider that, A wants to send 0 and 1 to B
8
Network Layer
• WAN consists of large number of machine
• Message have to make a number of hops besides choosing an outgoing line to use.
• Primary task of network layer is to decide the best path – routing– IP– ATM
• Virtual channel and virtual path
9
Transport Protocols
• To ensure the reliable transport connection- without data loss
• Transport layer- breaks the information from appn layer into pieces, assign a sequence number, then send them all
• Connection less and connection oriented
• Transmission Control Protocol – de facto standard for network communication
10
Client-Server TCP
a) Normal operation of TCP.
b) Transactional TCP.2-4
11
Higher Level Protocol
1. Session and Presentation Protocols
2. Application Protocols
3. Middleware Protocols
12
Session and Presentation Protocols
1. Session - Provides the dialogs control1. Keeps track of which party is currently talking
2. Provide synchronous facility
3. Insert checkpoint to long transfer
2. Presentation – concern on the meaning of the bits send
1. Record containing fields
2. Names, addresses, amount of money etc.
13
Application Protocols
• Collection of standard network application– Electronic mail– File transfer– Terminal emulation application
14
Middleware Protocols•The application that logically live in appn layer
•Contains many general purpose protocols that warrant their own layers, independent of others, more specific application
•Security
•RPC,RMI, Message Queuing Service and Streaming
15
Middleware Protocols
An adapted reference model for networked communication.
16
Conventional Procedure Call
a) Parameter passing in a local procedure call: the stack before the call to read
b) The stack while the called procedure is active
count = read(fd, buf, nbytes) // a call in C in a //single machine
When a procedure is called, it usually makes use of the stack, pushing parameters onto the stack and reserving space for local variables:
17
Client and Server Stubs
Principle of RPC between a client and server program.
18
Steps of a Remote Procedure Call1. Client procedure calls client stub in normal way, The stub
packages up the parameters into a network message. This is called marshalling.
2. Client stub builds message, calls local OS3. Client's OS sends message to remote OS, This may be
connection-oriented or connectionless. 4. Remote OS gives message to server stub5. Server stub unpacks parameters, calls server6. Server does work, returns result to the stub7. Server stub packs it in message, calls local OS8. Server's OS sends message to client's OS9. Client's OS gives message to client stub10. Stub unpacks result, returns to client
19
Passing Value Parameters (1)
Steps involved in doing remote computation through RPCParameter marshaling: packing parameters into a message
2-8
20
Without RPC
Consider how you would implement a procedure to find the time on a remote machine as a string, using the IP socket calls:
int remote_time(char *machine, char *time_buf) { struct sockaddr_in serv_addr;
int sockfd; int nread;
if (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) return 1; serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr(machine); serv_addr.sin_port = htons(13); if (connect(sockfd, &serv_addr, sizeof(serv_addr)) < 0) return 2; nread = read(sockfd, time_buf, sizeof(time_buf)); time_buf[nread] = '\0'; close(sockfd); return 0; }
This very obviously uses the network.
21
With RPCWhat RPC should look like? The network needs to be made invisible, so that everything
looks just like ordinary procedure calls. The calling process would execute remote_time(machine, time_buf); All networking should be done by the RPC implementation, such as connecting to the remote machine. On the remote machine this simple function gets executed:
int remote_time(char *time_buf) { struct tm *time; time_t t; time(&t); time = localtime(&t); strcpy(time_buf, asctime(time)); return 0; }
22
StubsWhen the calling process calls a procedure, the action performed by that procedure will not be the actual code as written, but code that begins network communication. It has to connect to the remote machine, send all the parameters down to it, wait for replies, do the right thing to the stack and return. This is the client side stub. The server side stub has to wait for messages asking for a procedure to run. It has to read the parameters, and present them in a suitable form to execute the procedure locally. After execution,it has to send the results back
to the calling process.
23
stub
A stub is a small program routine that substitutes for a longer program, possibly to be loaded later or that is located remotely. For example, a program that uses Remote Procedure Calls (RPC) is compiled with stubs that substitute for the program that provides a requested procedure. The stub accepts the request and then forwards it (through another program) to the remote procedure. When that procedure has completed its service, it returns the results or other status to the stub which passes it back to the program that made the request.
24
Client Stub:
Function that mimics the remote procedure in client’s address space (on client-node)
Server Stub:
Function that mimics a local caller (on behalf of the client) in the server’s address space(on server-side)
25
26
Exampleimport java.net.*;
import java.io.*;
public class Server {
public static void main(String[] args) throws IOException {
Socket client = null;
PrintWriter pout = null;
ServerSocket sock = null;
try{ sock = new ServerSocket(5155);
// now listen for connections
while (true) {
client = sock.accept(); // we have a connection
pout = new PrintWriter(client.getOutputStream(), true);
// write the Date to the socket
pout.println(new java.util.Date().toString());
pout.close();client.close();
}
}
catch (IOException ioe) {
System.err.println(ioe);
}
finally {
if (client != null)
client.close();
if (sock != null)
sock.close();
}
}
}
27
import java.net.*;
import java.io.*;
public class Client {
public static void main(String[] args) throws IOException {
InputStream in = null;
BufferedReader bin = null;
Socket sock = null;
try{ //make connection to the socket
sock = new Socket("127.0.0.1",5155);
in = sock.getInputStream();
bin = new BufferedReader(new InputStreamReader(in));
String line;
while ((line = bin.readLine()) != null)
System.out.println(line);}
catch (IOException ioe) {
System.err.println(ioe);
}
finally {
if (sock != null)
sock.close();
}
}
}
28
29
Passing Value Parameters (2)
a) Original message on the Pentium (5, JILL)b) The message after receipt on the SPARC (5224, JILL)c) The message after being inverted (5, LLIJ)
The little numbers in boxes indicate the address of each byte.
30
Passing Reference Parameters
• count = read(fd, buf, nbytes)
– If the address of the buffer of second parameter is 1000 on the client
– Cannot just pass the reference number to the server
– Address 1000 on the server might be on the middle of program text.
client server
Program text
Call-by-reference is not possible in parameter passing.
31
Passing Reference Parameters
Solution• client stub knows that the buf is in an array
of characters.• also knows how big the array is.• so copy the array to the message and sent it
to the server• The server stub then call the server with the
pointer to this array- process and send back to the client.
copy-restore.
–A copy of the referenced data structure is sent to the server, and upon return to the client stub the client’s copy of the structure is replaced with the structure modified by the server.
32
Passing Reference Parameters(1)
• Hiding the remote procedure call require the caller and the callee agree on the format of the message.
• Use the same format
• Define in RPC
• interface-IDL– Consist of collection of procedures that can be called
by a client and implemented in the server
33
Parameter Specification and Stub Generation(2)
a) A procedureb) The corresponding message
The caller and the callee must agreeon the format of the message theyexchange, and they must follow the samesteps when it comes to passing complexdata structures (use same protocol).
34
Extended RPC Models:Doors
The principle of using doors as IPC mechanism.
• A Door is a generic name for a procedure in the address space of a server process that can be called by processes co-located with the server.
• Doors require local OS support.
• Client pass the integer value; server retun the squere value -See Unix Network Programming: Steven page 357
35
Extended RPC Models :Asynchronous RPC (1)
a) The interconnection between client and server in a traditional RPCb) The interaction using asynchronous RPC
2-12
36
Extended RPC Models:Asynchronous RPC (2)
A client and server interacting through two asynchronous RPCs
2-13
37
Example: DCE RPC• Distributed Computing Environment
• Open Software Foundation
• Middleware between existing network operating system and distributed application.
• Initially design for unix – Win NT
38
Services
• Distributed file service
• Directory service– Keep track of resources in the system
• Security service
• Distributed time service– Clocks on the different machines globally
synchronize
39
40
41
42DCE stands for "Distributed Computing Environment / Remote Procedure Calls".
43
44
45
46
47
Writing a Client and a Server
The steps in writing a client and a server in DCE RPC.
2-14
48
Binding a Client to a Server
Client-to-server binding in DCE
2-15
In order client to communicate with server – server must be registered and to accept the incoming call
Client must know the server endpoint (port)to which it can send message.
Port can be used by the server to distinguish between different process.
Maintains by DCE daemon.
Client want to bind to a video server.
Pass the name to directory server
Directory server then return the network address of video server.
Client goes to the DCE daemon – end point of the video server.
RPC take place
Set up the communication between client and server
software
49
RPC SUMMARY
• RPC is well-suited for client-server interaction where the flow of control alternates.
• User does not open connection, read, write, then close connection – client may not even know they are using the network.
• RPC may use TCP or UDP as the transport protocol• Parameter/results marshaling issues• Extended RPC models• Example: SunRPC
50
Distributed object eg. CORBA & DCOM
• State- encapsulate data-distributed across multiple machine.• Method –operation on those data• Method are made available through interface• Proxy at the client acting as stub in RPC• The actual object reside in server machine• Incoming invocation request a first pass to a server stub –
skeleton• Remote object – object on the other machine.
The Common Object Requesting Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) that enables software components written in multiple computer languages and running on multiple computers to work together.
51
DCOMDCOM (Distributed Component Object Model) is a set of Microsoft concepts and program interfaces in which
client program object s can request services from server program objects on other computers in a network.
DCOM is based on the Component Object Model (COM), which provides a set of interfaces allowing clients
and servers to communicate within the same computer (that is running Windows 95 or a later version).
For example, you can create a page for a Web site that contains a script or program that can be processed (before
being sent to a requesting user) not on the Web site server but on another, more specialized server in the
network. Using DCOM interfaces, the Web server site program (now acting as a client object ) can forward a
Remote Procedure Call ( RPC ) to the specialized server object, which provides the necessary processing and
returns the result to the Web server site. It passes the result on to the Web page viewer.
DCOM can also work on a network within an enterprise or on other networks besides the public Internet. It uses
TCP/IP and Hypertext Transfer Protocol . DCOM comes as part of the Windows operating systems. DCOM
is or soon will be available on all major UNIX platforms and on IBM's large server products. DCOM
replaces OLE Remote Automation.
DCOM is generally equivalent to the Common Object Request Broker Architecture ( CORBA ) in terms of
providing a set of distributed services. DCOM is Microsoft's approach to a network-wide environment for
program and data objects. CORBA is sponsored by the rest of the information technology industry under the
auspices of the Object Management Group ( OMG ).
52
Distributed Objects
Common organization of a remote object with client-side proxy.
2-16
In computer networks, a proxy server is a server (a computer system or an application program) that acts as a go-between for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource, available from a different server. The proxy server evaluates the request according to its filtering rules. For example, it may filter traffic by IP address or protocol. If the request is validated by the filter, the proxy provides the resource by connecting to the relevant server and requesting the service on behalf of the client. A proxy server may optionally alter the client's request or the server's response, and sometimes it may serve the request without contacting the specified server. In this case, it 'caches' responses from the remote server, and returns subsequent requests for the same content directly.
53
Binding a Client to an Object
a) (a) Example with implicit binding using only global referencesb) (b) Example with explicit binding using global and local references
Distr_object* obj_ref; //Declare a systemwide object referenceobj_ref = …; // Initialize the reference to a distributed objectobj_ref-> do_something(); // Implicitly bind and invoke a method
(a)
Distr_object objPref; //Declare a systemwide object referenceLocal_object* obj_ptr; //Declare a pointer to local objectsobj_ref = …; //Initialize the reference to a distributed objectobj_ptr = bind(obj_ref); //Explicitly bind and obtain a pointer to the local proxyobj_ptr -> do_something(); //Invoke a method on the local proxy
(b)
54
Implementation of Object References• Simple object reference – network add of the
machine where the object resides with the endpoint
• Drawback – If the server crash- server define another endpoint
after recovery –all object references become invalid.
– Solve using local daemon in DCE located in each machine. Always keep track of the server to endpoint= endpoint table.
55
Static versus Dynamic Remote Method Invocation
• RMI is very similar to RPC.• static invocation
– Use predefine interface definition such as in java
– If interface change- the client application must be recompiled.
• Dynamic invocation– Compose method at runtime
– Application select at runtime which method it will invoke at a remote object.
RMI - Remote Method Invocation, a set of protocols being developed by Sun's JavaSoft division that enables Java objects to communicate remotely with other Java objects. RMI is a relatively simple protocol, but unlike more complex protocols such as CORBA and DCOM, it works only with Java objects. CORBA and DCOM are designed to support objects created in any language.
56
Parameter Passing(1)
• All object in the system can be accessed by remote machine.
• Use references as parameter in method invocation.
• References are passed by reference, copied from one machine to another.
• If in local machine, the reference parameters is copied as a whole and pass along with the invocation= pass by value.
57
Parameter Passing(2)
The situation when passing an object by reference or by value.
2-18
58
Message-Oriented Communication
Message-oriented communication is a way of communicating between processes.
Messages, which correspond to events, are the basic units of data delivered.
Tanenbaum and Steen classified message-oriented communication according to two
factors---synchronous or asynchronous communication, and transient or persistent
communication. In synchronous communication, the sender blocks waiting for the
receiver to engage in the exchange. Asynchronous communication does not require
both the sender and the receiver to execute simultaneously. So, the sender and
recipient are loosely-coupled. The amount of time messages are stored determines
whether the communication is transient or persistent. Transient communication stores
the message only while both partners in the communication are executing. If the next
router or receiver is not available, then the message is discarded. Persistent
communication, on the other hand, stores the message until the recipient receives it.
From Jungkee Kim's dissertation
59
continuedA typical example of asynchronous persistent communication is Message-Oriented
Middleware (MOM). Message-oriented middleware is also called a message-queuing
system, a message framework, or just a messaging system. MOM can form an
important middleware layer for enterprise applications on the Internet. In the publish
and subscribe model, a client can register as a publisher or a subscriber of messages.
Messages are delivered only to the relevant destinations and only once, with various
communication methods including one-to-many or many-to-many communication.
The data source and destination can be decoupled under such a model.
The Java Message Service (JMS) from Sun Microsystems provides a common interface
for Java applications to MOM implementations. Since JMS was integrated with the
recent version of the Java 2 Enterprise Edition (J2EE) platform, Enterprise Java
Beans (EJB)---the component architecture of J2EE---has a new type of bean, the
message-driven bean. The JMS integration simplifies the enterprise development,
allowing a decoupling between components.
60
Message Oriented Communication1. Persistence and Synchronicity in
Communication1. Persistence
2. Transient
3. Asynchronous
4. Synchronous
2. Message-Oriented Transient Communication
3. Message-Oriented Persistence Communication
61
Message + Network
•Communication system is organized as a computer network•Application are always executed on hosts, •each host offer an interface to the communication system•Each host are connected through a network of communication servers •Which responsible for passing message between hosts
62
Persistence Communication
Message that has been submitted is stored by the communication system as long as it takes to deliver it to receiver.
Example: Mail
63
Persistence and Synchronicity in Communication (1)
General organization of a communication system in which hosts are connected through a network
2-20
64
Persistence and Synchronicity in Communication (2)
Persistent communication of letters back in the days of the Pony Express.
65
Transient Communication
A message is stored by the communication system as long as the sending and receiving application is running.
The message will be discarded if the communication server cannot delivery the message to destination server.
Example: Router.
66
Asynchronous Communication
Sender continuous immediately after it has transmitted the message.
The message is either stored in local buffer or at the first communication server
Example: asynchronous - the answering machine
67
Asynchronous Send
??????
68
Synchronous
The sender is blocked until its message is stored in local buffer at the receiver end or the message has been delivered.
The strongest form of Syn Comm is when the sender can only continue executing after the receiver process the message.
69
Synchronous Send
Provide information about the relative execution points of sender and receiver - causes synchronization of the two.
70
Persistence and Synchronicity in Communication (3)
a) Persistent asynchronous communication
b) Persistent synchronous communication
2-22.1
Persistence Asynchronous Comm Persistence synchronous Comm
71
Persistence and Synchronicity in Communication (4)
c) Transient asynchronous communication
2-22.2
72
Transient Synchronous Communications
d) Receipt-based transient synchronous communication
Weakest form, based on message receipt.
The sender is blocked until the message is stored in receiver’s local buffer.
The sender receive an acknowledge(receipt) and continue.
73
Persistence and Synchronicity in Communication (5)
e) Delivery-based transient synchronous communication at message delivery –client idle until its request has been accepted for further processing
f) Response-based transient synchronous communication-client waits until receives a reply from the server. Ie- client-server.
74
Berkeley Sockets (1)Socket primitives for TCP/IP.
Primitive Meaning
Socket Create a new communication endpoint
Bind Attach a local address to a socket
ListenAnnounce willingness to accept connections
AcceptBlock caller until a connection request arrives
Connect Actively attempt to establish a connection
Send Send some data over the connection
Receive Receive some data over the connection
Close Release the connection
75
Examples#include <sys/types.h> #include <sys/socket.h>
int socket(int domain, int type, int protocol)domain is either AF_UNIX or AF_INET. This parameter specifies whether the socket is to be used for communicating between Unix file system like objects or
Internet objects. type specifies the communications semantics. There are a number of possible values. SOCK_STREAM-stream based full-duplex communication SOCK_DGRAM-datagram based communication SOCK_RAW-use raw IP sockets (must be super-user) SOCK_SEQPACKET-sequenced reliable datagrams SOCK_RDM-reliably delivered messages
protocol is normally set to zero.
/* create socket */ sd = socket(AF_INET, SOCK_STREAM, 0); if(sd<0) { perror("cannot open socket "); return ERROR; }
76
bind()
int bind(int s, struct sockaddr *name, int namelen)
The final value simply means that connections will be accepted from any remote host./* bind server port */
servAddr.sin_family = AF_INET; servAddr.sin_addr.s_addr = htonl(INADDR_ANY); servAddr.sin_port = htons(SERVER_PORT);
if(bind(sd, (struct sockaddr *) &servAddr, sizeof(servAddr))<0) { perror("cannot bind port "); return ERROR;
}
77
Incoming Connections listen()
Once an address has been bound to a socket it is then necessary to indicate the socket is to be listened to for incoming connection requests. This is done using the listen() function. Its prototype is
int listen(int s, int backlog)
s specifies the socket.
backlog specifies the maximum number of outstanding connection requests in listen()'s input queue. listen() can only be associated with SOCK_STREAM or SOCK_SEQPACKET type sockets.
listen(sd,5);
78
send()
send() may be used in the same way as write().
The prototype is
#include<sys/types.h> #include<sys/socket.h>
int send(int s, char *msg, int len, int flags)
Simple Socket program can be found athttp://www.scit.wlv.ac.uk/~jphb/comms/
sockets.example.html
79
Berkeley Sockets (2)
Connection-oriented communication pattern using sockets.
80
Socket
• Based on send and receive primitive
• Design to communicate across network using general purpose protocol stack-tcp/ip
• NOT considered for high-speed interconnection network
• MPI?
81
The Message-Passing Interface (MPI)
Some of the most intuitive message-passing primitives of MPI.
Primitive Meaning
MPI_bsend Append outgoing message to a local send buffer
MPI_sendSend a message and wait until copied to local or remote buffer
MPI_ssend Send a message and wait until receipt starts
MPI_sendrecv Send a message and wait for reply
MPI_isend Pass reference to outgoing message, and continue
MPI_issendPass reference to outgoing message, and wait until receipt starts
MPI_recv Receive a message; block if there are none
MPI_irecv Check if there is an incoming message, but do not block
Designed for parallel application – transient communicationNo concept such as the communication serverAssume communication take place within a known group of process with id (groupID, processID)
82
MPI_bsend
1. Sender submit msg for transmission.
2. Copy to local buffer.
3. Sender continue to send.
4. Receiver call receive.
5. Local MPI runtime system at sender will remove the message from local buffer and transmit the message.
12
3
4
5
83
MPI_send&MPI_ssend primitive
Blocking Send Operation
the caller will be blocked until the message has been copied to MPI runtime system at the sender’s side
Blocking Send Operation
the caller will be blocked until the receiver initiated a receive operation
84
MPI_sendrecv
Send a request and wait till return the reply
= normal RPC
85
Message-Oriented Persistence Communication
Message queuing system/Message Oriented Middleware
Offer intermediate-term storage capacity for message- without requiring sender & receiver to active
Support longer time message transfer
86
Message Queuing Model
– App’n communicate by inserting message in its own private queue
– Also possible the queue being shared by other App’n
– Message are guaranteed to be inserted in queue but not to receive by receiver
– Message is forwarded over a series of communication servers
– Receiver and sender is independent.
87
Message-Queuing Model (1)
Four combinations for loosely-coupled communications using queues.
2-26
88
Message-Queuing Model (2)
Basic interface to a queue in a message-queuing system.
Primitive Meaning
Put Append a message to a specified queue
GetBlock until the specified queue is nonempty, and remove the first message
PollCheck a specified queue for messages, and remove the first. Never block.
NotifyInstall a handler to be called when a message is put into the specified queue.
89
General Architecture of a Message-Queuing System (1)
The relationship between queue-level addressing and network-level addressing.
90
General Architecture of a Message Queuing System
• Message can only be put to local queues• Called as source queue• And also- message can be read from local queues• Message put in the queue will contain the destination
queues to which it should be transferred.• Message queuing system maintain a database of queue
names to network location(DNS)• Queues are manage by queue managers• Special queue managers that operate as routers or relay
– Forward the incoming messages to other queue managers
91
General Architecture of a Message-Queuing System (2)
The general organization of a message-queuing system with routers.
2-29
Use few router with the knowledge of topologyOnly the router need to be updated when queues are added/deletedQueue manager has to know only the nearest router
92
Message Broker(1)Each time the new application is added- different message format will introduce.Require the sender and receiver have the same message format.- agree with common message format.
Conversion are handled by special node in a queuing networkKnown as MESSAGE BROKER.Purpose – to convert the incoming message to a format that can be understood by destination application.Message reformatter
Message broker is an intermediary program that translates a message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver in a telecommunication network where programs communicate by exchanging formally-defined messages.
93
Message Brokers(2)
The general organization of a message broker in a message-queuing
system.2-30
94
Data Stream• Support for continuous media• Sequence of data unit• Isochronous Transmission mode
– Distributed multimedia system– Refers as stream
• Stream /2– Simple stream – consist of only single sequence of data– Complex stream – several related simple streams(sub streams)
In telecommunications and computing, a data stream is a sequence of digitally encoded coherent signals (packets of data or datapackets) used to transmit or receive information that is in transmission.
In electronics and computer architecture, a data stream determines for which time which data item is scheduled to enter or leave which port of a systolic array, a Reconfigurable Data Path Array or similar pipe network, or other processing unit or block.
95
Data Stream (1)
Setting up a stream between two processes across a network.
Source and sink
Source could be a process
Reading an audio file from a disk – transmit byte by byte
Sink – fetching the byte as they come in – passing them to local audio device
96
Data Stream (2)
Setting up a stream directly between two devices.
2-35.2
97
Data Stream (3)
An example of multicasting a stream to several receivers.
Data stream is multicast to many receiversFilters are use to adjust the quality of incoming stream
98
The VideoLAN project targets multimedia streaming of MPEG-1, MPEG-2, MPEG-4 and DivX files, DVDs, digital satellite channels, digital terrestial television channels and live videos on a high-bandwidth IPv4 or IPv6 network in unicast or multicast under many OSes. VideoLAN also features a cross-platform multimedia player, VLC, which can be used to read the stream from the network or display video read locally on the computer under all GNU/Linux flavours, all BSD flavours, Windows, Mac OS X, BeOS, Solaris, QNX, Familiar Linux
VLC is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to stream over networks and to transcode multimedia files and save them into various formats.
99
Overview of the VideoLAN streaming solution
100
Specifying QoS (1)
A flow specification.
Characteristics of the Input Service Required
•maximum data unit size (bytes)•Token bucket rate (bytes/sec)•Toke bucket size (bytes)•Maximum transmission rate (bytes/sec)
•Loss sensitivity (bytes)•Loss interval (sec)•Burst loss sensitivity (data units)•Minimum delay noticed (sec)•Maximum delay variation (sec)•Quality of guarantee
101
Specifying QoS (2)
The principle of a token bucket algorithm.
102
Flow Spec1. Loss sensitivity – acceptable loss rate• Loss interval (sec)• Burst loss sensitivity (data units) – how many
consecutive data unit may be lost• Minimum delay noticed (sec)- how long the tolerable
delay before noticed by receiver• Maximum delay variation (sec)- maximum tolerate jitter
for video and audio• Quality of guarantee- how serious the service
requirement should be taken
103
Setting up Stream
• Sender in RSVP provide flow specification– Bandwidth, delay, jitter etc.
• The specification is handed over to RSVP process that is colocated at the same machine as the sender
• RSVP is receiver-initiated QoS protocol(receiver are required to send reservation requests along the same path to the sender)
• Receiver may set a new parameter value(flow specification) to the sender.
104
Setting Up a Stream
105
RSVP
QoS (Quality of Service) refers to a broad collection of networking technologies and techniques. The goal of QoS is to provide guarantees on the ability of a network to deliver predictable results. Elements of network performance within the scope of QoS often include availability (uptime), bandwidth (throughput), latency (delay), and error rate.
QoS involves prioritization of network traffic. QoS can be targeted at a network interface, toward a given server or router's performance, or in terms of specific applications.
106
Stream SynchronizationDiscrete Data Stream
•Slide show on the web+Audio
•Each slide transferred on the discrete data stream form
•Synchronization – slide+audio
Continuous Data Stream
•Playing Movie
•Video stream need to be synchronized with the audio
•Lip synchronization
107
Synchronization Mechanisms (1)
The principle of explicit synchronization on the level data units.
108
Synchronization Mechanisms (2)
The principle of synchronization as supported by high-level interfaces.
2-41
109
Summary• COMMUNICATION
– Layered Protocol• Lower level protocol(PL, DLL,NL)• Transport Protocol
– Client-Server TCP
• Higher Level Protocol– Session& Presentation– Application Protocol– Middleware Protocol
– RPC• Client & server Stub
– Remote Object Invocation• Distributed Object
– Message-Oriented Communication• Connection-oriented communication – Berkeley Socket• Message Broker
– Stream-Oriented Communication
110
PROBLEMSDiscuss in groups of 3-4
In many layered protocols, each layer has its own header. Surely it would be efficient to have a single header at the front for each message with all control in it than all these separate headers. Why is this not done