computer network project computer network project efficient handling of email messages with...
Post on 20-Dec-2015
215 views
TRANSCRIPT
Computer Network Computer Network ProjectProject
Efficient handling of email Efficient handling of email messages with multimedia messages with multimedia
attachmentsattachments
The ProblemThe Problem
In order to guaranty efficient handling of In order to guaranty efficient handling of email messages with multimedia email messages with multimedia attachments, we must insure the following:attachments, we must insure the following: End users capability to open the file attached.End users capability to open the file attached. Minimal network cost.Minimal network cost. Avoid wasting the networks resources, by Avoid wasting the networks resources, by
sending files that later can not be used.sending files that later can not be used.
The Projects GoalThe Projects Goal
Investigate the different formats supported by Investigate the different formats supported by the multimedia standard.the multimedia standard.Define an algorithm, which will decide the format Define an algorithm, which will decide the format in which the Multimedia file will be send in and in which the Multimedia file will be send in and later stored in, by taking the following aspects later stored in, by taking the following aspects under consideration.under consideration. The conversions abilities available.The conversions abilities available. The conversions costs.The conversions costs. The conversion capabilities of the mail server and end The conversion capabilities of the mail server and end
user. user. Conversion times (between the different standards).Conversion times (between the different standards). The network efficiency.The network efficiency.
Standard multimedia formatsStandard multimedia formats
The AVI Format.The AVI Format.
The MPEG2 Format.The MPEG2 Format.
The MPEG4 Format.The MPEG4 Format.
Profiles and LevelsProfiles and Levels
The MPEG 2 & 4 formats are divided into many The MPEG 2 & 4 formats are divided into many profiles and levels.profiles and levels.
The common profiles and levels used today: The common profiles and levels used today: MPEG-2MPEG-2 Main profile in Main level.Main profile in Main level. SNR profile in Main level.SNR profile in Main level.
MPEG-4MPEG-4 Simple profile in L0 level.Simple profile in L0 level. Simple profile in L1 level.Simple profile in L1 level. Simple profile in L2 level.Simple profile in L2 level.
AVI formatAVI format
Solution description Solution description
Given a source format, a list of destination formats Given a source format, a list of destination formats and the converting abilities of the source and and the converting abilities of the source and destination server find the most suitable destination server find the most suitable conversions tree under the following restrictions:conversions tree under the following restrictions:
The tree should be the lightest tree that we can The tree should be the lightest tree that we can get in a manner of conversion and transmission get in a manner of conversion and transmission costs.costs.
There will be a limit on the number of file formats There will be a limit on the number of file formats that could be transferred over the network.that could be transferred over the network.
Solution description cont.Solution description cont.
InputsInputsSource file’s format.Source file’s format.End-user’s encoding capabilities (destination formats).End-user’s encoding capabilities (destination formats).Mail server’s conversions abilities and costs.Mail server’s conversions abilities and costs.Network costs for sending a specific file format. Network costs for sending a specific file format. Number of times we can transmit through the network.Number of times we can transmit through the network.All these inputs will be used to create an initial graph which it itself All these inputs will be used to create an initial graph which it itself will be the algorithms input.will be the algorithms input.
OutputsOutputsConversion-tree: after the algorithm is executed we will receive a Conversion-tree: after the algorithm is executed we will receive a minimal weighted path tree which represents the conversions minimal weighted path tree which represents the conversions should be made in order to deliver the multimedia file to the end-should be made in order to deliver the multimedia file to the end-users in the format they can encode. The tree will state where the users in the format they can encode. The tree will state where the conversions should be made and which file formats should be sent conversions should be made and which file formats should be sent through the network.through the network.
Creating the initial graph Creating the initial graph
Graph vertex: Different file formats.Graph vertex: Different file formats.Graph edges: Possible conversions between file formats or Graph edges: Possible conversions between file formats or transmission of file format through the network.transmission of file format through the network.Weights:Weights:Conversions time on the different servers.Conversions time on the different servers.Transmission costs through the networkTransmission costs through the networkThe initial graph has two layers. The upper layer represents the The initial graph has two layers. The upper layer represents the conversion abilities of the source mailing server and the bottom conversion abilities of the source mailing server and the bottom layer represents the conversion abilities of the destination mailing layer represents the conversion abilities of the destination mailing server. Connecting these layers are the edges representing the server. Connecting these layers are the edges representing the networks transfer abilities. Note that over the network the file must networks transfer abilities. Note that over the network the file must stay in the format in which it is sent. stay in the format in which it is sent. This initial graph will represent the algorithms input and we will This initial graph will represent the algorithms input and we will receive as output the minimal weighted path tree (the conversion receive as output the minimal weighted path tree (the conversion tree).tree).
The algorithm The algorithm
Our algorithm is based on the ASTAR algorithm, which uses Our algorithm is based on the ASTAR algorithm, which uses heuristic function in order to create a “minimal weighted path tree”. heuristic function in order to create a “minimal weighted path tree”. After building the initial graph and defining the source format (In the After building the initial graph and defining the source format (In the initial graph upper level) as the “head” and the vertexes that initial graph upper level) as the “head” and the vertexes that represent the formats we want the end users to receive (in the initial represent the formats we want the end users to receive (in the initial graph bottom level) as “target vertexes”, it starts the calculation.graph bottom level) as “target vertexes”, it starts the calculation.The algorithm builds the conversions-tree in the following method: The algorithm builds the conversions-tree in the following method: It runs the ASTAR algorithm. Each step the minimal tree created It runs the ASTAR algorithm. Each step the minimal tree created until that point is taken out of the open list and all its successors are until that point is taken out of the open list and all its successors are calculated and placed in the open list at their proper place. Again calculated and placed in the open list at their proper place. Again the minimal tree is chosen and so forth. The heuristic function is the minimal tree is chosen and so forth. The heuristic function is based on the number of “target vertexes” in the “minimal weighted based on the number of “target vertexes” in the “minimal weighted paths tree”. The algorithm stops when the tree which was built paths tree”. The algorithm stops when the tree which was built contains all the “target vertexes” and it is the lightest tree it can get.contains all the “target vertexes” and it is the lightest tree it can get.
ExampleExampleThe initial treeThe initial tree
Source format : Mpeg2Source format : Mpeg2Destination Formats : Mpeg4 , AVIDestination Formats : Mpeg4 , AVINetwork crosses allowed: 1Network crosses allowed: 1
Mpeg2
Mpeg2 AVI
Mpeg4
Mpeg4
AVI
0.9
2
2
80.3
1
Step OneStep One
The open list:The open list:
Mpeg2
Open = } {
Step TwoStep Two
The open list:The open list:
Open = {Mpeg2
AVI
0.9
}Mpeg2
Mpeg2
2
Current minimal tree
Step ThreeStep Three
The open list:The open list:
Open = {}Mpeg2
Mpeg2
2
Current minimal tree
Mpeg2
AVI
AVI
0.9
8
Step FourStep Four
The open list:The open list:
Open = {}
Current minimal tree
Mpeg2
AVI
AVI
0.9
8
Mpeg2
Mpeg2
Mpeg4
2
2
Step FiveStep FiveThe open list:The open list:
All the destination formats reachedAll the destination formats reached
Open = {}
Current minimal tree
Mpeg2
AVI
AVI
0.9
8
Mpeg2
Mpeg2 AVI
Mpeg4
2
2
1
The Conversion treeThe Conversion tree
The output of the algorithmThe output of the algorithm
Cost: Cost: 55
Mpeg2
Mpeg2 AVI
Mpeg4
2
2
1
Using the ProgramUsing the Program
Load from XMLLoad from XMLPress Form XML tab
Load from XMLLoad from XMLOpen XML file
1. Pressing Browser button
2. choosing the Path from Dialog box
3. Pressing Load Data From XML button
Load from XMLLoad from XMLInitial Data and start calculation
1. Choose Source & Destination Formats
2. Choose The number of times we can send data over the net
3. Choose Network transfer weight
4. Press Start Calculation button to start the algorithm
Load from ExcelLoad from ExcelPress Form Excel tab
Load from ExcelLoad from ExcelOpen XML file
1. Pressing Brower button
2. choosing the Path from Dialog box
3. Pressing Load Data From Excel button
Load from ExcelLoad from ExcelInitial Data and start calculation
1. Choose Source & Destination Formats
2. Choose The number of times we can send data over the net
3. Chooser Network transfer weight
4. Press Start Calculation button to start the algorithm
Create Excel fileCreate Excel filePress Create Excel File tab
Create Excel fileCreate Excel fileRetrieve Formats from text file
1. Pressing Brower button
2. choosing the Path from Dialog box
3. Pressing Load Formats from Text file
Create Excel fileCreate Excel fileCreate Excel file
1. Choose Formats
2. Press Create Excel File button
Create Excel fileCreate Excel fileFill the data in the new generated Excel File
1. Source Weights
2. Destination Weights
3. Network Weights
Calculation ResultCalculation ResultPress Result tab
Calculation ResultCalculation ResultThe result tree is printed as arcs holding the following data
1. Source node (Format)
2. Destination node (Format)
3. Platform (The type of arc Source / Destinaion / Network)
4. Weight
Calculation ResultCalculation ResultCreate XML file from the result
1. Press Browser button to choose path
2. choose path
3. Press Created XML Solution to create XML file