Development of Network

advertisement
Development of a NetworkAware Application
Daniel Peck
Background

A network-aware application attempts to adjust
its resource demands in response to network
performance variations. In other words, the
application adjusts to the networking
environment by trading off the volume, quality
and the time needed for the data to be
transferred. The application will reduce its
demands on the network if there is a drop in
bandwidth and increase its demands if there are
additional resources.
Purpose



The underlying aim of this project is to develop
a Network-Aware Application that focuses on
an important part of network-awareness.
Compressed Data Transmission
Has the ability to compress data before sending
it out with the potential to reduce network
transmission time and reduce total elapsed time.
Why is this useful?

Compression can reduce the transmission time
by reducing the amount of data to be
transferred.
Can the Application benefit from
data compression?

Yes, but it depends on the tradeoff between the
reduction of network transmission time and the
increase of local processing.
Architecture
Application Pseudo Code








// Control loop
repeat {
compressedDataTransmission( data )
} until (all data is sent out);
compressedDataTransmission ( data ){
compressionSpeed = getSpeed();
compressionRatio = getRatio();
currentBandwidth = getBandwidth();

if ( compressedTransfer(data, currentBandwidth,
compressionSpeed, compressionRatio ) ){
compress(data, &compressiondata);
send( compressiondata );
} else {
send (data );
}








}
Compression Module




GZip
Gzip is a standard compression utility
commonly used on Unix OS platforms.
Does not consider domain specific information
and uses a simple, bitwise algorithm to compress
files.
Works in stream mode ( time compression
starts, not all data has to be available)
Implementation

Client and server to be written in Java 1.4.

Socket, ServerSocket, java nio package.
Network Module



Monitors the network performance and
provides necessary information for the
application such a available bandwidth.
What is Available Bandwidth?
How do me measure it?
What is Available Bandwidth?





End to end path with n – links: L1,L2, …, Ln
Their capacities are B1,B2, …, Bn
Traffic loads on these links are C1,C2,…,Cn
Bottleneck link: Lb(1<= b <= n ) where
Bb = min(B1, B2,…,Bn)
Tight Link: Lt(1<= t <= n ) where
Bt - Ct = min(B1 – C1 , B2 – C2 ,…, Bn - Cn )
What is Available Bandwidth?


The unused bandwidth on the tight link, Bt – Ct,
is also the available bandwidth on the path.
In other words, the link with the smallest
residual bandwidth.
How to Measure Available
Bandwidth


IGI
IGI is a tool that uses active probing to measure
available bandwidth between two points on the
Internet.
Network Module cont..
Network Module cont..
Network Module cont..
Network Module cont..
Compression Decision Module

Makes final decision whether compression is beneficial.

uncompressedTime = bufferSize / bandwidth;

compressionSize = bufferSize / cRatio;

sendTime = compressionSize / bandwidth;

compressionTime = bufferSize / cSpeed;

totalTime = compressionTime + sendTime;
Decompression Module


Use a simple application layer protocol that tells
the client whether or not to decompress the
chunk or not.
"filename!isCompressed!totalChunk!filelength!
chunkNumber!isCompressed!bufferSize!
Conclusion


On schedule.
Working prototype is finished and ready to be
tested.
Download