22
Feb 5, 2007 Feb 5, 2007 1 ECET 581/CPET/ECET 499 ECET 581/CPET/ECET 499 Mobile Computing Technologies & Mobile Computing Technologies & Apps Apps Data Dissemination and Management Data Dissemination and Management 3 of 4 3 of 4 Lecture 8 Lecture 8 Paul I-Hai Lin, Professor Paul I-Hai Lin, Professor Electrical and Computer Engineering Technology Electrical and Computer Engineering Technology Indiana University-Purdue University Fort Wayne Indiana University-Purdue University Fort Wayne

ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Embed Size (px)

DESCRIPTION

ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps. Data Dissemination and Management 3 of 4 Lecture 8 Paul I-Hai Lin, Professor Electrical and Computer Engineering Technology Indiana University-Purdue University Fort Wayne. Data Dissemination and Management - Topics. - PowerPoint PPT Presentation

Citation preview

Page 1: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 11

ECET 581/CPET/ECET 499ECET 581/CPET/ECET 499 Mobile Computing Technologies & AppsMobile Computing Technologies & Apps

Data Dissemination and Management Data Dissemination and Management 3 of 43 of 4

Lecture 8Lecture 8

Paul I-Hai Lin, Professor Paul I-Hai Lin, Professor Electrical and Computer Engineering TechnologyElectrical and Computer Engineering Technology

Indiana University-Purdue University Fort WayneIndiana University-Purdue University Fort Wayne

Page 2: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 22

Data Dissemination and Management - Data Dissemination and Management - TopicsTopics

IntroductionIntroduction ChallengesChallenges Data DisseminationData Dissemination Mobile Data CachingMobile Data Caching Mobile Cache Maintenance SchemesMobile Cache Maintenance Schemes Mobile Web CachingMobile Web Caching SummarySummary

Page 3: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 33

Data Dissemination and Management – Data Dissemination and Management – Data DisseminationData Dissemination

Email ServerWeb Server

Mobile Information Server Management Server

Streaming Media Server

Proxy Server

Database Server

E-Commerce Server

Management Server

Page 4: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 44

Data DisseminationData Dissemination Pull or On-Demand ModePull or On-Demand Mode

Request – through uplinkRequest – through uplinkReply – waiting for responseReply – waiting for responseConsume extra battery powerConsume extra battery powerCompeting bandwidth with other Mobile usersCompeting bandwidth with other Mobile users

Push or Broadcast ModePush or Broadcast ModeData server periodically broadcasts the data Data server periodically broadcasts the data Indexing information: quick check for Indexing information: quick check for

interesting or notinteresting or notIndex, Stock, Traffic, Sales; Index, Stock, Index, Stock, Traffic, Sales; Index, Stock,

Traffic, Sales; …Traffic, Sales; …Down Load interesting dataDown Load interesting data

Page 5: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 55

Data DisseminationData Dissemination Advantages of Data Dissemination – Push Advantages of Data Dissemination – Push

ModeMode Pull or On-Demand ModePull or On-Demand Mode

Send Hot Data ItemsSend Hot Data Items Conserve bandwidth – eliminates repetitive on-Conserve bandwidth – eliminates repetitive on-

demand data transfers for the same data items to demand data transfers for the same data items to different mobile usersdifferent mobile users

Conserve the mobile node’s energy – eliminating Conserve the mobile node’s energy – eliminating uplink transmission uplink transmission

Page 6: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 66

Data Dissemination – Wireless Data Dissemination – Wireless Bandwidth UtilizationBandwidth Utilization

Logical ChannelsLogical ChannelsUplink Request Channel: Data queryUplink Request Channel: Data queryOn-Demand Downlink Channel: Reply data On-Demand Downlink Channel: Reply data

itemsitemsBroadcast Downlink Channel: hot data itemsBroadcast Downlink Channel: hot data items

Physical ChannelsPhysical ChannelsOn-DemandOn-Demand

Distributed medium access channelsDistributed medium access channelsBroadcastBroadcast

Broadcast scheduleBroadcast schedule Slotted data items (pages)Slotted data items (pages)

Page 7: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 77

Data Dissemination Data Dissemination Bandwidth Allocation Bandwidth Allocation

Bandwidth AllocationBandwidth Allocation• Bandwidth for on-demand channel – BBandwidth for on-demand channel – B00

• Bandwidth for broadcast channel – BBandwidth for broadcast channel – Bbb

• Available bandwidth B = BAvailable bandwidth B = B00 + B + Bbb Data ServerData Server

• N data items: D1, D2, …, DnN data items: D1, D2, …, Dn D1 – the most popular data items, with popularity D1 – the most popular data items, with popularity

ratio P1 (between 0 and 1)ratio P1 (between 0 and 1) D2 – the next popular data item with popularity D2 – the next popular data item with popularity

ratio P2 (between 0 and 1)ratio P2 (between 0 and 1)• Size for each data item – SSize for each data item – S• Size of each data query - R Size of each data query - R

Each mobile node generates requests at an Each mobile node generates requests at an average rate of raverage rate of r

Page 8: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 88

Data Dissemination Data Dissemination Allocate All Bandwidth for On-DemandAllocate All Bandwidth for On-Demand

Compute Average Access Time T over all Compute Average Access Time T over all data itemsdata items• T = Tb + ToT = Tb + To• Tb – average access time to access a data Tb – average access time to access a data

item from the broadcast channelitem from the broadcast channel• To – average access time to access an on To – average access time to access an on

demand itemdemand item

Page 9: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 99

Data Dissemination Data Dissemination Allocate All Bandwidth for On-DemandAllocate All Bandwidth for On-Demand

The Average Time to service an on-The Average Time to service an on-demand requestdemand request• (S + R)/B(S + R)/B00

If all data items are provided only on-If all data items are provided only on-demand, the average rate for all the on-demand, the average rate for all the on-demand items will be demand items will be • M x r (queuing generation rate)M x r (queuing generation rate)• M – the number of mobile nodes in the M – the number of mobile nodes in the

wireless cellwireless cell• r –average request rate of a mobile noder –average request rate of a mobile node

Page 10: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1010

Data Dissemination Data Dissemination Allocate All Bandwidth for On-DemandAllocate All Bandwidth for On-Demand

Applying Queuing Theory to Analyze the Applying Queuing Theory to Analyze the ProblemProblem• As the number of mobile users As the number of mobile users ↑ ↑ (increases), (increases),

the average queuing generation rate (M x r) the average queuing generation rate (M x r) ↑↑ • As (M x r) As (M x r) approaches → the service rate approaches → the service rate

[B0/(S+R)], the a[B0/(S+R)], the average service time verage service time (including queuing delay) (including queuing delay) ↑ rapidly↑ rapidly

• What is acceptable server time threshold?What is acceptable server time threshold?• Allocating all the bandwidth to the on-demand Allocating all the bandwidth to the on-demand

channels → Poor Scalability channels → Poor Scalability

Page 11: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1111

Data Dissemination Data Dissemination Allocate All Bandwidth for Broadcast ChannelAllocate All Bandwidth for Broadcast Channel

If all the data items are published on the If all the data items are published on the broadcast channel with the same frequency broadcast channel with the same frequency (ignoring the popularity ratio)(ignoring the popularity ratio)

Average waiting: n/2 data itemsAverage waiting: n/2 data items Average access time for a data item:Average access time for a data item:

• (n/2) x (S/B(n/2) x (S/Bbb))

• Independent of number of mobile nodes in the cellIndependent of number of mobile nodes in the cell• Avg access time proportional to the number of data Avg access time proportional to the number of data

items nitems n• Avg. Access Time ↑ as the number of data items to Avg. Access Time ↑ as the number of data items to

broadcast ↑broadcast ↑

Page 12: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1212

Data Dissemination Data Dissemination Bandwidth Allocation – A Simple CaseBandwidth Allocation – A Simple Case

Two data items: D1 and D2Two data items: D1 and D2 P1 of D1 > P2 of D2 (D1 is more popular than P1 of D1 > P2 of D2 (D1 is more popular than

D2)D2)• Temp to broadcast D1 all the time → cause D2 Temp to broadcast D1 all the time → cause D2

access time to be infinite (D2 is never available) access time to be infinite (D2 is never available) Broadcast frequency calculationBroadcast frequency calculation

• F1 = √P1/(√P1 + √P2)F1 = √P1/(√P1 + √P2)• F2 = √P2/(√P1 + √P2)F2 = √P2/(√P1 + √P2)• An example: P1 = 0.9, P2 = 0.1An example: P1 = 0.9, P2 = 0.1

sqrt(0.9) = 0.9487, sqrt(0.1) = 0.3162sqrt(0.9) = 0.9487, sqrt(0.1) = 0.3162 F1 = 0.75F1 = 0.75 F2 = 0.25F2 = 0.25 D1 broadcast three times more than D2, even D1 D1 broadcast three times more than D2, even D1

is 3-times more popular than D2is 3-times more popular than D2

Page 13: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1313

Data Dissemination Data Dissemination Bandwidth Allocation – N Data ItemsBandwidth Allocation – N Data Items

N data items: D1, D2, …, DnN data items: D1, D2, …, Dn Popularity Ratio: P1, P2, …, PnPopularity Ratio: P1, P2, …, Pn Broadcast Frequencies: F1, F2, …, Fn, for Broadcast Frequencies: F1, F2, …, Fn, for

achieving minimum latencyachieving minimum latency• Where fi = √Pi/Q,Where fi = √Pi/Q,• Q = √P1 + √P2 + .. + √PnQ = √P1 + √P2 + .. + √Pn• Minimum latency: P1*t1 + P2*t2 +… + Pn*tnMinimum latency: P1*t1 + P2*t2 +… + Pn*tn• t1, t2, …, tn are average access latencies of t1, t2, …, tn are average access latencies of

D1, D2, …, DnD1, D2, …, Dn

Page 14: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1414

Data Dissemination Data Dissemination Algorithm by Imielinski and Viswanathan 1994Algorithm by Imielinski and Viswanathan 1994

Goal: to put as many hot items on the broadcast channel Goal: to put as many hot items on the broadcast channel as possibleas possible

Algorithm Algorithm For i = N down to 1 do:For i = N down to 1 do:BeginBegin

1. Assign D1, …, Di to the broadcast channel1. Assign D1, …, Di to the broadcast channel2. Assign Di+1, …, DN to the on-demand channel2. Assign Di+1, …, DN to the on-demand channel3. Determine the optimal value of Bb and Bo, to minimize the 3. Determine the optimal value of Bb and Bo, to minimize the access time T, as followsaccess time T, as follows

a. Compute To by modeling on-demand channel as a. Compute To by modeling on-demand channel as M/M/1 (or M/D/1) queueM/M/1 (or M/D/1) queue

b. Compute Tb by using the optimal broadcast b. Compute Tb by using the optimal broadcast frequencies F1, …, Fifrequencies F1, …, Fi

c. Compute optimal value of Bb which minimizes the c. Compute optimal value of Bb which minimizes the function T = To + Tb.function T = To + Tb.4. if T <= L then break4. if T <= L then break

End End

Page 15: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1515

Data Dissemination Data Dissemination Queuing Theory – An IntroductionQueuing Theory – An Introduction

The M/M/1 Queue (Makovian, Poisson The M/M/1 Queue (Makovian, Poisson arrival, with exponential service time)arrival, with exponential service time)• The most basic and important queuing The most basic and important queuing

model withmodel with• Poisson arrivals (random arrival with rate Poisson arrivals (random arrival with rate

λλ))• Exponential service times (with mean 1/µ, Exponential service times (with mean 1/µ,

µ is the service rate)µ is the service rate)• 1 Server1 Server• An infinite length buffer: FIFOAn infinite length buffer: FIFO

Page 16: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1616

Data Dissemination Data Dissemination Queuing Theory – An IntroductionQueuing Theory – An Introduction

The M/D/1 Queue (Makovian, Poisosn The M/D/1 Queue (Makovian, Poisosn arrival process, with a deterministic arrival process, with a deterministic service time)service time)• A single-queue single server modelA single-queue single server model• Poisson arrivals (random arrival with rate Poisson arrivals (random arrival with rate

λλ))• Constant service timesConstant service times• 1 Server with constant service time1 Server with constant service time• An infinite length buffer: FIFOAn infinite length buffer: FIFO

Page 17: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1717

Data DisseminationData Dissemination Broadcast Disk SchedulingBroadcast Disk Scheduling

The TaskThe Task• Decide which data items to publishDecide which data items to publish• Determine how often to publish a data itemDetermine how often to publish a data item

Logical View of Broadcast ChannelLogical View of Broadcast Channel• A memory disk in the air: an extension to A memory disk in the air: an extension to

the memory hierarchy of the mobile devicethe memory hierarchy of the mobile device Physical StructurePhysical Structure

• Multiple virtual disks, spinning at different Multiple virtual disks, spinning at different ratedrated

• Fastest-spinning disk: hottest data itemFastest-spinning disk: hottest data item• Next-fast disk: next hottest data itemNext-fast disk: next hottest data item

Page 18: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1818

