Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
10-1-1996
A Buffering strategy for stabilizing network data
rates
Brian Bell
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
Recommended Citation
A BUFFERING STRATEGY FOR STABILIZING
NETWORK DATA RATES
by
Brian D. Bell
A Thesis Submitted
m
Partial Fulfillment of the
Requirements for the Degree of
MASTER OF SCIENCE
m
Computer Engineering
Approved by:
_
Dr. Charles
K.
Shank, Assistant Professor
Dr. Tony
H.
Chang, Professor
Dr. Roy S. Czernikowski, Professor and Department Head
Department of Computer Engineering
College of Engineering
Rochester Institute of Technology
Rochester, New York
THESIS RELEASE PERMISSION FORM
ROCHESTER INSTITUTE OF TECHNOLOGY
COLLEGE OF ENGINEERING
Title: A Buffering Strategy for Stabilizing Network Data Rates
I, Brian D. Bell, hereby grant pennission to the Wallace Memorial Library to
reproduce my thesis in whole or part.
Signature:
_
Date:
11/1--r)
I
:1
'196
Trademarks
HP
Java
Netscape
OSF
Sun
UNIX
Windows 95
HP is
atrademark
ofthe
Hewlett-Packard
Company
Java is
atrademark
ofSun
Microsystems,
Inc.
Netscape is
atrademark
ofNetscape
Communications Corporation
OSF is
atrademark
ofthe
Open Software
Foundation,
Inc.
Sun is
atrademark
ofSun
Microsystems,
Inc.
UNIX
is
atrademark
ofX/Open
Company
Limited.
Windows 95
is
atrademark
ofMicrosoft
Corporation
Copyright
1996
Brian D. Bell
Acknowledgments
The
author wishesto
thank the
peoplethat
madethis thesis
possible.First
the
graduate
committee,
Dr.
Roy
Czernikowski,
Dr.
Tony Chang,
andespecially Dr.
Kevin Shank
who guided methrough this
long
process.Thanks
alsoto
Paul
Ferno
who
listened
to
and critiqued numerousideas
and evenhad
afew
suggestions ofhis
own.
Thanks
alsoto
Frank Casilio
who waswilling
to
help
with systems problemsaround
the
clock.Thanks
goto
Fr. ]oq Catanise
andSr. Marlene Vigna
for
their
support and prayers.
The
greatestthanks
goto my
parents,
Dave
andKathy
Bell.
Without
their
support,
prayers,
andunderstanding
this
thesis
could nothave been
completed.
This
thesis
is dedicated
to them
withmy
love
and gratitudefor
their
sacrificesover
the
pastfive
years.Abstract
In
the
pastten years,
there
has been
substantial growthin
the
areaof networkedapplications.
The
expansion of suchInternet
applications asUSENET
andthe
worldwide web
has
lead
to
greaterdemand for faster
andhigher
quality
data
transmissions.
However,
the
Internet
tends
to
have
abursty
traffic
pattern.Such
a patterninterferes
with an application's
ability
to
receive adata
streamat a constant rate.A
constant rateis necessary for
real-time,
networked multimedia applicationsto
be
ableto
provide ahigh quality
of serviceto the
user.This
thesis
proposes abuffering
strategy
that
stabilizes a
bursty
data
stream.It
usesbuffered data
to
present a client application witha constant
data
stream.An implementation
ofthe
strategy
was producedusing
the
Java
programming
language.
Results
indicate
that
networked multimediaapplications
that
usethis
strategy
can provide ahigher quality
of servicethan
Table
of
Contents
Trademarks
iii
Acknowledgments
iv
Abstract
vTable
ofContents
viList Of Figures
ix
List Of Tables
xGlossary
xi1.0 Introduction
1
1.1 Multimedia
1
1.2 Networked Multimedia
2
1.3 The
Buffering
Strategy
6
1.4 The
Javalanguage
andObject Oriented Design
7
1.4.1 Booch Class Diagrams
9
1.5
Thesis Organization
10
2.0 Related Work
11
2.1 Real
Audio1 1
2.2
University
ofOregon MPEG Player
13
3.0
The
Buffering Strategy
16
3.1 Computer Networks
16
3.2
Bursty
Network Traffic Patterns
17
3.3 Buffers
19
3.3.1 The Client Buffer
19
3.3.2 The Server Buffer
21
3.3.3
Feedback
22
3.4
Relationship
ofthe
Buffers
to
the
Network
24
3.5
Consequences
ofthe
Strategy
27
4.0 The Java
Implementation
31
4.1 Java
Features
31
4.1.1
Packages
31
4.1.2
Interfaces
31
4.1.3 Threads
32
4.2
Utility
Classes
34
4.2.1 IO Class
34
4.2.2 Buffer Class
35
4.2.3 Statistic Class
37
4.3 The Core Classes
38
4.3.1 Controller Class
39
4.3.2 ReceiveController Class
40
4.3.3 SendController Class
41
4.3.4 Wakeable Interface
45
4.4 The Client Buffer
46
4.4.1 ClientBuffer Class
46
4.4.2 RateCalculator Class
48
4.4.3 BufferMonitor Class
49
4.4.4 The Complete Client Buffer
50
4.5
The Server Buffer
51
4.5.1 Changes
to the
Core Classes
51
4.5.1.1 SendController
51
4.5.1.2 Receive Controller
52
4.5.3 Feedback Class
54
4.5.4 Complete Server Buffer
55
5.0 Results
andAnalysis
57
5.1 The Network Simulator
57
5.1.1 The Server
58
5.1.2 The Network
59
5.1.2.1 Network Class
59
5.1.2.2 TimeNetwork
andTimeNetworkWrap
Classes
61
5.1.3 The Sound Player
64
5.2 Results
65
5.2.1
Testing
the
1000 Packet Client Buffer
65
5.2.2 Transfers Without
the
Strategy
70
5.2.3 A Smaller Client Buffer
72
6.0 Conclusion
andFuture Work
76
6.1 Conclusion
76
6.2 Future Work
78
Bibliography
80
List Of Figures
Figure
1
-Sample
Booch Class Diagram
10
Figure 2
The
Strategy's
View
ofthe
Network
17
Figure 3
-Sample
Bursty
Traffic Pattern
18
Figure 4
-The Buffer
Strategy
25
Figure 5
-View
of
the
Network
According
to the
Client
andServer
26
Figure 6
-Booch Diagram
ofIO Class
35
Figure 7
Booch Diagram
ofBuffer Class
37
Figure 8
-Booch Diagram
of
Core Classes
39
Figure 9
-Booch Diagram
of
the
Client Buffer
program51
Figure 10
-Booch Diagram for
the
Server Buffer Program
56
Figure 1 1
-Complete
[image:10.548.81.477.138.387.2]List
Of Tables
Table 1
-Sleep
Times
withtheir
Resultant Data Rates
43
Table 2
-Determination
ofModifier Values
44
Table 3
-Results
with
1000
Packet
Client Buffer
67
Table 4
-Results
Without
Buffering
71
Table 5
Glossary
Abstract
Class
API
Bandwidth
Class
Client
A
classthat
cannotbe instantiated. Used
to
combine common methodsinto
one superclass whileallowing
their
implementations
to
be deferred
to
subclasses.Application
Programming
Interface.
"An
API
consists ofthe
functions
and variablesthat
programmers are allowedto
useto
use
in
their
applications"(Flanagan,
1996).
Eight
packages of classes are provided withthe
Java
programming
language.
The
maximum rate at which a network cantransmit
data. It is
usually
givenin bits
per second(bps) (Hennessy
&
Patterson,
1996).
A
classis
adata
structurethat
is
usedto
specify
an object.A
clientis
a processthat
makes a request of a serverfor
the
use of some resource.Depending
onthe
distribution
ofresources,
a computeracting
as a clientin
the
case of one resource couldbe
a serverfor
another.Client-Server
Extend
Inheritance
A request/reply
modelfor interprocess
communications where system resources are availabledirectly
to
alimited
number of processes onthe network,
called servers.Any
other processthat
needsthe
resource can act as a clientand requestthe
use ofthe
resourcefrom
the
server.The
server willthen
usethe
resource as requested and returnthe
results as necessary.The
client and server processesmay
ormay
notbe running
onthe
same computer.Terminology
usedfor
inheritance
in Java.
Internet
A
term
usedto
describe
the
interconnection
ofthe
computernetworks of most
universities, companies,
and organizations.The Internet
allows users on remote sitesto
communicate viaemail,
USENET,
andthe
world wide web.Java
MPEG
NetscapeObject
Object Oriented
Packet
QoS
Socket
Server
"[Java
is]
asimple,
objectoriented,
distributed,
interpreted,
robust,
secure,
architectureneutral,
portable,
high
performance,
multithreaded,
anddynamic
[programming]
language"
(Flanagan,
1996).
Motion Picture Experts Group.
A
technical
committeethat
writes
for
standardsfor
video compression.Also
usedto
referto
videofiles
compressedaccording
to the
standard.A
webbrowser.
Currently
the
most popularbrowser
onthe
market.
An
objectis
adiscrete
entity
that
encapsulatesdata. Objects
arethe
basis
for
object oriented programming.An
objectis
a specificinstance
of a class.A programming
modelthat
focuses
onusing
objectsto
design.
A
collection ofdata
packedtogether
to
be
sent over a network.A
packet oftenhas headers
and errorcorrecting
information
packet with
the
data. At
the
level
ofthe
Java
programsin
this
thesis,
a packetis
anarray
of1 024
bytes.
Quality
ofService.
A
measure ofthe
performance of a multimedia application.An entity
that
is
usedfor
network communications.Sockets
provide an abstract view ofthe
networkto
higher
level
programs.
In
the
client-server model,the
serveris
the
processthat
has
access
to
some system resource.Resources
couldbe
printers,
disk
drives,
etc.The
server will accept requestsfor
the
use ofSubclass
Superclass
Throw
Throughput
trn
the
resourcefrom
a client and returnthe
results.Results
couldbe
afile
in
the
case of adisk
resource or an acknowledgmentfor
a print request.A
subclassis
a classthat
has inherited from
some superclass.The
classthe
some subclasshas inherited from.
In Java
all exceptions and errors arethrown
to the
methodthat
called
the
excepting
method.They
continueto
be
thrown
untila method
that
handles
the
exceptionis
found. Throw
is
akey
word
in Java
andis
usedto
manually
throw
an exception.Errors
are notusually
nothandled in
the
program.Instead,
anerror
is
considered non-recoverable andthe
program exits.The
amount of a network'stotal
bandwidth
that
is
availableto
an application
(Hennessy
&
Patterson,
1996).
threaded
read news.A
news readerfor USENET
onUNIX
machines.
USENET
VOD
Web Browser
A
world networkthat
provides network news.In USENET
news
is in
the
form
of articles postedby
usersinto
newsgroups.Video
onDemand. A
planto
allow customersto
requestany
video
they
desire for play
atany
time
they
desire.
A
programthat
is
usedto
download data from
the
world wideweb.
World
Wide Web
The
worldwide webis
a network ofinterconnected
serversthat
accept
data
requestsfrom
public computers.Data
is
retrieve1.0
Introduction
The
pastfew
yearshave
seen atremendous
increase
in
the
demand
for
networked applications.
Advances
in
networks and multimediatechniques
have
provided
designers
withthe
ability
to
create new classes of applicationsthat
wereunheard often years ago.
However,
there
are still problemsleft
to
be
solved.1.1 Multimedia
Over
the
pastdecade,
ascomputing
powerhas
increased,
multimediahas
become
afocus
ofthe
computing industry.
Multimedia has been defined
as acomputer
using
video, audio,
and graphicsalong
with numerical andtext
information
(Minoli
&
Keinath,
1994).
A
computer applicationdesigner
is
ableto
usevideo,
audio,
and graphicsin
the
productshe designs. This
allows programsto take
greateradvantage of
the
human
ability
to
use multiple senses at onceto
assimilateinformation.
Today,
online multimediaencyclopedias,
with video clips ofhistoric
events and with sound clips of
famous
speeches, arewidely
available.As
computerprocessing
speedsincrease
and asdata
storagedevices
become
faster,
suchapplicationswill
become
less difficult
to
implement.
One
measure ofthe
performanceMultimedia
applicationis
the
Quality
ofService
(QoS)
ofthe
presentation.Quality
ofService
is
aloosely
defined
term that
measures
exactly
whatit
says, the
quality
ofthe
multimedia playback.Quality
ofService
does
nothave
aspecificformula.
Instead,
parameters such asthroughput,
loss
rates,
anddelay
are measuredto
determine
the quality
of service(Bowman,
et.al.,
1994). The
higher
the
quality
of servicethe
better
the
multimediapresentationis going
to
appearto
the
user.On
local
applicationsrunning in local
memory
and off alocal
disk,
current processors provide aquality
of servicehigh
enoughfor
video and audioto
be
used.1.2 Networked Multimedia
Along
withthe
increase in
multimedia research and multimedia productsin
the
1990s,
there
has
alsobeen
anincrease in
networked applications.A
networkedinformation is
onethat
retrieves sometype
ofinformation from
over a network.The
information is
then
usedby
the
requesting
application.Such
applicationstypically
runas client-server applications.
One
computeris
a server andhas
the
requiredinformation
stored onits local
system.Any
other computer onthe
network can act asclient and request
that
information
from
the
server.Long
before
multimediaapplications
became
popular,
single mediatext
based
applicationsfollowed
this
model.For
example,
USENET
readers,
such astrn
(threaded
readnews,
a news readerfor
UNIX
based
machines),
retrievearticlesfrom
alocal
news server anddisplay
them
anddisplay
them
for
the
user.The
advent of multimediatechniques
has
addedto the types
of networkednow
requesting
video and audiofiles.
In
the
case oflocal
networksthis
changedoes
notpresenta
large
problem.The
growth ofthe
Internet, however,
has lead
to
large
numbers ofapplicationsthat
retrievedata from
serversthat
are notlocated
onthe
samelocal
net asthe
client.Browsers
for
the
World Wide
Web,
such asNetscapeallow usersto
download
video,
audio,
andimages
from
sites aroundthe
world.The ability
to
retrieve non-localmultimedia presents
designers
with enormous potentialfor
the
transmission
ofinformation.
There have been
proposalsfor
systemsthat
would allowfor full length
movies
to
be
accessed over a networkby
consumersin
their
homes. These
proposalsshould not
be
confused withcurrently existing
pay
per view systems.The
newsystem,
called video on
demand
(VOD),
would allowcustomersto
chooseto
watchany
moviethat
is
onthe
server atany
time.
VOD
systems are stillin
the
theory
stages and willrequire
further
researchto
makethem
feasible.
Another
type
of networked multimedia applicationthat
is receiving large
amounts of attention
is
video conferencing.Such
systems allow people attwo
or moreremote sites
to
conferusing
video and audio over a network.Such
systemsdo
existtoday
but
they
tend to
be
expensive and requirelarge
private networks(Minioli
&
Keinath,
1994).
One
ofthe
primary
problemsthat
limits
networked multimedia applicationsis
multimedia applications will
generally download
entirefiles from
serversbefore
playing
them
for
the
user.With
the
entire video or audiofile
availablein local memory
or on a
local
disk,
the
application willbe
ableto
supply
asufficiently
fast
and stabledata
rateto the
media player.While
this
method works wellfor
shortclips,
it is
not practicalfor
lengthy
sound and video
files. A
three
minute soundfile may be
two
megabytesin
size.A
video
file
ofthe
samelength
wouldbe only 30
to
60
seconds.Any
two
megabytefile
will
take
minutesto
download. To
display
afull length
motion picturein
aVOD
system, the
client would needto
waitfor hours
andhave
anunreasonably large
amountof
local data
storagecapability
available.Therefore
for
sizable multimediafiles,
the
most reasonable method
is
to
play
the
file in
real-time,that
is,
to
decompress
andplay
the
data
asthe
packets aredownloaded. This
eliminatesboth
the
long
waits andthe
need
for large
storagedevices
atthe
client.In
the
case of videoconferencing,
playbackmust
be in
real-time.It
does
not make senseto
have
a video conference wherethe
participants cannot view
the
video sentfrom
the
other conference sites untilthe
conferenceends.
The
term
real-time refersto
an actionbeing
observedin
the
real(same)
time
that
it
happens. For any
multimedia applicationthere
aretwo things that
canhappen in
real-time.
The first is
the
decompression
ofthe
data file. The
decompressing
ofthe
file
following
sections arebeing
decompressed
into
the
format
usedby
the
actualplaying
device
(the
speakerorthe
monitor).This differs from
a system wherethe
entirefile
is
decompressed
before
any
data
are sentto the
device.
Today,
most applications usereal-time
decompression
for local files.
The
second method of real-time operationis only
applicableto
networkedapplications.
In
this case,
real-time playback canbe done
whilethe
download is in
progress.
As
the
packets arrivethey
canbe decompressed
and played.This
type
ofreal-time
transmission
is
the
type
necessary
for
video ondemand
and videoconferencing
systems.The
problem with real-time playback ofarriving
multimediais
the
networkbandwidth
requirements.Video
requires1.54
millionbits
per second(Mbps)
for
successful playback.
Audio
requires aless
demanding,
but
stilldifficult
to maintain,
100
-300 Kbps. The
web
browsers
run atRIT
usually
achieve300
1000 Kbps. The
Internet
candeliver
ahigher data
rate,
but only if
the
entirebandwidth
is
availablefor
one
transmission.
The
problemdevelops
whenthe
network's entirebandwidth
is
notavailable
due
to
multipletransmissions.
As
the
number of usersrequesting
transmissions
across a networkincreases,
the
amount oftime
that the
networkcan spendservicing
eachtransmission
decreases.
If
a network can sustain a stablebit
rate of50bps,
then
if
there
is only
onetransmission
occurs, then
there
may be
aloss
ofdata
ratefrom
the
first
transmission.
The
total
bandwidth
ofthe
network remainsthe
samebut
it
mustbe
sharedby
multipletransmissions.
As
more and moretransmissions
are requested acrossthe
network, the
bandwidth
availableto
the
initial
transmission,
as well asto
any
other,
willdecrease.
What
will resultis
a networktraffic
patternthat
is bursty. A
client will receivebursts
of
data from
the
networkfollowed
by
a period of nodata
while otherusers'
traffic
is
carried over
the
network.This
bursty
traffic
candestroy
any quality
of servicein
areal-time playback.
The
userwouldhear
afew
seconds of soundfollowed
by
a periodof silence until
the
nextburst is
received.The
resultis
achoppy
playbackthat
mostusers would
find
unacceptable.1.3 The
Buffering Strategy
This
thesis
presents abuffering
strategy designed
to
counterthe
effects ofbursty
networktraffic.
Using
buffers both
atthe
server and atthe
clientincreases
the
media player's
tolerance
for
bursty
data.
First,
a multimedia program requests afile be
sent at some
data
rate.The
serverbuffer initial begins
to
buffer
somebytes
andthen
sends
them
overthe
networkto the
clientbuffer. The buffer
atthe
client sideinitially
buffers
portionofthe
file before
playbackbegins. Then
it
begins
to
sendthe
requesting
multimedia program packets at
the
requested constantrate,
refilling its buffer
as moredata bursts
arrive.The
clientbuffer
also sendsfeedback
to
the
serverbuffer
informing
rate
it
is sending data
to
the
client.This
givesthe
serverbuffer
the
ability
to
preventanoverflowofthe client
buffer. This
strategy
requiresthat the
userbe willing
to
waitfor
a short
time
before
playback.During
that
waiting
time,
the
buffers
arefilled
withenough
data
to
ensurethat
the
requireddata
rate canbe
maintainedduring
the
periodswhen
the
availablenetworkbandwidth
is low. This initial
buffering
waitdoes
resultin
a slight
decrease
in
the
real-time nature ofthe
playback.However,
for
mostapplications a short
lag
is
an acceptabletradeoff
for
a constantdata
rate.To
test the
theory
ofthe
strategy,
animplementation is
required.For
this
thesis,
an
implementation
wasdone in
the
Javaprogramming language
andtested
on anetwork ofHPworkstations.
Results indicate
that
the
strategy
allowsfor
successfulplayback of audio
files
whenthe
availablebandwidth
drops
wellbelow
that
which willbe
successful withoutthe
buffers.
1.4 The
Javalanguage
and
Object Oriented Design
The Java language
was chosenfor implementation
ofthe
buffering
strategy.This
choice was madefor
three
reasons.First,
Java is
an object orientedlanguage.
Object
orientedlanguages
arebased
onthe
object model of programming.In
that
model all
data
structures, methods, variables,
functions,
etc. are encapsulatedinto
objects.
The
objects arethen
used asthe
primary
building
blocks
ofthe
program.the
design
andimplementation
ofthe
program easierthan
if
a structurallanguage is
used.
The
secondreasonfor choosing Java is its high level
Application
Programmers
Interface
(API).
The
API
provideshigh
level
classesthat
greatly
simplify
communication
and graphical userinterface
design. These
high
level
abstractionstend
to
make programdesign
andimplementation
easier.The
existence of a socketAPI
is
the third
reasonfor choosing Java. Java
wasdesigned
to
be
a networkedlanguage. It
seemedlogical then,
that
animplementation
ofa network related
strategy
wouldbe done
using
a networkbased
language.
As
the
implementation
progressed,
it
became
apparentthat
there
were somedisadvantages
in using Java. The
sameAPI
classesthat
simplify
the
use of sockets andstreams also encapsulate all
the
details
oftheir
operation.One
ofthe
hidden
details
is
an attempt
by
Java
to
make network communications smoothby doing
its
ownbuffering,
Occasionally
this
interfered
withthe
necessary
operation ofthe
program.In
that
caseit
wouldhave helped
to
have
alower
level
networkinterface.
Another
disadvantage
ofJava
wasbugs. Java
is
avery
newlanguage
andthere
are still
bugs in
the
language itself. Sometimes
abug
in
the
current version ofthe
language
required a changein
the
design
to
compensate.This lead
to
somelimits in
the
functionality
ofthe
Java implementation. None
ofthe
limits,
however,
if very
The
other possiblechoice,
based
onknowledge
ofthe
language
and compileravailability
wasC++.
C++
was not chosenprimarily because it does
nothave
a set ofstandard classescomparable
to the
API.
1.4.1 Booch
Class
Diagrams
Booch
classdiagrams
are usedto
showthe
relationshipsbetween
classesin
asystem.
They
aredetailed
by
Grady
Booch
in Object Oriented Analysis
andDesign
(Booch,
1994). The diagrams
allowdesigners
to
showhow
the
various classesin
asystem
interact
with and relateto
each other.Each
classis
representedby
a cloud withits
name and major attributesinside. Classes
are connectedusing
varioustypes
oflines. Inheritance is indicated
by
an arrow.One
classcontaining
anotheris
shownby
aline
with a solid circle.A
line
with ahollow
circledenotes
that
one classis using
Class
A
Class
B
[
Class C
[image:24.548.93.454.79.316.2]Class D
Figure 1
-Sample Booch Class Diagram
In
this
exampleclassA
contains aninstance
of classC. This
is
signifiedby
the
solidcircleat
the
end ofthe
line
by
Class A.
Class A
also uses aninstance
of classB,
which
is
signifiedby
the
hollow
circle.Class D
inherits from
classB. This
is
signifiedby
the
arrowpointing
atClass B. It
is
possiblethat
the
actual object usedby
classA
is
of
type
classD,
but it
seesthat
object as aB.
1.5 Thesis Organization
The
restofthis
thesis
is
organized asfollows. Chapter 2
presents some worksrelated
to this thesis.
Chapter
3
details
the
buffering
strategy
greaterin
detail.
Chapter
4 discusses
the
design
andimplementation
ofthe
Java
versionof
the
strategy.Chapter
5 discusses
the
testing
ofthe
implementation
and an analysis ofits
success.Chapter 6
2.0 Related Work
There
are a number ofprojects and productsthat
are relatedto
this
thesis.
The
strategy
presentedin
this thesis
is
oneway
to
deal
with some ofthe
issues
involved
in
developing
anetworked,
real-time multimedia application.Others have
suggesteddifferent
waysto
approachthe
problem.Some
research systemshave been
published.In
addition,
there
are somereal-time,
networked multimedia products availablecommercially.
2.1 Real
AudioReal Audio is
perhapsthe
most successfulcommercial, real-time,
Internet
sound player available.
The
makers,
Progressive
Networks,
referto
Real Audio
as anAudio
onDemand
(AOD)
program.It is
the
sametheory
as proposedVOD
systems.Any
user can requestany file for
playback atany
time.
Progressive Networks
claimthat
Real Audio
can providebroadcast
quality
sound overthe
Internet
and nearCD
quality
over aISDN
line. Personal
experimentation showsthat
version2.0 does
provide sound on
demand in
real-tine;
however,
the
quality
ofthe
soundis
highly
variable.
At
times
the
player will provide ahigh
quality
AM
broadcast-like
transmission.
When
the
bandwidth
availableto the
audio streamdrops
or when packetsare
lost,
the
quality quickly
slipsto the
pointwherethe
audiois
unintelligible.Real Audio
attemptsto
counterthe
problemsinvolved in
real-time networktransmissions
in
two
ways.First,
the
player requiresthat
all soundfiles
be in
a specificReal Audio
format.
This
format
is
alossy
compression of standard .wav or .au audiofiles
(Lawrence,
1996). The
compressionreducesthe
amount ofdata
that
has
to
be
sentover
the
network.With
less
data
to
be
sent overthe
samelength
oftime
less
bandwidth
is
requiredfor
the transmission.
The
second approachReal Audio
takes
is
to
have
the
player
buffer data
packetsfor
ten
secondsbefore
beginning
to
play
the
audiofile. This
appears
to
be
similarto the
strategy
presentedin
this thesis.
It
is, however,
difficult
to
be
sureexactly how
closethe
parallelis because
specific algorithms ofReal Audio
have
notbeen disclosed.
Progressive Networks
providestheir
client audio playerfree
of charge.This
policy
allows anyone with anInternet
connectionto
download
andplay
Real Audio
files. If
one wishesto
develop
a web sitethat
containing Real Audio
files,
a servermust
be bought
from
the
company.The
serverhas
the
capability
to
send aReal Audio
data
stream overthe
Internet
for
a real-time playback.Without
the
Real Audio
server,
playbackoccurs
locally
~ afterthe
entirefile has been downloaded.
Despite
the
cost ofstarting
aReal Audio
webserver, the
format has become
very
popular.National
radionetworks,
including
ABC
andNational Public
Radio,
have
broadcast
real-timeprogramming
overthe
Internet.
ESPNET
SportsZone
thousands
of other web pagesoffering Real Audio
sound.Progressive
Networks
claimsover
10
million playershave been distributed. The recently
released version3.0
has been designed
to
substantially increase
the
quality
ofthe
audio service.It
seemsquite
likely
that this
format
ofInternet
audio ondemand
will continueto
grow andto
improve.
Although
there
aresimilarities,
Real Audio
is
notentirely
compatible withthe
strategy
presentedin
this
thesis.
One
ofthe
goals ofthe
strategy is
to
provide asolution
that
worksindependent
ofthe
application andthe
data
type.
In
contrast,
Real
Audio only
worksfor
audiofiles
encodedin
the
Real Audio
format. The
clientbuffer
in Real Audio is
a part ofthe
player whereit
is independent in
the
proposed strategy.Whether
there
is any
type
of serverbuffer is
unknown.Still,
whileReal Audio
does
not
entirely follow
the
strategy,
the
parallels suggestthat
this
thesis'strategy is
viable.2.2
University
ofOregon MPEG
Player
A group
of researchers atthe
Oregon
Graduate Institute
ofScience
andTechnology
has developed
adistributed
real-timeMPEG
video player(Cen,
Pu,
et.al.,
1995).
The
program consists of a server and a client.Each
processis located
on aseparate machine.
The
server sendsthe
videoto the
clientthrough
a network.The
client contains a
buffer,
acontroller,
aMPEG
decoder,
and a video player.It
receivesthe
data
streamfrom
the network,
decodes
the
MPEG
frames
anddisplays
the
video onthe
screen.They
alsobuilt in
the
ability
to
receive audio synchronized withthe
video.They
use abuffer
atthe
client endto
deal
withdata
ratesthat
are greaterthan the
decoder
canhandle.
Although
the
final
result ofthe
project was adistributed
real-timeMPEG
player, the
primary
focus
was softwarefeedback
in
networked applications.They
developed
a softwaretoolkit
for
use with softwarefeedback. The
toolkit
consists oflowpass,
highpass,
and otherfilters;
comparators;
and other modules.The
modules areused
to
processthe
feedback
aboutdata input
that
is
sentfrom
the
clientto the
server.The
resultis
asteady
stream ofinformation
concerning
the
data
reception patterns ofthe
client.The
toolkit
wasthen tested
by
using it
to
develop
the
MPEG
playerprograms.
The
softwarefeedback is
usedto
determine how
wellthe
clientis
handling
the
data
streamfrom
the
server.If
the
data
streamis overwhelming
the
player,
the
server
knows
to
scaleback
the
send rate.If
there
is
too
little data
being
received, the
server
increases
the
output.The buffer
stores excessdata
whenthe
rateis high
andsupplements
the
input
whenthe
rateis low
untilthe
server can respondto
the
feedback.
The
quality
ofservice measurementthey
usedto test the
functionality
ofthe
MPEG
playeris
smoothness.It
is based
onframe
rateand onthe
number(and
type)
offrames dropped
(received
but
not played).Playback
is
defined
as perfect whensmoothnessof
5 in
acongested network.Without
the
feedback
the
smoothness was25
under
the
sameconditions.At
first,
the
video player seemsvery
similarto
the
strategy
proposedin
this
thesis.
There
are,
however,
somedifferences.
Like Real
Audio,
this
playeris
a specificprogram
for
aspecifictype
of media.The buffers
andfeedback
arebuilt
into
the
serverand
the
player.The strategy
proposedhere does
not suggestthis.
Instead
it
proposesthat
the
buffers
run as separate programs.This
allowsexisting
applicationsto take
advantagesof
the
stabledata
rateoffered withoutrequiring
revision ofthe
application.The MPEG
player also places a greater emphasis onthe
feedback
aspects ofthe
system.The
buffering
strategy does
usefeedback but it is only
one part ofthe
system.
Instead,
a greater emphasis onthe
clientbuffer
is
madein
the
proposedstrategy.
3.0
The
Buffering Strategy
3.1
Computer Networks
Network
communications
are controlledby
protocols.There
are protocolsthat
define
how
packets shouldbe
formed,
that
specify
whatinformation
shouldbe in
packet
headers,
andthat
define how
to
specify
the
network address of a computer.These
protocols areusually formed
into
layers. For
example,
atthe
lowest layer
there
is
a protocoldefining
how
to
placeindividual bits
ontothe
physical medium.At
ahigher
layer,
the
bits
areformed into
packets.That
layer
makes surethat the
packetsare received
in
order.When
packetsdo
arrive out oforder, the
layer does
whateveris
necessary
to
reorderthem.
At
ahigher
level,
there
are protocolsto
determine
the
best
route
for
data
packetsto
be
sent whentraveling
from
the
sourceto the
destination.
Another
layer
presents~to
ahigher layer
~an abstraction used
to
open a connectionto
another computerandto transfer
data.
The
buffering
strategy
proposedin
this thesis
viewthe
networkfrom
ahigh
layer. This
approach allowsthe
strategy
to
concentrateonbuffering
not onmanaging
ar "\
(
r~ i
1
1
.~~
)1
i ._ 4Network
f/
\v ._ .
J
/ \
\
Client
Comput
er [image:31.548.70.475.92.286.2]File Server
Figure 2
-The Strategy's View
ofthe
Network
To
the strategy,
the
networkis
ablack box. No details
aboutthe
network areknown.
Opening
a network connection requires no morethan
asking for
a connectionto
an address.All
connections appearto
be
errorless.Packets
should not arrive out oforder nor should
any
packetsbe lost
andfail
to
arrive.At
alower
level
such assumptions would not work.They
canbe
made,
however,
if
the
black
box
network corrects all errorspassing
the
data
to
client.To do
so
is
possible.It
is
not,
however,
without consequences.Fixing
errorstakes time.
If
there
is
a needto
wait while a packetis
being
resent, then
the
client will see a networkthat
has
stalled.3.2
Bursty
Network Traffic Patterns
If
the
data
stream stalls whileit
waitsfor
the
networkto
fix
anerror, the
resultmay
be
abursty
networktraffic
pattern.A
bursty
patternis
observed whenthe
rate atwhich
data is
receivedis
not constant.Data is
receivedfor
a short amount oftime
followed
by
a period wherelittle
or nodata is
received.The
resultant pattern canbe
seen
in Figure 2.
Thn
oughput [image:32.548.83.462.191.297.2]TimeS.
Figure 3
-Sample
Bursty
Traffic Pattern
Throughput
is
the
amount ofthe
network'stotal
bandwidth
that
is
availableto
an application
(Hennessy
&
Patterson,
1996). The
periods wherethe
throughput
is
high
are thebursts. The length
ofboth
the
high
andlow
throughput
periods variesdepending
onthe
network's conditions.During
the
bursts,
the throughput
may be
equal
to
the
entirebandwidth. It
willbe high
enoughto
supply
the
application withthe
required
data
rate.Similarly,
the
stalltimes
will notnecessarily
resultin
a zerodata
rate.
The
data
rate willbe low
enough;
however,
that
whateverapplicationis receiving
the
data
will notbe
sufficiently
supplied.There
are multiple causes ofbursty
traffic.
The
time
spentcorrecting
transmission
errors was mentioned as a causebefore. A
secondis
the
amount ofthe
network
increases,
less
bandwidth is
availablefor
eachindividual
transmission.
A
second consequence of more
traffic
onthe
networkis
anincrease in
transmission
errors.
More
traffic
increases
congestion,
which willlead
to
morelost
packets andmorepackets
arriving
out of order.The increase in
errors willlead
to
morewaiting
for
data. Those
waitswillincrease
the
bursty
nature ofthe
incoming
data.
In
chapter1
,the
effect ofbursty
data
rates on applications wasdiscussed. If
data
arrivesin
abursty
patternthere
likely
willbe
times
whenthereis
nodata
availablefor
the
client.In
situations wherethe
data is
usedin
real-time,
periodswhere nodata is
available can cause severe performance
degradation. At
the
sametime,
it
is
possiblethat
during
the
bursts
moredata
will arrivethan the
client canhandle.
3.3 Buffers
3.3.1 The Client Buffer
If
real-time applications aregoing
to
be
effective,
there
mustbe
a method ofcompensating
for
bursty
networkdata.
One
possible approachis
to
buffer
the
incoming
data. Most
programsthat
receivedata
off a network usebuffers.
Buffering
the
incoming
data
preventsdata loss
when packets arrivefaster
than
they
canbe
consumed
by
the
program.During
periods ofhigh
throughput
any
excessdata is
buffered. That data
canbe
processedduring
the
low
throughput
period thateventually
follows. This
approach provides somesmoothing
ofthe
averagedata
ratebut
does
notsolve
the
problem.If
the
burst
is
too
short orthe
stall periodis
too
long,
the
buffer
willeventually
underflowand nodata
willbe
availablefor
the
applicationto
process.Aside
from
the
danger
ofunderflow,
using
abuffer
appearsto
be
a goodsolution
for
bursty
traffic.
If
nobuffer
is
usedthe
server cancertainly
senddata
atthe
rate
the
client requires.There
is
noguarantee,
however,
that the
client will receivedata
at
that
same constant rate.Indeed,
abursty
traffic
pattern makes such an eventunlikely.
With
abuffer,
evenif
the
networkdisrupts
the
data
rate,
the
buffered data
canbe
usedto
supply
the
client atthe
desired
rate.Therefore,
whenthe
buffer is
notempty
the
applicationcan proceed regardless ofthe
current arrival rate.The
bursts
will notbe
noticed and
the
application canbe
supplied atits
optimal rate.The
solutionto the
buffer
underflow problemhas
not yetbeen
mentioned.It
can
be
avoidedby initially buffering
somedata. Once
the
first
packet arrivesfrom
the
network, the
requesting
application couldbegin
to
processit. If it
waitsfor
a whileinstead,
a substantial amount ofdata
willbuild up in
the
buffer. Once
the
processing
starts,
the
buffered data
canbe
usedto
supply
the
difference
wheneverthe
arriving
ratedrops below
the
rate requiredby
the
application.When
aburst
raisesthe
arrival rateabove
the
requiredrate, the
excess received canbe
usedto
replacethe
data
that
were3.3.2
The
Server
Buffer
It
wouldbe
helpful
if
the
condition ofthe
network weredetermined
by
the
server at
the
start ofthe transmission.
The
server wouldthen
be
ableto
usethat
information
to
determine
at what rateto
senddata in
orderto
get an acceptable averagedata
rate atthe
client's end.If
the
average rateis
atleast
equalto
the
ratethe
application
is
using, then
the
clientbuffer
can stabilizethe
data
rate seenby
the
application.
However,
there
is
no guaranteethat the
network conditions will remainconstant over
time.
The
network couldbecome less
bursty,
resulting in
ahigher
average rate.
It
could alsodegrade,
causing
alower
average rateto
be
received.If
the
server continues
to
send atthe
samerate,
the
clientbuffer
will either underflow oroverflow.
Neither
conditionis desirable.
The
actual serverprogram, that
is
the
programthat
readsthe
file
and placesit
on
the
network,
does
notvary its
send rate.In
orderfor
the
server sideto
adaptto
changing
networkconditions, this
functionality
mustbe
added.This strategy
proposesthat
a secondbuffer be
added, this time
atthe
server's end ofthe
network.The
serverprogram can send packets
to the
buffer
atits fastest
possible rate.Those
packets willbe buffered in
the
serverbuffer.
Initially,
the
serverbuffer
startssending data
atthe
client's requested rate.
As
long
asthat
send rate provides a sufficient average rateto
the client,
no changes arerequired.When
network conditionschange,
the
serverbuffer
can
modify
its
send rateto
compensatefor
the
changes.If
the
clientbuffer is
emptying,
the
serverbuffer
can use some ofthe
buffered data
to
increase
the
send rate.If
the
client
buffer begins
to
fill
up, the
serverbuffer
can scaleback its
send rateto
avoidoverflowing
the
clientbuffer.
The
server shouldhave
more resources availableto
devote
to
buffering
than the
client.This
meansthat the
serverbuffer
canbe larger
than
the
clientbuffer.
Even if
that
is
true,
care mustbe
taken to
assurethat
the
serverbuffer
does
notoverflow.3.3.3 Feedback
The
two
buffer strategy
proposedthus
far
requiresthat the
serverbuffer have
knowledge
ofthe
clientbuffer's
condition.That
information is
not availableto the
server under normalcircumstances.
After
the
file is
requested, the
only
thing
a serverreceives
from
a clientis
alow level
packet acknowledgment.This strategy
proposesthat
feedback be
usedto
sendthe
requiredinformation from
the
clientto
the
server.The
clientbuffer
should sendthe
serverbuffer
feedback containing
updates onthe
current status of
the
clientbuffer. The
serverbuffer
can usethose
updatesto
determine
if
the
send rate needsto
be
changed.One
questionto
consideris
whatinformation
shouldbe
included
in
the
statusmessages.
There
are several possibilities.Whatever
information
is
chosen shouldprovide
the
serverbuffer
with as muchinformation
onthe
status ofthe
buffer
asis
possible while
sending
the
least
possible amount ofdata. The
clientbuffer
could sendwhether
the
buffer is in danger
ofunderflowing.
It
wouldnot preventoverflow unlessthe
serverbuffer knows
the
size ofthe
clientbuffer.
The
averagedelay
between
packetreception
is
anotherpossibility for
the
feedback.
The
averagedelay
wouldbe
enoughfor
the
serverbuffer
to
determine
the
clientbuffers
receive rate.It
could usethat
information
to
determine if
the
rateis
fast
enough.However
it
would not giveany
information
onthe
amount of packetsbuffered. The
elapsedtime
sincethe
last
packetarrived
is
another option.The
problem withthis
is
twofold.
First,
there
is
noinformation
onthe
condition ofthe
clientbuffer.
Second,
only sending
the
most recentgives
the
serverbuffer
nohistory.
It
cannotdetermine if
along delay
is indicative
of adegradation
ofthenetwork orjust
a onetime
glitch.It
could also send an updateevery
time
a packetis
received.This forces
the
serverbuffer
to
calculatethe
rate anddoes
not solve
any
oftheprevious problems.This strategy
suggeststhat the
clientbuffer
needsto
sendtwo
statistics, the
average rate at which
it is currently receiving data
andthepercentage ofthe
buffer
that
is
filled.
No further information is
needed.The
serverbuffer
needsto
increase
the
sendrate
if
the
current receive rateis
too
low. If
it is
too
high,
the
send rate shouldbe
decreased. The
percentage ofthe
clientbuffer
that
is currently full lets
the
serverdetermine
how
muchto
changeits
send rate.If
theclientis receiving
attoo
low
a ratebut
the
clientbuffer is 60
percentfull,
mostlikely
the
serverbuffer does
not needto
increase
the
send rate.If
the
client rateis
too
low
andthe
clientbuffer is only
two
percent
full, however,
the
server will needto
increase
the
send rateimmediately
to
avoid underflow.
3.4
Relationship
of
the
Buffers
to the
Network
Thus
far
nocommenthas been
madeconcerning
how
the
clientbuffer
andthe
server
buffer
shouldinteract
withthe network,
withthe
clientapplication,
and withthe
file
server program.It
is
possibleto
makethe
buffers
a part ofthe
client and serverprograms.
If
adesigner is
developing
acompletely
newapplication,
including
both
new server and client
programs, then
such an approach would work.Under
that
planpreexisting
applications could not usethe
buffers. A
methodthat
appliesthe
buffering
strategy
to
those
applicationsas wellis
desirable.
To do
sois
notdifficult. Each buffer has
to
be
placedin its
ownindividual
program.
Both
programs must alsoinclude
implementations
ofthe
controlling
algorithms
that
are requiredto
send andto
receivedata;
to
send or receivefeedback;
and
to
calculatethe
required send rates.Each
programshouldbe
run onthe
appropriatecomputers as
daemon
processes.Daemon
processes run on a computer at alltimes.
Once
started,
the
daemon
sleeps until another process requeststhat
it do its job. When
it is
done
doing
the
job,
the
daemon
goesback
to
sleep.This
method allowsthe
aprogram
to
alwaysbe
running
withoutusing
large
amounts ofsystem resources whenIf
a computer might act as afile
server, the
serverbuffer daemon
shouldbe
startedon
it.
If
amachine acts as aclient,
the
clientbuffer
shouldbe
running
onthat
computer.
Figure
4
showshow using
the
daemons
modify
the
networkthatwasshownpreviously in Figure
2.
&
Server
Buffer
File Server
Network
Client
Buffer
[image:39.548.76.478.198.413.2]Client Computer
Figure 4
-The Buffer
Strategy
This is
the
system asit actually
exists.The
file
serveris
notnecessary
aseparate machine
from
the
onethat
is
running
the
serverbuffer.
Similarly,
the
clientbuffer may be running
onthe
client computer.It
willdefinitely
be
running
on acomputer
that
is
onthe
samelocal
network asthe
client computer.The dashed lines
denote
the
local
natureofthebuffer
withrespectto
its
application or server.Figure 4
also showshow
the
network viewsthe
strategy.From
the
network'sview,
everything
inside
the
dashed
lines is
one single system.The
serverbuffer
is
its
access point
to the server;
therefore,
it
is
the
server.The
sameis
true
for
the
client.The
client
buffer
contactsthe
network and receivesthe
network's response.So,
to the
network, the
clientbuffer
is
the
clientcomputer.The
serverdaemon
shouldbe designed
to
accept all connectionsfrom
thenetwork.
It
should act as agateway
from
the
networkto the
actual server.This
meansthat
all server requests willautomatically
usethe
buffering
strategy.The
clientbuffer daemon
shouldbe
designed
to
maskthe
networkfrom
theapplication.
Any
processthat
contactsthe
networkto
getafile
willreally be contacting
the
clientbuffer. This
allowsthe
clientbuffer
to
work without client applications everrealizing
that
another processis working
to
stabilizethe
data
stream.Therefore,
from
the
client application's perspectivethe
systemlooks like Figure 5.
&
3
m
t/3
Network
Client Computer
[image:40.548.74.477.383.574.2]File Server
To
the
clientapplication,
the
clientbuffer is
indistinguishable
from
the
network.
To
the server, the
serverbuffer
appearsto
be
the
part ofthe
networkto
whichit
talks.
Some
consideration mustbe
madeconcerning
which computers shouldhave
daemons
running
onthem.
Most local
networkshave
onegateway
machine thatis
the
only
computerphysically
connectedto
the
outside world.That
computermay
ormay
not
be
the
file
serverfor
that
network.Regardless
of whetherit is
the
file
server,
oneserver
buffer running
onthat
computeris
sufficient.Any
non-localfile
requests willalready be going
through that
computer.Therefore,
the
serverbuffer
can receivethe
request
there
andforward it
to the
server.For
the
clientbuffer,
two
approaches are possible.The first
wouldbe
to
runone
daemon
onthe
gateway
machine.If
the
bandwidth
ofthe
local
networkis
sufficient,
using just
one process can save resources.If
not,
anindividual
clientdaemon
mustbe
run on eachlocal
network computerthat
willbe running
networkedreal-time applications.
3.5
Consequences
ofthe
Strategy
The primary
consequence ofusing
this
strategy
withreal-time,
networkedapplications
is
thewait required whilethe
clientbuffer is
pre-filled.This
waitis
going
to
affectthe
Quality
ofService
providedto the
user.Accordingly,
it
mustbe partially
under
the
control ofthe
user.Increasing
the timer
spentbuffering
before
playback,
increases
the
amountoftime that the
strategy
willbe
willbe
ableto
deliver
aconstantdata
rate regardless of network conditions.The corresponding
improvement
ofthe
quality
of serviceduring
the
playbackis partially
offsetby
the
loss
ofquality
that
is
inherent in
forcing
the
userto
waitfor
the
playbackto
start.If
the
useris
notwilling
to
wait
for
any
length
oftime the
systemwill notbe
ableto
guarantee a constant stream.This
givesthe
initial
impression
of ahigh quality
of