vsp video station protocol presented by : mittelman dana ben-hamo revital ariel tal instructor :...

21
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy

Post on 22-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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

Page 2: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

Presentation Overview

Introduction

Top Level Design

Client’s Modules

Message Structure

Server’s Modules

Bandwidth Control Mechanism

Page 3: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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).

Page 4: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 5: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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

Page 6: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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).

Page 7: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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

Page 8: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 9: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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

Page 10: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

Main modules – Client + Server

Protocol Format

UDP Manager

SocketClient/Server Information

Protocol Format

SocketClient/Server Information

UDP Manager

Protocol Handler

Page 11: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

Client’s Modules

Client API

Protocol Handler

Protocol Format

Socket Interface

Servers Context

UDP Manager

Page 12: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 13: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 14: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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

Page 15: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

Server’s Modules

Server API

Client Handlers + VSP Layers

Socket Interface

Client Context

Protocol Format

Call Back

UDP Manager

Protocol Handler

(dispatcher)

Page 16: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 17: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 18: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

Server’s Modules – Cont.

UDP Manager

UDP Manager

Video Managers

Listener Thread

Talker Thread

synchronized queue

Bandwidth control

mechanism

Page 19: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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 .

Page 20: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital

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.

Page 21: VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital