VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor :...
-
date post
22-Dec-2015 -
Category
Documents
-
view
213 -
download
0
Transcript of VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor :...
VSPVideo Station Protocol
Presented by: Mittelman Dana
Ben-Hamo RevitalAriel Tal
Instructor: Sela Guy
Presented by: Mittelman Dana
Ben-Hamo RevitalAriel Tal
Instructor: Sela Guy
Presentation Overview
Introduction
Top Level Design
Client’s Modules
Message Structure
Server’s Modules
Bandwidth Control Mechanism
Project Objective
Implementation of prioritized communication protocol ,in
terms of bandwidth, in order to transfer multimedia stream
from a video server to hosts that we call VS’s (i.e video
stations).
Theoretical Background
Client-server A network architecture in which each computer on the network is either a client or a server. Servers are powerful computers or processes dedicated to managing disk drives ,printers or network traffic. Clients are PC’s or workstations on which users run applications. Clients rely on servers for resources
Streaming A process of playing a file while it is still downloading.
We will focus on streaming media which is a sequence of frames that are sent over the Internet and are seen by the viewer as they arrive.
Over Look Example
This example is for one server and one client only:
Client API Server API
Client VSP Protocol
Server VSP Protocol
API API Callback
request
Ack
UDPUDP
TCP + UDP
Message Structure
Messages between the client and the server will run over TCP & UDP.
There are two kinds of messages:
• Control Messages (TCP) -
Made up of Header (in permanent size ) & body
• Data Messages (UDP).
Message Structure – cont.
Types of massages:
• Application messages,
include the abilities of the server & the demands of the client.
• Protocol codes:
Hello, Bye, Allocate video channel, Free video channel
Control Messages
Header structure:Size Code ID Error
2 Bytes 1 Bytes2 Bytes1 Byte
Message Structure – cont.
Hello reply:
is sent with the header and a body which includes the server’s abilities and if the client was registered or not.
Control Messages - example
Hello request:
is sent with the header and a body which includes the client’s id and priority.
Management messages overview
Client Serverlisten
Process reply
Connect (TCP)
Accept (TCP)
Send Request
Send Reply
SRV socketCL socket
Phase 1 reading
Phase 2 reading
2 phase reading
Analyze headerRead header
Read bodyAnalyze body
Main modules – Client + Server
Protocol Format
UDP Manager
SocketClient/Server Information
Protocol Format
SocketClient/Server Information
UDP Manager
Protocol Handler
Client’s Modules
Client API
Protocol Handler
Protocol Format
Socket Interface
Servers Context
UDP Manager
Client’s Modules – Cont.
Client API:
An interface holding application relevant functions for the client.
Protocol Handler:
Includes all of the protocol’s logic management, using the modules: UDP Handler, Socket Interface and Protocol Format .
Server Information:Holds information regarding every server.
The servers status (such as TCP open port, open channels) with every server that has an open session.
Client’s Modules – Cont.
Protocol Format:
• Receives application and protocol data and converts into VSP message request format.
• Receives VSP message reply format and converts into application and protocol data.
Socket Interface:Wrapper that contains all socket issues.
Client’s Modules – Cont.
UDP Manager
UDP Manager
Video Managers
Listener Thread
Talker Thread
synchronized queue
Creates and removes
all video connections Creates and destructs the
Listener, Talker and synchronized queue
Reads from the server and write to the synchronized
queueReads from the
synchronized queue and writes to the local host
Server’s Modules
Server API
Client Handlers + VSP Layers
Socket Interface
Client Context
Protocol Format
Call Back
UDP Manager
Protocol Handler
(dispatcher)
Server’s Modules – Cont.
Server API:
An interface holding application relevant functions for the server.
Protocol Handler:
Handles all client’s connections and opens a client thread for each client TCP connection.
Client Handler + VSP Layer:
Handles protocol’s logic management.
For every client connection there will be a separate Handler and Layer.
VSP Layer holds all relevant client information and opens a UDP connection for every client request.
Server’s Modules – Cont.
Protocol Format:
• Receives VSP message request format and converts into application and protocol data.
• Receives application and protocol data and converts into VSP message reply format.
Socket Interface:Wrapper that contains all socket issues.
Client Information:Holds information regarding every client.
The clients status (such as TCP open port, priority) for every client that has an open session.
Server’s Modules – Cont.
UDP Manager
UDP Manager
Video Managers
Listener Thread
Talker Thread
synchronized queue
Bandwidth control
mechanism
Bandwidth Control Mechanism
We Calculated the number of bytes we need to send, by multiplying the bandwidth by the time it will take us to send it.
We calculated it incrementally by sending a portion every time interval, and decreasing the bytes we sent from the total bytes we need to send.
We limited the sent frames quota by limiting the “quiet” time .
Bandwidth Control Mechanism
A frame can be larger than it’s quota by 5%, because of the following reasons:
• Avoid wasting a slot when we have a frame that we can send.
• A frame which is slightly larger then the quota can be sent immediately
The bandwidth given to the client is calculated according to his priority, and the way to calculate it can be changed by the application.
The protocol uses the slots made by the operating system and only chooses whether to use the current slot or not.