Data DisseminationData Dissemination Broadcast Disk SchedulingBroadcast Disk Scheduling

An Example An Example (Figure 3-(Figure 3-5)5)

9 Data items: 9 Data items: • D1, D2, …, D9D1, D2, …, D9

3 Disks3 Disks• Disk 1: D1Disk 1: D1• Disk 2: D2, D3, D4, D5Disk 2: D2, D3, D4, D5• Disk 3: D6, D7, D8, D9Disk 3: D6, D7, D8, D9

Frequency of BroadcastFrequency of Broadcast• Items on Disk 1 appear Items on Disk 1 appear

4-times as frequently as 4-times as frequently as those on disk 3those on disk 3

• Items on Disk 2 appear Items on Disk 2 appear 2-times as frequently as 2-times as frequently as those on disk 3those on disk 3

Speed of SpinningSpeed of Spinning• Disk 1 – FastestDisk 1 – Fastest• Disk 2 - MiddleDisk 2 - Middle• Disk 3 - SlowestDisk 3 - Slowest

Page 19: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 1919

Data Dissemination Data Dissemination Broadcast Disk SchedulingBroadcast Disk Scheduling

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9

1 2 3 6 1 4 5 7 1 2 3 8 1 4 5 9

Data Items in decreasingOrder of popularity

Relative frequency 4 2 1

1 2 4

LCM = 4 = Max_Cunk

Num Chunks =Max_Chunks/Rel_freq(i)

Broadcast schedule

Disk 1 Disk 2 Disk 3

Figure 3.5 Example derivation of broadcast schedule for broadcast disksAdapted from the book “Fundamentals of Mobile and Pervasive Computing, 2005, by Frank

Adelstein, et. al, McGraw-Hill

Page 20: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 2020

Data Dissemination Data Dissemination Broadcast Disk SchedulingBroadcast Disk Scheduling – AAFZ Algorithm– AAFZ Algorithm

Developed by Acharaya, Alonso, Franklin, and ZodnikDeveloped by Acharaya, Alonso, Franklin, and Zodnik Scheduling of Broadcast Channel that achieves a Scheduling of Broadcast Channel that achieves a

selected relative spinning of the diskselected relative spinning of the disk InputsInputs

• Number of disksNumber of disks• The assignment of data items to the diskThe assignment of data items to the disk• Relative spinning frequencies of the disksRelative spinning frequencies of the disks

OutputOutput• Broadcast scheduleBroadcast schedule

An Example – Figure 3-5An Example – Figure 3-5• Rel_freq(disk_1) = 4Rel_freq(disk_1) = 4• Rel_freq(disk_2) = 2Rel_freq(disk_2) = 2• Rel_freq(disk_3) = 1Rel_freq(disk_3) = 1

Page 21: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 2121

Data Dissemination Data Dissemination Broadcast Disk Scheduling – AAFZ AlgorithmBroadcast Disk Scheduling – AAFZ Algorithm

1.1. Order the data items from the hottest to Order the data items from the hottest to coldestcoldest

2.2. Partition the list into multiple ranges, called Partition the list into multiple ranges, called disks. Each disk consists of data items disks. Each disk consists of data items which nearly same popularity ratio. Let the which nearly same popularity ratio. Let the number of disks chosen be num_disks.number of disks chosen be num_disks.

3.3. Choose the relative frequency of broadcast Choose the relative frequency of broadcast for each diskfor each disk

4.4. Cluster the items in each disk into smaller Cluster the items in each disk into smaller units called chunks; number_chunk(i) = units called chunks; number_chunk(i) = max_chunks/rel_freq(i), where max_chunks max_chunks/rel_freq(i), where max_chunks is the least common multiple of relative is the least common multiple of relative frequenciesfrequencies

Page 22: ECET 581/CPET/ECET 499 Mobile Computing Technologies & Apps

Feb 5, 2007Feb 5, 2007 2222

Data Dissemination Data Dissemination Broadcast Disk Scheduling – AAFZ AlgorithmBroadcast Disk Scheduling – AAFZ Algorithm

5.5. Create broadcast schedule as Create broadcast schedule as follows:follows:

a.a. For i = 0 to mark_chunks -1For i = 0 to mark_chunks -1i.i. For j = 1 to nFor j = 1 to n

1.1. K = I mod num_chunks(j)K = I mod num_chunks(j)

2.2. Broadcast chunk Cj,kBroadcast chunk Cj,k

ii.ii. End_forEnd_for

b.b. End_forEnd_for