Professional Documents
Culture Documents
66.query Planning For Continuous Aggregation
66.query Planning For Continuous Aggregation
(11)
3.3 Validating the Query Cost Model
To vaIidale lhe queiy cosl nodeI ve peifoined sinuIa-
lions ly consliucling 5O veighled aggiegalion queiies
using lhe slock dala vilh each queiy consisling of 3-7
dala ilens vilh dala veighls unifoinIy disliiluled le-
lveen 1 and 1O. Ioi each queiy lhe nunlei of iefieshes
vas counled foi vaiious incoheiency lounds such lhal
lheii noinaIized vaIues (using noinaIizalion facloi as in
Lqualion (11)) aie lelveen O.O1 and O.5. Iiguie 3(a) shovs
lhal lhe nunlei of nessages is piopoilionaI lo lhe noi-
naIized queiy sundiff as caIcuIaled using Lqualion (11) if
lheii noinaIized incoheiency lounds aie lhe sane. In lhis
case IIMCC vaIue is found lo le 95. Sini-
IaiIy, Iiguie 3 (l) shovs lhe dependence of
lhe nunlei of iefieshes on 1/C
2
lo iIIusliale
lhal lhe ieIalionship lhal hoIds lelveen
lhen foi singIe dala ilen aIso hoIds foi a
queiy vilh nuIlipIe dala ilens. We use lhis
queiy cosl nodeI foi queiy pIanning vhich
is piesenled nexl.
4 QUERY PLANNING FOR WEIGHTED
ADDITIVE AGGREGATION QUERIES
Ioi execuling an incoheiency lounded con-
Figure 3: Query cost validation with varying (a) Sumdiff (b) Incoherency bound
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
GUPTA ET AL.: QUERY PLANNING FOR CONTINUOUS QUERIES IN DYNAMIC DATA DISSEMINATION NETWORKS 7
linuous queiy, a queiy pIan is iequiied. The queiy pIan-
ning piolIen can le slaled as:
lnuts: (1) A nelvoik of dala aggiegalois in lhe foin of a
ieIalion f (A, D, C) specifying lhe N dala aggiegalois a|
A (1|N), sel D| D of dala ilens disseninaled ly lhe
dala aggiegaloi a| and incoheiency lound
kj
t vhich lhe
aggiegaloi a| can ensuie foi each dala ilen
kj
d D|.
(2) CIienl queiy q and ils incoheiency lound Cq. An addi-
live aggiegalion queiy q can le iepiesenled as
qi qi
d w ,
vheie
qi
w is lhe veighl of lhe dala ilen
qi
d foi 1inq.
Oututs: (1) q| foi1|N, i.e., sul-queiy foi each dala ag-
giegaloi a|.
(2) Cq| foi 1|N, i.e., incoheiency lounds foi aII lhe sul-
queiies.
Thus, lo gel a queiy pIan ve need lo peifoin foIIoving
lasks:
1. Dc|crnining suo-qucrics: Ioi lhe cIienl queiy q gel sul-
queiies q|s foi each dala aggiegaloi.
2. Ditiding inccncrcncq ocund: Divide lhe queiy inco-
heiency lound Cq anong sul-queiies lo gel Cq| s.
Ioi oplinaI queiy pIanning, alove lasks aie lo le pei-
foined vilh lhe foIIoving oljeclive and consliainls:
Otlmltatlon ob]ectlte: Nunlei of iefiesh nessages is
nininized. In Seclion 3, ve have pioved lhal, foi a sul-
queiy q|, lhe eslinaled nunlei of iefiesh nessages is
given ly Rq|/
2
qk
C
vheie Rq| is lhe sundiff of lhe sul-
queiy q|, Cq| is lhe incoheiency lound assigned lo il and
, lhe piopoilionaIily facloi, is lhe sane foi aII sul-
queiies of a given queiy q. Thus lolaI nunlei of iefiesh
nessages is eslinaled as:
=
=
N
k
qk
qk
q
C
R
Z
1
2
(12)
Hence Zq needs lo le nininized foi nininizing lhe
nunlei of iefieshes.
Constralnt1 q| is cxccu|ao|c a| a|: Lach DA has lhe dala
ilens iequiied lo execule lhe sul-queiy aIIocaled lo il,
i.e., foi each dala ilen
qki
d iequiied foi lhe sul-queiy q|,
qki
d D|.
Constralnt2 Qucrq inccncrcncq ocund is sa|isficd: Queiy
incoheiency shouId le Iess lhan oi equaI lo lhe queiy in-
coheiency lound. Ioi addilive aggiegalion queiies, vaIue
of lhe cIienl queiy is lhe sun of sul-queiy vaIues. As dif-
feienl sul-queiies aie disseninaled ly diffeienl dala ag-
giegalois, ve need lo ensuie lhal sun of sul-queiy inco-
heiencies is Iess lhan oi equaI lo lhe queiy incoheiency
lound. Thus,
q qk
C C (13)
Constralnt3 Suo-qucrq inccncrcncq ocund is sa|isficd: Dala
incoheiency lounds al a| (
kj
t foi
kj
d D|) shouId le such
lhal lhe sul-queiy incoheiency lound Cq| can le salisfied
al lhal DA. The lighlesl incoheiency lound Tq|, vhich lhe
dala aggiegaloi a| can salisfy foi lhe given sul-queiy q|,
can le caIcuIaled as ) (
kj
n
qi qj qi qk
d d t w T
qk
= . Ioi salis-
fying lhis ccns|rain| ve ensuie
qk qk
T C .
IoIIoving is lhe oulIine of oui appioach foi soIving
lhis consliainl oplinizalion piolIen as delaiIed in lhe
iesl of lhis seclion: In Seclion 4.1, ve piove lhal deleinin-
ing sul-queiies vhiIe nininizing Zq, as given ly Lqua-
lion (12), is NP nard. In Seclion 4.2 ve shov lhal, if lhe sel
of sul-queiies (q|) is aIieady given, sul-queiy inco-
heiency lounds Cq|s can le oplinaIIy deleinined lo
nininize Zq. As oplinaIIy dividing lhe queiy inlo sul-
queiies is NP-nard and lheie is no knovn appioxinalion
aIgoiilhn, in Seclion 4.3, ve piesenl lvo heuiislics foi
dc|crnining suo-qucrics vhiIe salisfying as nany con-
sliainls as possilIe (Ccns|rain|1 and Ccns|rain|2 lo le pie-
cise). Then ve piesenl vaiialion of lhe lvo heuiislics foi
ensuiing lhal suo-qucrq inccncrcncq ocund is sa|isficd (Ccn-
s|rain|3). In pailicuIai, lo gel a soIulion of lhe queiy pIan-
ning piolIen, lhe heuiislics piesenled in Seclion 4.3 aie
used foi dc|crnining suo-qucrics. Then, using lhe sel of
sul-queiies, lhe nelhod oulIined in Seclion 4.2 is used foi
ditiding inccncrcncq ocund.
4.1 Finding Optimal Query Plan is NP-hard
Ioi pioving lhal lhe piolIen is NP-nard, ve use ieduc-
lion fion 3-dinensionaI nalching (3DM) piolIen |15j.
'03UREOHP: Civen lhiee sels X, Y and Z, each vilh
n eIenenls, and a sel M X Y Z, does lheie exisls a
sulsel MM such lhal eveiy eIenenl of sels X, Y and Z
occui in M once and onIy once` (The caidinaIily of M
viII le n if il does exisl).
We use a decision veision of lhe queiy pIanning piolIen
lo ieduce lhe 3DM piolIen. To soIve lhe 3DM piolIen
ve ieduce il lo a SUM queiy of 3n ilens, and incoheiency
lound n, as given in Appendix C. In lhe appendix, ve
piove lhal lhe lesl queiy pIan having queiy cosl of 3n
viII consisl of n sul-queiies each vilh 3 dala ilens and
sul-queiy incoheiency lound of 1. If ve can find such an
oplinaI pIan, lhiee dala ilens fion lhe chosen dala ag-
giegalois foin a liipIel foi lhe sel M vhiIe ensuiing lhal
each and eveiy eIenenl of sels X, Y and Z occuis once
and onIy once in M. ConveiseIy, lheie can le cases vhen:
(1) The sun queiy can nol le salisfied as no conlinalion
of dala aggiegaloi can disseninale aII lhe queiy dala
ilens. In lhis case, ve can easiIy see lhal lheie can nol le
any M M such lhal aII eIenenls of X, Y and Z le in M .
(2) Cosl of seIecled oplinaI pIan is noie lhan 3n. Thal
inpIies lhal lhe pIan has al-Ieasl one dala aggiegaloi dis-
seninaling sul-queiy vilh Iess lhan 3 dala ilens (see
Appendix C). Since ve gel M using aII lhe eIenenls of
lhe seIecled dala aggiegalois (slep 5 in lhe appendix),
sone eIenenls aie iepealed in M.
In lolh of lhese cases 3DM is ansveied in negalion. Thus,
using 3DM ve have pioved lhal oplinaI pIanning piol-
Ien is NP-haid. Ioi lhe puipose of lhe nexl sul-seclion
(4.2) ve assune lhal ve have aIieady dc|crnincd suo-
qucrics vhiIe salisfying Ccns|rain|1 and ve shov lhal in-
ccncrcncq ocund ditisicn can le peifoined oplinaIIy vhiIe
salisfying Ccns|rain|2 and Ccns|rain|3.
4.2 Optimal Allocation of Query Incoherency
Bound among Sub-queries
If ve knov lhe division of lhe cIienl queiy inlo sul-
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
8 IEEE TRANSACTIONS ON JOURNAL NAME, MANUSCRIPT ID
queiies, using Lqualion (11) ve can caIcuIale sundiff vaI-
ues of aII lhe sul-queiies. Thus, ve need lo nininize Zq
given ly Lqualion (12) suljecl lo Ccns|ain|2 (qucrq incc-
ncrcncq ocund is sa|isficd) and Ccns|ain|3 (suo-qucrq incc-
ncrcncq ocund is sa|isficd). We can gel a cIose foin expies-
sion ly soIving Lqualion (12) vilh Lqualion (13) using
Lagiange MuIlipIiei schene (See Appendix D). In lhal
schene ve nininize +
= =
N
k
q qk
N
k
qk qk
C C C R
1 1
2
) ( ) / ( foi a
conslanl lo gel vaIues of
qk
C s as:
=
=
N
k
qk qk q qk
R R C C
1
3 / 1 3 / 1
) /( (14)
i.e., vilhoul lhe Ccns|ain|3, sul-queiy incoheiency
lounds shouId le aIIocaled in piopoilion lo
3 / 1
qk
R . In Sec-
lion 4.3, ve use lhis expiession lo deveIop heuiislics foi
oplinaIIy dividing lhe cIienl queiy inlo sul-queiies. If ve
aIso considei Ccns|ain|3 lhen, ve can nodeI lhe piolIen
of nininizalion of Zq (vhiIe salisfying Ccns|ain|2 and
Ccns|ain|3) as a (non-Iineai) convex oplinizalion piol-
Ien. The non-Iineai convex oplinizalion piolIen can le
soIved using vaiious convex oplinizalion lechniques
avaiIalIe in lhe Iileialuie such as giadienl descenl
nelhod, laiiiei nelhod elc. We used giadienl descenl
nelhod (fninccn funclion in MATLA) lo soIve lhis non-
Iineai oplinizalion piolIen lo gel lhe vaIues of individ-
uaI sul-queiy incoheiency lounds foi a given sel of sul-
queiies. In lhe nexl sul-seclion ve desciile lvo gieedy
heuiislics lo dc|crninc suo-qucrics vhiIe using lhe foinuIa-
lions deveIoped in lhis seclion.
4.3 Greedy Heuristics for Deriving the Sub-queries
Iiguie 4 gives lhe oulIine of gieedy aIgoiilhn foi deiiv-
ing sul-queiies. Iiisl, ve gel a sel of naxina| sul-queiies
(Mq) coiiesponding lo aII lhe dala aggiegalois in lhe nel-
voik. The naxina| sul-queiy foi a dala aggiegaloi is de-
fined as lhe Iaigesl pail of lhe queiy vhich can le dis-
seninaled ly lhe DA (i.e., lhe naxinaI sul-queiy has aII
lhe queiy dala ilens vhich lhe DA can disseninale). Ioi
exanpIe, considei a cIienl queiy 5Od1 +2OOd2+15Od3. Ioi
lhe dala aggiegalois a1 and a2 given in |xanp|c 1, lhe
naxinaI sul-queiy foi a1 viII le n1=5Od1 +15Od3, vheieas
foi a2 il viII le n2=5Od1 + 2OOd2. Ioi lhe given cIienl queiy
(q) and ieIalion consisling of dala aggiegalois, dala-ilens,
and dala incoheiency lounds (f(A, D, C)) naxinaI sul-
queiies can le ollained foi each dala aggiegaloi ly foin-
ing sul-queiy invoIving aII dala ilens in lhe inleiseclion
of queiy dala ilens and lhose leing disseninaled ly lhe
DA. This opeialion can le peifoined in O([q[.nax[D|[)
vheie [q[ is nunlei of dala ilens in lhe queiy, nax[D|[
is lhe naxinun nunlei of dala ilens disseninaled ly
any DA. Ioi each sul-queiy n Mq, ils sundiff Rn can le
caIcuIaled using Lqualion (11). Diffeienl ciileiia () can
le used lo seIecl a sul-queiy in each ileialion of vaiious
gieedy heuiislics. AII dala ilens coveied ly lhe seIecled
sul-queiy aie ienoved fion aII lhe ienaining sul-
queiies in Mq lefoie peifoining lhe nexl ileialion. Il
shouId le noled lhal sul-queiies foi DAs can le nuII.
Nov ve desciile lvo ciileiia () foi lhe gieedy heu-
iislics, 1) nin-ccs|: eslinale of queiy execulion cosl is
nininized, and 2) nax-gain: eslinaled gain due lo execul-
ing lhe queiy using sul-queiies is naxinized.
4.3.1 Minimum Cost Heuristic
As ve need lo nininize lhe queiy cosl, a sul-queiy vilh
nininun ccs| pcr da|a i|cn can le chosen in each ileialion
of lhe aIgoiilhn given ly Iiguie 4, i.e., ciileiion
nininize (Rn/Cn
2
[n[). ul fion Lqualion (14) ve can see
lhal lhe sul-queiy incoheiency lounds shouId le aIIo-
caled in piopoilion lo
3 / 1
k
R . Using Lqualions (12) and (14)
ve gel:
=
=
N
k
qk
q
q
R
C
Z
1
3 / 1
3 / 2
3 / 1
1
(15)
Iion Lqualion (15), il is cIeai lhal foi nininizing lhe
queiy execulion cosl ve shouId seIecl lhe sel of sul-
queiies so lhal
3 / 1
qk
R is nininized. We can do lhal ly
using ciileiion nininizc (
3 / 1
m
R /[n[) in lhe gieedy aIgo-
iilhn. Once ve gel lhe oplinaI sel of sul-queiies ve can
use Lqualion (15) and Ccns|rain|3 (
qk qk
T C ) lo oplinaIIy
aIIocale lhe queiy incoheiency lound anong lhen using
any of lhe convex oplinizalion lechniques as discussed in
Seclion 4.2. ul lhis nelhod of fiisl deiiving sul-queiies
and lhen aIIocaling lhe incoheiency lounds has a piol-
Ien vhich is desciiled nexl.
4.3.2 Satisfiability of sub-query incoherency bound
In lhe soIulion desciiled in lhe pievious seclion, ve seIecl
lhe sel of sul-queiies (and coiiesponding DAs) and lhen
aIIocale lhe incoheiency lound anong lhen using a con-
vex oplinizalion lechnique. ul lhe piolIen of inco-
heiency lound aIIocalion anong chosen DAs nay nol
have any feasilIe soIulion. Theie nay le silualions
vheie, aIlhough lhe given nelvoik of dala aggiegalois is
alIe lo salisfy lhe queiy coheiency iequiienenls lul once
lhe sel of sul-queiies is seIecled lhe incoheiency lound
aIIocalion is nol possilIe. Such a silualion can le iIIus-
lialed vilh lhe heIp of lhe nelvoik of dala aggiegalois
consisling of lvo DAs a1 and a2 as given in |xanp|c 1.
Considei a cIienl queiy Q=5Od1 + 2OOd2 + 15Od3 vilh an
incoheiency lound of 8O. As discussed in Seclion 1, lheie
aie (al-Ieasl) lvo possilIe queiy pIans (P|an1 and P|an2)
lo ansvei lhis queiy. As suggesled in lhe pievious sul-
seclion, ve seIecl sul-queiies having nininun
3 / 1
qk
R ,
lhus lased on dala dynanics il is possilIe lhal ve seIecl
rcsu|| ,
uni|c Mq
cnccsc a suo-qucrq ni Mq ui|n cri|cricn ,
rcsu|| rcsu|| ni, Mq Mq -; ni ),
fcr cacn da|a i|cn d ni
fcr cacn nj Mq
nj nj -;d),
if nj = Mq Mq -; nj ),
c|sc ca|cu|a|c sundiff fcr ncdificd nj,
rc|urn rcsu||
Figure 4: Greedy algorithm for query plan selection
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
GUPTA ET AL.: QUERY PLANNING FOR CONTINUOUS QUERIES IN DYNAMIC DATA DISSEMINATION NETWORKS 9
p|an2 as lhe oplinaI pIan. ul fion lhe specificalion of
aggiegalois a1 and a2 in |xanp|c1, ve see lhal il is nol
possilIe foi p|an2 lo salisfy lhe cIienl specified inco-
heiency lound as lighlesl incoheiency lound lhal can le
salisfied ly lhe seIecled aggiegalois (Tp|an2=5O*1 +2OO*O.1
+15O*O.2 =1OO) is giealei lhan lhe queiy incoheiency
lound (=8O). Thus aIlhough lheie exisls a pIan (Tp|an1=
5O*O.5+ 2OO*O.1+ 15O*O.2=75) vhich can salisfy lhe cIienl
queiy incoheiency lound, vhiIe nininizing lhe queiy
execulion cosl lhe alove nelhod cannol ensuie lhal such
a pIan viII le seIecled. Whal ve need is a conpionise
lelveen queiy salisfialiIily and peifoinance. Inslead of
seIecling lhe sul-queiies vilhoul consideiing lhe dala
incoheiency lounds foi lhe seIecled dala aggiegalois, ve
seIecl sul-queiies using ) (
3 / 1
3 / 1
m q
m
m
R C
T
R
+ as cxpandcd co-
jcc|itc func|icn. The second lein ensuies lhal vhiIe seIecl-
ing lhe oplinaI pIan ve prcfcr dala aggiegalois having
lighlei dala incoheiency lounds (Iovei vaIues of Tn) lhus
highei chances of salisfying lhe queiy. The luning pa-
ianelei () can le used lo laIance lhe oljeclives of nini-
nizing queiy execulion cosl lhiough sul-queiy seIeclion
and neeling lhe queiy coheiency iequiienenls. We
use
3 / 1
/
m q m
R C T in lhe second lein as, accoiding lo Lqua-
lion (14), oplinaI incoheiency lound aIIocalion is IikeIy
lo le done piopoilionaI lo
3 / 1
m q
R C . In Seclion 5.2, ve
neasuie lhe effecls of lhe luning paianelei on lhe
queiy salisfialiIily.
4.3.3 Maximum Gain Heuristic
Nov ve piesenl an aIgoiilhn vhich inslead of nini-
nizing lhe eslinaled queiy execulion cosl naxinizes lhe
eslinaled gains of execuling lhe cIienl queiy using sul-
queiies. In lhis aIgoiilhn, foi each sul-queiy, ve caIcu-
Iale lhe rc|a|itc gain of execuling il ly finding lhe sundiff
diffeience lelveen cases vhen each dala ilen is ollained
sepaialeIy and vhen aII lhe dala ilens aie aggiegaled as
a singIe sul-queiy (i.e., naxinaI sul-queiy). Thus, lhe
ieIalive gain foi a sul-queiy
i i
d w can le viillen as:
1
2 2
=
i j i
j i j i ij i i
i
i i
m
R R w w R w
R w
G
(16)
vheie Ri is sundiff of lhe dala ilen di. This aIgoiilhn can
le inpIenenled ly using ciileiion naxinizc (Gn/[n[)
lo gel lhe sel of sul-queiies and coiiesponding DAs.
Then ve use lhe convex oplinizalion nelhod oulIined in
Seclion 4.2 lo aIIocale incoheiency lounds anong sul-
queiies. To lackIe lhe queiy salisfialiIily issue lhe queiy
gain Lqualion (16) is nodified lo:
3 / 1
'
) (
m q
i
i i
m m
R C
T w
G G
(17)
vheie Ti is lighlesl incoheiency lound lhal can le salis-
fied foi lhe dala ilen di and Rn is lhe sul-queiy sundiff.
Reasons foi seIecling lhe pailicuIai cx|cndcd cojcc|itc func-
|icn aie sane as ones oulIined foi lhe nin-ccs| heuiislic.
To sunnaiize, foi a given cIienl queiy and a nelvoik
of dala aggiegalois, fiisl ve gel lhe naxinaI sul-queiies
foi aII dala aggiegalois. We use heuiislics desciiled in
lhis seclion lo deiive sul-queiies. In lhese heuiislics ex-
lended oljeclive funclions aie used lo have lhe desiied
IeveI of queiy salisfialiIily. Then, lhe lechnique expIained
in Seclion 4.2 is used lo aIIocale lhe queiy incoheiency
lound anong lhe deiived sul-queiies.
5 PERFORMANCE EVALUATION
Ioi peifoinance evaIualion ve sinuIaled a nelvoik of
dala aggiegalois of 2OO slock dala ilens ovei 1OO aggie-
galoi nodes such lhal each aggiegaloi can disseninale
conlinalions of 25 lo 5O dala ilens. Dala ilens veie as-
signed lo diffeienl aggiegalois using zipf disliilulion
(s|cu=1.O) assuning lhal sone popuIai dala ilens viII le
disseninaled ly noie DAs. Dala incoheiency lounds,
foi vaiious aggiegaloi dala ilens, veie chosen unifoinIy
lelveen $O.OO5 and O.O2. We ciealed 5OO poilfoIio queiies
such lhal each queiy has 1O lo 25 iandonIy (using zipf
disliilulion vilh lhe sane defauIl s|cu) seIecled dala
ilens vilh veighls vaiying lelveen 2 and 1O. These que-
iies veie execuled vilh incoheiency lounds lelveen 1.O
and 3.O (i.e., O.O2-O.O7 of lhe queiy vaIue). AIlhough
heie ve piesenl iesuIls foi slock liaces (nan-nade dala),
siniIai iesuIls veie ollained foi sensoi liaces (naluiaI
dala) as veII |8j. In lhe fiisl sel of expeiinenls, ve kepl
dala incoheiency lounds al lhe dala aggiegalois veiy Iov
so lhal queiy salisfialiIily can le ensuied vhiIe keeping
defauIl vaIue of as O.
5.1 Comparison of Algorithms
Ioi conpaiison vilh oui aIgoiilhns, piesenled in lhe
pievious seclion, ve considei vaiious olhei queiy pIan
oplions. Lach queiy can le execuled ly disseninaling
individuaI dala ilens oi ly gelling sul-queiy vaIues fion
DAs. Sel of sul-queiies can le seIecled using sundiff
lased appioaches oi any olhei iandon seIeclion. Sul-
queiy (oi dala) incoheiency lound can eilhei le pie-
decided oi oplinaIIy aIIocaled. Vaiious conlinalions of
lhese dinensions aie coveied in lhe foIIoving aIgoiilhns:
1. Nn sub-qucry, cqua! Incnhcrcncy bnund (QDwYH): In
lhis aIgoiilhn, lhe cIienl queiy is execuled vilh each dala
ilen leing disseninaled lo lhe cIienl independenl of
olhei dala ilens in lhe queiy. Incoheiency lound is di-
vided equaIIy anong lhe dala ilens. This aIgoiilhn acls
as a laseIine aIgoiilhn.
2. Nn sub-qucry, nptIma! Incnhcrcncy bnund (RSWF):
In lhis aIgoiilhn aIso dala ilens aie disseninaled inde-
pendenlIy lul incoheiency lound is divided anong dala
ilens (using Lqualion (14)) so lhal lolaI nunlei of ie-
fieshes can le nininized..
3. Randnm sub-qucry sc!cctInn (UDQGRP): In lhis case,
sul-queiies aie ollained ly iandonIy seIecling a DA in
lhe each ileialion of lhe gieedy aIgoiilhn (Iiguie 4). This
aIgoiilhn is designed lo see hov lhe iandon seIeclion
voiks in conpaiison lo lhe sundiff lased aIgoiilhns.
4. 5ub-qucry sc!cctInn whI!c mInImIzIng VXPGLII
(PLQFRVW): This aIgoiilhn is desciiled in Seclion 4.3.1.
5. 5ub-qucry sc!cctInn whI!c maxImIzIng gaIn (PD[
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
10 IEEE TRANSACTIONS ON JOURNAL NAME, MANUSCRIPT ID
JDLQ: This aIgoiilhn is desciiled in Seclion 4.3.3.
Iiguie 5 shovs aveiage nunlei of iefieshes iequiied
foi queiy incoheiency lounds of $1-$3. The nave aIgo-
iilhn iequiies noie lhan five lines lhe nunlei of nes-
sages conpaied lo PLQFRVW and PD[JDLQ aIgoiilhns. Ioi
incoheiency lound of $3, each queiy, on aveiage, ie-
quiies 3311 nessages if il is execuled jusl ly oplinizing
incoheiency lound (RSWF) conpaied lo 487 vhen ve seIecl
lhe queiy pIan using lhe PD[JDLQ aIgoiilhn. The gains of
oui aIgoiilhns inciease fuilhei as nunlei of dala ilens
disseninaled ly dala aggiegalois inciease (nave iequiies
noie lhan 1O lines lhe nessages vhen each dala aggie-
gale disseninales 5O dala ilens). This happens as, vilh
noie dala ilens pei DA, sul-queiy lased aIgoiilhns ie-
suIl in Iaigei sul-queiies and ve seIecl sul-queiies inleI-
IigenlIy.
In lhe alove expeiinenl, foi ciealing queiies ve se-
Iecled lhe queiy dala ilens vilh lhe sane ]LSI disliilulion
(VNHZ=1.O) as ve used foi seIecling dala ilens lo le seived
ly DAs. ul if ve ieduce lhe skev (i.e., having queiies
vilh Iess popuIai dala ilens), ve found lhal lhe peifoin-
ance of sul-queiy lased aIgoiilhns suffei. This happens
lecause foi lellei peifoinance, sul-queiy lased aIgo-
iilhns depend on queiy dala ilens leing disseninaled
ly lhe sane DAs. Ioi queiies vilh Iess popuIai dala
ilens piolaliIily of lhis happening is Iess, hence, lhe infe-
iioi peifoinance.
Iuilhei, aIlhough lhe oplinizalion piolIen is siniIai
lo lhe coveiing a sel of dala ilens (queiy) using ils sul-
sels (sul-queiies) foi vhich lhe gieedyPLQFRVW aIgoiilhn
is consideied lo le nosl efficienl |28j, ve see lhal PD[
JDLQ aIgoiilhn iequiies 2O-25 Iess nessages conpaied
lo lhe PLQFRVW appioach. Reasons foi PD[JDLQ aIgoiilhn
peifoining lellei lhan olhei aIgoiilhns aie expIoied in
lhe nexl sel of expeiinenls.
5.2 Effects of Algorithmic Parameters
This sel of expeiinenls vas peifoined lo gel an insighl
inlo vaiious chaiacleiislics of oui sul-queiy seIeclion
nelhod vhich Iead il lo peifoin lellei conpaied lo olhei
oplions. We considei effecls of lhiee paianeleis on lhe
queiy peifoinance: dala dynanics, coiieIalion lelveen
dala dynanics and queiy salisfialiIily paianelei.
5.2.1 Effect of data dynamics
In lhis sel of expeiinenls, ve vanled lo see vhelhei lheie
is any definile ieIalionship lelveen dala dynanics and
lhe size of lhe sul-queiy in vhich lhal dala ilen appeais.
In lhis expeiinenl vilh 1O dala ilens, 45 DAs veie sinu-
Ialed such lhal each DA can disseninale a diffeienl sel of
2 dala ilens. Then 1OO queiies veie ciealed each vilh 3
iandonIy chosen dala ilens. In lhe oplinaI queiy pIan,
each queiy viII le execuled vilh lvo sul-queiies: one
consisling of 2 dala ilens and anolhei vilh singIe dala
ilen (pIan vilh lhiee one ilen sul-queiies viII le liivi-
aIIy inefficienl). As lhe queiy has onIy 3 dala ilens, onIy 3
such queiy pIans aie possilIe. We sinuIaled aII lhese op-
lions lo gel lhe lesl queiy pIan. Ioi lhese oplinaI queiy
pIans, Iiguie 6 (a) shovs vaiialion of aveiage sul-queiy
size in vhich a pailicuIai dala ilen appeais veisus VXP
GLII vaIue of lhe dala ilen. We can see lhal if a dala ilen is
noie dynanic, in lhe oplinaI pIan, il is noie IikeIy lo le
pail of Iaigei sul-queiy. This is an inpoilanl olseivalion
as il indicales lhal foi efficienl queiy evaIualion noie
dynanic dala ilens shouId le pail of a Iaigei sul-queiy.
This phenonenon can le expIained ly lhe facl lhal ly
execuling a queiy as a conlinalion of sul-queiies viII
aIvays le noie efficienl conpaied lo gelling lhe dala
ilens independenlIy. y conlining noie dynanic dala
ilens ve aie IikeIy lo gain noie. Ioi conpaiison ve aIso
shov lhe cuive foi lhe sul-queiy seIeclion lased on PD[
JDLQ aIgoiilhn. Il can le seen lhal ly using PD[JDLQ aIgo-
iilhn ve achieve oui oljeclive of incIuding noie dy-
nanic dala ilens as pail of Iaigei sul-queiies. In con-
paiison, foi lhe PLQFRVW aIgoiilhn nosl dynanic dala
ilen is noie IikeIy lo le disseninaled as singIe ilen
queiy. This happens lecause lhe VXPGLII vaIue of a noie
dynanic dala ilen viII le high lhus in each ileialion of
lhe gieedy aIgoiilhn (Iiguie 4), lheie is Iess chance of
seIecling a sul-queiy vilh noie dynanic dala ilen.
Thus, il is veiy IikeIy lhal lhe nosl dynanic dala ilen
viII le disseninaled as a singIe ilen sul-queiy iesuIling
in lad peifoinance of lhe cIienl queiy. Ioi lhe PD[JDLQ
and PLQFRVW aIgoiilhns, siniIai iesuIls veie ollained foi
Iaigei queiy sizes as veII as shovn in Iiguie 6(l). Ioi
geneialing iesuIls of Iiguie 6(l) ve sinuIaled 1OO dala
aggiegalois, each disseninaling 3 dala ilens, vhiIe each
queiy had 5 dala ilens.
5.2.2 Effect of correlation between data dynamics
To neasuie lhe effecls of coiieIalion lelveen dala dy-
nanics (as neasuied using FRUUHODWLRQ PHDVXUH) on lhe
queiy peifoinance, ve conpaied lhe queiy peifoinance
vilh lhe case vhen aII lhe dala ilens aie assuned lo le
Figure 5: Performance evaluation of algorithms
(a) Query size=3 (b) Query size=5
Figure 6: Effect of data sumdiff on sub-query size
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
GUPTA ET AL.: QUERY PLANNING FOR CONTINUOUS QUERIES IN DYNAMIC DATA DISSEMINATION NETWORKS 11
independenl (i.e., = O). Ioi peifoining lhese expeii-
nenls ve consliucled 1O synlhelic dala liaces (each vilh
VXPGLII=1) so lhal vaIues of foi vaiious dala ilen paiis
veie disliiluled unifoinIy lelveen -1 and +1. Then 45
DAs veie sinuIaled so lhal each DA can disseninale 2
dala ilens. 1OO queiies veie geneialed, each vilh 4 dala
ilens. In lhis case, each queiy viII gel execuled vilh 2
sul-queiies of 2 dala ilens each. Conlinalion of sul-
queiies viII le decided lased on coiieIalion lelveen dala
ilens (VXPGLII vaIues of aII lhe dala ilens veie lhe sane).
We found lhal ly consideiing coiieIalion neasuie nun-
lei of iefieshes ieduce ly appioxinaleIy 1O-12. This
iesuIl indicales lhal foi oplinaI queiy pIanning dala dy-
nanics and incoheiency lound aIIocalion nay le noie
inpoilanl facloi lhan lhe FRUUHODWLRQPHDVXUH.
5.2.3 Effect of query satisfiability parameter
To sinuIale lhe silualion vheie seIecled aggiegalois nay
nol le alIe lo salisfy lhe queiy incoheiency lounds, ve
nodified lhe sinuIalion sel up used in Seclion 5.1 lo sel
lhe nininun dala incoheiency lounds vhich DAs can
salisfy lo le lelveen .O1 and O.O4. VaIue of vas vaiied
lelveen O and 2O. The case =O coiiesponds lo lhe aIgo-
iilhn vilhoul deaIing vilh lhe queiy salisfialiIily. Iiguie
7 shovs nunlei of unansveialIe queiies as lhe vaIue of
is vaiied. As shovn in lhe figuie as lhe vaIue of is
incieased, peicenlage of lhe unsalisfied queiies decieases
foi vaiious vaIues of queiy incoheiency lounds. Due lo
changed dala incoheiency lounds of DAs, ve found lhal
2O of queiies can nol le salisfied even ly lhe dala ag-
giegalois vilh lighlesl dala incoheiency lounds. Al lhe
queiy incoheiency lound of $2, 4O queiies can nol le
salisfied ly lhe oplinaIIy seIecled dala aggiegalois lul as
ve inciease lhe vaIue of lo 1O, onIy 2 queiies aie un-
ansveied.
The vaIue of can le chosen lo laIance lhe peifoin-
ance and salisfialiIily of queiies. Ioi exanpIe, a nelvoik
of dala aggiegalois nay ain al queiy salisfialiIily of 95
foi a given disliilulion of queiy incoheiency lounds. If al
any line queiy salisfialiIily is leIov lhe laigel, vaIue of
can le incieased vheieas in case of ovei achieving lhe
laigel, lhe vaIue of can le decieased lo inpiove lhe
queiy peifoinance.
5.3 Overheads of Query Planning
Nov ve iepoil lhe line oveiheads foi vaiious queiy
pIanning opeialions. We neasuied lhese cosls ly vaiying
lhe nunlei of dala ilens leing disseninaled ly lhe nel-
voik, lelveen 4O and 2OO. These expeiinenls veie done
on a WindovsXI nachine vilh 2.53 CHz InleI Coie-Duo
CIU and 3C RAM. Ioi vaiious VXPGLII lased aIgo-
iilhns, ve need lo nainlain lhe VXPGLII vaIues of vaiious
dala ilens (piopoilionaI lo lhe nunlei of dala ilens le-
ing disseninaled) and lhe coiieIalion neasuie foi each
paii of dala ilens (piopoilionaI lo lhe squaie of lhe nun-
lei of dala ilens), in addilion lo lhe queiy dependenl
pIanning cosl. Ioi a liace size of 1OOOO (foi each dala
ilen) lolh -- lhe cosl of nainlaining VXPGLII pei dala ilen
and lhe cosl of nainlaining FRUUHODWLRQ PHDVXUH foi each
paii of dala ilens -- veie found lo le in lhe iange of 5O-7O
nicioseconds. Queiy pIanning cosl (line iequiied lo de-
iive sul-queiies and lheii associaled incoheiency lounds)
foi QDwYH and RSWF aIgoiilhn vas found lo le appioxi-
naleIy 1 niciosecond pei queiy vheieas lhe sane foi lhe
UDQGRP, PLQ&RVW and PD[*DLQ aIgoiilhns vas found lo le
2.5, 2.2 and 1.7 niIIiseconds. Highei cosl of queiy pIan-
ning, foi WKH VXPGLII lased aIgoiilhns, is juslified ly lhe
savings ve achieve in leins of nunlei of nessages foi
lhe vhoIe duialion of lhe conlinuous queiy. The queiy
pIanning cosl of UDQGRP and PLQFRVW is highei as lhey ie-
quiie noie ileialions of lhe aIgoiilhn in Iiguie 4 (i.e.,
noie sul-queiies) conpaied lo lhe PD[*DLQ aIgoiilhn.
6 QUERY PLANNING FOR MAX QUERIES
In lhis seclion ve liiefIy desciile lhe oplinaI queiy
pIanning foi MAX queiies. MIN queiies can le handIed in
lhe siniIai nannei. A MAX queiy, vheie a cIienl vanls
lhe naxinun of a specified sel of dala ilen vaIues, can
le viillen as:
) 1 ), ( max( ) (
q qi q
n i t v t V = (18)
Ioi MAX queiies, ieIalionship lelveen lhe queiy inco-
heiency lound and iequiied dala incoheiency lounds is
discussed in lhe Iileialuie |11,24j. Accoiding lo one such
foinuIalion, if lhe nelvoik of aggiegalois can ensuie lhal
lhe L
WK
dala ilen has incoheiency lound &L lhen lhe foI-
Ioving condilion ensuies lhal lhe queiy incoheiency
lound &T
is salisfied:
q q i
n i i C C 1 , , (19)
In lhese queiies even if vaIues of one oi noie dala ilen
change (changing lheii individuaI incoheiencies) il is pos-
silIe lhal queiy incoheiency ienains unchanged. Thus,
foi a given MAX queiy, il is possilIe lo have an individuaI
(a) Comparison of algorithm (b) Effect of data dynamics order on performance
Figure 7: Effect of on query satisfiability Figure 8: Performance of MAX queries
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
12 IEEE TRANSACTIONS ON JOURNAL NAME, MANUSCRIPT ID
dala (oi sul-queiy) incoheiency lound vhich is noie
lhan lhe queiy incoheiency lound. ul such an inco-
heiency lound viII depend on inslanlaneous vaIues of
dala ilens lhus changing veiy dynanicaIIy. In lhis papei
ve do nol considei such dala vaIue dependenl inco-
heiency lounds.
6.1 Query Cost Model
Lel us considei a queiy 4= MAX ($, %), vhich is used foi
disseninaling PD[ of dala ilens $ and % fion a dala ag-
giegaloi. Lel lhe VXPGLII vaIues of $ and % is 5D and 5E
iespecliveIy. Ioi a MAX queiy, lhe queiy iesuIl is lhe
naxinun of dala ilen vaIues. Thus lhe queiy dynanics
is decided as pei lhe dynanics of lhe dala ilen vilh lhe
naxinun vaIue. Hence, lhe queiy VXPGLII is nolhing lul
veighled aveiage of dala VXPGLIIV, veighled ly fiaclion of
line vhen lhe pailicuIai dala ilen is PD[LPXP:
>
= =
q q
n
i
n
i j j
q i j i i q
n i R x x p R R
1 , 1
) 1 | max( )) ( ( (2O)
vheie S([L > [M) is lhe piolaliIily lhal vaIue of L
lh
dala ilen
is noie lhan vaIue of M
lh
dala ilen. We have lhe vaIues of
dala ilen VXPGLIIV lul foi gelling lhe piolaliIilies ve
need lo have exacl vaIues of dala ilens. As queiy pIan
dependenl on individuaI dala vaIues (inslead of dala dy-
nanics) viII le loo voIaliIe, as a fiisl appioxinalion ve
use uppei lound of lhe expiession given ly Lqualion (2O)
as queiy VXPGLII. Appioxinalion used is lhe naxinun of
VXPGLIIs of dala ilens invoIved. Nov ve considei lhe op-
linized execulion of MAX queiies using lhe alove nen-
lioned queiy cosl nodeI.
6.2 Optimized Execution
To execule lhe MAX queiy using a nelvoik of dala aggie-
galois, ve assign sul-queiies lo diffeienl DAs. Lach sul-
queiy is a MAX queiy ovei a sul-sel of queiy dala ilens.
Ioi oplinaI pIanning ve need lo nininize lhe sun of
sul-queiy execulion cosls. As ve assign sane inco-
heiency lound lo aII lhe sul-queiies (equaIs lo lhe queiy
incoheiency lound as pei Lqualion (19)), ve jusl need lo
nininize sun of sul-queiy VXPGLII vaIues.
6.2.1 Optimal query planning problem is NP-hard
OplinaI queiy pIanning piolIen foi MAX queiies is 13
KDUG. This can le pioved ly napping lhe sel covei piol-
Ien lo lhis oplinaI queiy pIanning piolIen.
6HW FRYHU SUREOHP: Civen a univeise 8 and a faniIy 6 of
sulsels of 8, a covei is a sulsel (&RYHU6) of sels vhose
union is 8. In lhe sel coveiing oplinizalion piolIen lhe
lask is lo find a sel coveiing vhich uses lhe fevesl sels.
We can nap lhe sel covei piolIen lo oui queiy
pIanning piolIen. The MAX queiy, coiiesponding lo lhe
sel covei piolIen, viII le PD[ of aII lhe ilens in lhe uni-
veise 8 al an incoheiency lound 1. Ioi each sel V 6 ve
assune lhe exislence of a DA disseninaling aII lhe eIe-
nenls of V al an incoheiency lound of 1. Iuilhei, Iel aII
dala ilens have VXPGLII vaIue of 1. Iion Lqualion (2O), ve
can see lhal cosl of any sul-queiy viII le 1. Thus cosl of
lhe cIienl queiy, vhich is sun of cosl of ils sul-queiies,
viII le sane as lhe nunlei of sul-sels iequiied lo gel lhe
sel covei. Il is easy lo see lhal if ve can soIve lhe queiy
pIanning piolIen oplinaIIy ve can aIso soIve lhe sel
covei piolIen oplinaIIy. Thus, nov ve give gieedy heu-
iislics foi lhe sul-queiies seIeclion piolIen.
6.2.2 Greedy Heuristics
We use gieedy aIgoiilhn given in Iiguie 4 foi soIving lhe
queiy pIanning piolIen vilh diffeienl sel of sul-queiy
seIeclion ciileiia ( Iike lhe ones desciiled in Seclions
4.3.1 and 4.3.3. In lhe PLQFRVW heuiislic ve seIecl lhe sul-
queiy having nininun sul-queiy VXPGLII pei dala ilen.
Ioi lhe MAX queiy, sul-queiy VXPGLII is nolhing lul lhe
VXPGLII of lhe nosl dynanic dala ilen in lhe sul-queiy.
Thus, foi lhe PD[JDLQ heuiislic, lhe gain of each sul-
queiy is caIcuIaled as given in Lqualion (21):
=
qi
d
diq diq
R R G ) max( (21)
vheie 5GLT is VXPGLII of L
WK
dala ilen of lhe queiy T.
6.2.3 Simulation results
Iiguie 8(a) shovs sinuIalion iesuIls foi MAX queiy foi
vaiious aIgoiilhns oulIined in Seclion 5.1. We have nol
used RSWF aIgoiilhn heie as aII dala ilens have lo le
seived al lhe queiy incoheiency lound vilhoul any op-
linizalion in lhe incoheiency lound aIIocalion. Nave
aIgoiilhn iequiies noie lhan 1.5 lines nessages con-
paied lo olhei efficienl sul-queiy lased aIgoiilhns.
Olhei iesuIls aie quaIilaliveIy siniIai lo vhal ve ol-
lained foi lhe addilive queiies vilh one diffeience. Ioi
lolh lypes of queiies lhe PD[JDLQ aIgoiilhn voiks lellei
lhan lhe PLQFRVW aIgoiilhn lul, unIike in addilive que-
iies, in case of MAX queiies peifoinance of PLQFRVW aIgo-
iilhn is cIosei lo lhal of lhe UDQGRP aIgoiilhn conpaied
lo lhe PD[JDLQ aIgoiilhn. This is a suipiising iesuIl con-
sideiing lhal PLQFRVW is lhe nosl naluiaI candidale (foi VHW
FRYHUpiolIen) vilh appioxinalion guaianlee of ORJQT |6j.
Ioi MAX queiies, sul-queiy cosl depends on lhe nosl
dynanic dala ilen. Thus ve nodified lhe gieedy aIgo-
iilhns ly consideiing lhe dala ilens in lhe descending
oidei of VXPGLIIs. Ioi exanpIe, in lhe PD[JDLQ aIgoiilhn
ve fiisl caIcuIale gains of sul-queiies coveiing lhe dala
ilen having naxinun VXPGLII. We seIecl lhe one vilh
naxinun gain. We iepeal lhe slep foi lhe nexl nosl dy-
nanic dala ilen and so on. Iiguie 8(l) shovs vilh lhis
nodified gieedy appioach, peifoinance of PLQFRVW and
PD[JDLQ aIgoiilhns is aInosl lhe sane. This can le ex-
pIained as vilh lhe dala ilen oideiing enfoiced, in lhe
PLQFRVW heuiislic aIso, ve ensuie lhal lhe nosl dynanic
dala ilen is pail of Iovei cosl sul-queiy, Ieading lo lellei
queiy pIan.
7 RELATED WORK
We divide lhe ieIaled voik on scaIalIe ansveiing of ag-
giegalion queiies ovei a nelvoik of dala aggiegalois inlo
lvo inleiieIaled lopics.
$QVZHULQJ,QFRKHUHQF\%RXQGHG$JJUHJDWLRQ4XHULHV
Vaiious nechanisns foi efficienlIy ansveiing inco-
heiency lounded aggiegalion queiies ovei conlinuousIy
changing dala ilens aie pioposed in lhe Iileialuie |9, 11,
14, 16, 2Oj. Oui voik dislinguishes ilseIf ly enpIoying
sul-queiy lased queiy evaIualion lo nininize nunlei of
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
GUPTA ET AL.: QUERY PLANNING FOR CONTINUOUS QUERIES IN DYNAMIC DATA DISSEMINATION NETWORKS 13
iefieshes. IuII lased dala disseninalion lechniques,
vheie cIienls oi dala aggiegalois puII dala ilens such
lhal queiy iequiienenls aie nel, aie desciiled in |9,16j.
Ioi nininizing lhe nunlei of puIIs, lolh piedicl dala
vaIues and puII inslances. In conpaiison, ve use push
lased nechanisn lo iefiesh sul-queiy vaIues al lhe cIi-
enl. In |11j, aulhois piopose push lased schene using
dala fiIleis al lhe souices. Accoiding lo lhal voik, foi an
aggiegalion queiy, lhe nunlei of iefiesh nessages can le
nininized ly peifoining incoheiency lound aIIocalion
lo individuaI dala ilens such lhal lhe nunlei of nes-
sages fion diffeienl dala souices is lhe sane. Inslead ve
execule noie dynanic dala ilens as pail of Iaigei sul-
queiies vhiIe oplinaIIy assigning incoheiency lounds.
WhiIe lhis nighl Iead lo diffeienl nessaging oveiheads
foi diffeienl DAs as opposed lo vhal is pioposed in |11j,
il does iesuIl in nininizing lhe lolaI nunlei of nessages
senl ly DAs. Like us, aulhois of |2Oj aIso assune lhal
disseninalion liee fion sensoi nodes (dala souices) lo
iool (cIienls) aIieady exisls, and lhey aIso inslaII eiioi
fiIleis on pailiaI aggiegales (siniIai lo incoheiency lound
assigned lo sul-queiies). ul, in oui voik, each dala ag-
giegaloi can onIy disseninale dala al sone pie-specified
incoheiency lound depending on ils capaliIily vheieas
such a consliainl does nol exisl foi |2Oj. Iuilhei, ve aIso
give a nelhod lo seIecl pailiaI aggiegales (sul-queiies) lo
le used foi ansveiing lhe queiy.
In |29j aulhois piopose cosl-lased nelhods lo cieale
in-nelvoik-aggiegalion liee consisling of lhe TXHU\ QRGH,
vheie an aggiegalion queiy is invoked leing lhe iool of
lhe aggiegalion liee, and sensois. Aulhois of |29j piopose
conlinalions of nunlei of hops and ienaining eneigy lo
seIecl a pailicuIai palh fion vaiious oplions avaiIalIe
lelveen any lvo nodes. Mapping lheii piolIen lo lhe
oplinaI queiy pIanning discussed in lhis papei, each
connunicaling node can voik as dala souice as veII as
dala aggiegaloi. Lach node can seIecl sul-queiies lased
on lheii VXPGLII vaIues using piincipIes oulIined in lhis
papei lo nininize lhe nunlei of nessage liansfeis in lhe
nelvoik.
In |27j, aulhois use dala hislogians lo oplinaIIy as-
sign IocaI lhieshoIds al noniloiing siles foi lhieshoId
noniloiing al a cenliaI sile. Mainlaining hislogian is a
ledious lask vilh noie space and line oveihead con-
paied lo lhe VXPGLII lased nechanisn. Aulhois of |25j
aIso use Chelyshevs inequaIily lo shov lhal expecled
connunicalion cosl is inveiseIy piopoilionaI lo squaie of
lhe eiioi-ludgel. ul, conpaied lo oui voik, lhey as-
sune lhal nunlei of iefiesh nessages is piopoilionaI lo
dala vaiiance. As ve have expIained in Seclion 2, oui
VXPGLII neasuie lakes lhe oidei of dala vaIue changes
inlo accounl vhich vaiiance does nol. SpaliaI and lenpo-
iaI coiieIalions lelveen sensoi dala aie used lo ieduce
dala iefieshes in |17,18j. We aIso considei coiieIalion in
leins of coiieIalion neasuie lelveen dala ilens, lul ve
use il foi dividing cIienl queiy inlo sul-queiies. A
nelhod of assigning cIienls dala queiies lo aggiegalois in
a conlenl disliilulion nelvoik is given in |12j. They do
foi individuaI dala ilens vhal ve do foi queiies consisl-
ing of nuIlipIe dala ilens.
&RQVWUXFWLRQ DQG 0DLQWHQDQFH RI 1HWZRUN RI 'DWD
$JJUHJDWRUV Aulhois of |5,7,22j desciile consliuclion
and nainlenance of hieiaichicaI nelvoik of dala aggiega-
lois foi pioviding scaIaliIily and fideIily in disseninaling
dynanic dala ilens lo a Iaige nunlei of cIienls. In lhese
voiks, fideIily is defined as fiaclion of line vhen lhe
cIienl coheiency iequiienenls aie nel. Lach dala aggie-
galoi is given cIienl iequiienenls in lhe foin of dala
ilens and lheii iespeclive incoheiency lounds. Inslead,
ve use such nelvoiks foi efficienlIy ansveiing cIienls
aggiegalion queiies. One can use cIienl queiies lo opli-
naIIy consliucl a nelvoik of dala aggiegalois vhiIe, on
lhe olhei hand, one can aIso use a given nelvoik of dala
aggiegalois lo efficienlIy ansvei cIienl queiies. Aulhois
of |5,7,22j deaI vilh lhe fiisl pail vheieas ve have slud-
ied lhe second pail. Changes in dala dynanics nay Iead
lo ieoiganizalion of lhe nelvoik of dala aggiegalois
vhich, in luin, nay necessilale changes in queiy pIans. Il
is a chicken and egg piolIen. Aggiegalois liee ieoigani-
zalion shouId le a Iongei lein phenonenon (i.e., each
inconing queiy shouId nol Iead lo liee ieoiganizalion)
vheieas queiy pIan can change noie oflen depending on
dala dynanics.
Inslead of oplinizing fideIily of dala ilens al dala ag-
giegalois, as pioposed in |7j, using oui voik, one can
oplinize fideIily aII lhe vay up lo cIienl queiies. IideIily
of a dala ilen can le appioxinaleIy caIcuIaled as nunlei
of disseninalion nessages nuIlipIied ly lhe lolaI deIay
in lhe nessage liansnission. Aulhois of |7j assune lhal
each cIienls dala iequiienenls aie fuIfiIIed ly a singIe
dala aggiegaloi. ul, in lhal case, dala aggiegalois nay
need lo disseninale a Iaige nunlei of dala ilens vhich
viII Iead lo piocessing Iaige nunlei of iefiesh nessages,
hence, inciease in deIay. Thus, each cIienl gelling aII ils
dala ilens fion a singIe dala aggiegaloi (using singIe
sul-queiy) is oplinaI fion nunlei of nessages poinl of
viev lul nol necessaiiIy fion lhe queiy fideIily poinl of
viev. y using oui voik, one can nodeI expecled nun-
lei of nessages foi lhe cIienl queiy. Thus, oui voik can
conpIenenl lhe voik of |7j foi end-lo-end (souices-lo-
cIienl) fideIily oplinizalion.
8 DISCUSSION & CONCLUSION
This papei piesenls a cosl lased appioach lo nininize
lhe nunlei of iefieshes iequiied lo execule an inco-
heiency lounded conlinuous queiy. We assune lhe exis-
lence of a nelvoik of dala aggiegalois, vheie each DA is
capalIe of disseninaling a sel of dala ilens al lheii pie-
specified incoheiency lounds. We deveIoped an inpoi-
lanl neasuie foi dala dynanics in lhe foin of VXPGLII
vhich, as ve discussed in Seclion 2, is a noie appiopiiale
neasuie conpaied lo lhe videIy used slandaid devialion
lased neasuies. Ioi oplinaI queiy execulion ve divide
lhe queiy inlo sul-queiies and evaIuale each sul-queiy al
a judiciousIy chosen dala aggiegaloi. Ieifoinance iesuIls
shov lhal ly oui nelhod lhe queiy can le execuled using
Iess lhan one lhiid lhe nessages iequiied foi exisling
schenes. We shoved lhal lhe foIIoving fealuies of lhe
queiy pIanning aIgoiilhns inpiove peifoinance:
o Dividing lhe queiy inlo sul-queiies (ialhei lhan dala
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
14 IEEE TRANSACTIONS ON JOURNAL NAME, MANUSCRIPT ID
ilens) and execuling lhen al specificaIIy chosen dala
aggiegalois.
o Deciding lhe queiy pIan using VXPGLII lased necha-
nisn specificaIIy ly naxinizing sul-queiy gains.
o Lxeculing queiies such lhal noie dynanic dala ilens
aie pail of a Iaigei sul-queiy.
We shoved lhal lhe PD[JDLQ aIgoiilhn is veiy cIose lo
lhe oplinaI aIgoiilhn in seIecling sul-queiies lased on
dala dynanics (Iiguie 6). Queiy salisfialiIily paianelei
() is enpIoyed foi liade-off lelveen queiy salisfialiIily
and queiy peifoinance. Ioi any vaIue of lhe queiy salis-
fialiIily paianelei, lheie is aIvays non-zeio piolaliIily
lhal a queiy viII nol gel salisfied ly lhe nelvoik of dala
aggiegalois. UsuaIIy, dala aggiegalois disseninaling
sane dala ilen foin a hieiaichicaI nelvoik. In lhal case,
even if a dala aggiegaloi can nol salisfy ils assigned
queiy il can again appIy lhe piincipIes oulIined in lhis
papei lo send a sul-queiy of lhe assigned queiy lo ils
paienls (vhich can disseninale lhe dala ilen al a lighlei
incoheiency lound). Thal viII Iead lo pooiei peifoinance
oulIining lhe liadeoff lelveen lhe queiy salisfialiIily and
peifoinance. DeveIoping efficienl slialegies foi nuIlipIe
invocalions of oui aIgoiilhn, consideiing hieiaichy of
dala aggiegalois, is an aiea foi fuluie ieseaich.
Anolhei aiea foi fuluie ieseaich is changing a queiy
pIan as dala dynanics changes. We aie caIcuIaling dala
VXPGLII in dynanic nannei. If dala VXPGLII changes le-
yond a ceilain Iinil, lhe chosen queiy pIan nay nol ie-
nain efficienl. As a sinpIe schene, Iinils on changes lo
dala VXPGLII can le found foi vhich lhe seIecled queiy
pIan ienains oplinaI. Oui voik can aIso le used foi ex-
lending lhe voik pioposed in |7j foi consliuclion and
nainlenance of a nelvoik of dala aggiegalois so lhal
end-lo-end (souices-lo-cIienl) fideIily can le naxinized.
Oui queiy cosl nodeI can aIso le used foi olhei puiposes
such as Ioad laIancing vaiious aggiegalois, nuIli-queiy
execulion, iouling sensoi dala, elc. Using lhe cosl nodeI
foi lhese appIicalions and deveIoping lhe cosl nodeI foi
noie conpIex queiies is lhiid aiea of oui fuluie voik.
REFERENCES
|1j A. Davis, }. Iaiikh and W. WeihI, Ldge Conpuling: Lxlending Lnlei-
piise AppIicalions lo lhe Ldge of lhe Inleinel, WWW 2OO4.
|2j D. VandeiMeei, A. Dalla, K. Dulla, H. Thonas and K. Rananiilhan,
Iioxy-ased AcceIeialion of DynanicaIIy Ceneialed Conlenl on lhe
WoiId Wide Wel, ACM Tiansaclions on Dalalase Syslens (TODS)
VoI. 29, }une 2OO4.
|3j }. DiIIey, . Maggs, }. Iaiikh, H. Iiokop, R. Silaianan and . WeihI,
CIolaIIy Disliiluled Conlenl DeIiveiy, ILLL Inleinel Conpuling
Sepl 2OO2.
|4j S. Rangaiajan, S. Mukeijee and I. Rodiiguez, Usei Specific Requesl
Rediieclion in a Conlenl DeIiveiy Nelvoik, 8
lh
InlI. Woikshop on
Wel Conlenl Caching and Disliilulion (IWCW), 2OO3.
|5j S. Shah, K. Rananiilhan, and I. Shenoy, Mainlaining Coheiency of
Dynanic Dala in Coopeialing Reposiloiies, VLD 2OO2.
|6j T. H. Coinen, ChaiIes L. Leiseison, RonaId L. Rivesl, and CIiffoid
Slein. Inlioduclion lo AIgoiilhns. MIT Iiess and McCiav-HiII 2OO1.
|7j Y. Zhou, . Chin Ooi and Kian-Lean Tan, Disseninaling Slieaning
Dala in a Dynanic Lnviionnenl: An Adaplive and Cosl ased Ap-
pioach, The VLD }ouinaI, Issue 17, pg. 1465-1483, 2OO8.
[8] Query cost model validation for sensor data.
www.cse.iitb.ac.in/~grajeev/sumdiff/RaviVijay_BTP06.pdf.
|9j R. Cupla, A. Iuii, and K. Rananiilhan, Lxeculing Incoheiency
ounded Conlinuous Queiies al Wel Dala Aggiegalois, WWW 2OO5.
|1Oj IopuIis, A. IiolaliIily, Randon VaiialIe and Slochaslic Iiocess, Mc.
Ciav-HiII, 1991.
|11j C. OIslon, }. }iang, and }. Widon, Adaplive IiIlei foi Conlinuous Que-
iies ovei Disliiluled Dala Slieans, SICMOD 2OO3.
|12j S. Shah, K. Rananiilhan, and C. Ravishankai, CIienl Assignnenl in
Conlenl Disseninalion Nelvoiks foi Dynanic Dala, VLD 2OO5.
|13j NLISC Scienlific Conpulei Syslen
hllp://soIe.vh.vhoi.edu/~jnanning//ciuise/seive1.cgi
|14j S. Madden, M. }. IiankIin, }. HeIIeislein and W. Hong, TAC: a Tiny
Aggiegalion Seivice foi Ad-Hoc Sensoi Nelvoiks, Iioc. of 5
lh
Synpo-
siun on Opeialing Syslens Design and inpIenenlalion, 2OO2.
|15j DS }ohnson and MR Caiey, Conpuleis and InliaclaliIily: A Cuide lo
lhe lheoiy of NI-conpIeleness. San Iiancisco, CA: Iieenan, 1979.
|16j S. Zhu and C. Ravishankai, Slochaslic Consislency and ScaIalIe IuII-
ased Caching foi Liialic Dala Souices, VLD 2OO4.
|17j D. Chu, A. Deshpande, }. HeIIeislein, W. Hong, Appioxinale Dala
CoIIeclion in Sensoi Nelvoiks using IiolaliIislic ModeIs, ICDL 2OO6.
|18j A. Deshpande, C. Cuesliin, S. R. Madden, }. M. HeIIeislein, and W.
Hong, ModeI-Diiven Dala Acquisilion in Sensoi Nelvoiks, VLD
2OO4.
|19j Ieaison Iioducl nonenl coiieIalion coefficienl.
hllp://vvv.nyx.nel/~lnacfaiI/STAT_TUT/coiieIal.ssi /
|2Oj Anlonios DeIigiannakis, Yannis Kolidis, and Nick RoussopouIos,
Iiocessing Appioxinale Aggiegale Queiies in WiieIess Sensoi Nel-
voiks, Infoinalion Syslens voI. 31, Issue 8, Ig. 77O-792, 2OO6.
|21j C. Coinode and M. CaiofaIakis, Skelching Slieans lhiough lhe Nel:
Disliiluled Appioxinale Queiy Tiacking, VLD 2OO5.
|22j S. AgiavaI, K. Rananiilhan and S. Shah, Consliuclion of a TenpoiaI
Coheiency Iieseiving Dynanic Dala Disseninalion Nelvoik, RTSS
2OO4.
|23j iian alcock and Chiis OIslon, Disliiluled Top-K Moniloiing,
SICMOD 2OO3.
|24j Adan SiIleislein, Kanesh MunagaIa and }un Yang, Lneigy Lfficienl
Moniloiing of Lxliene VaIues in Sensoi Nelvoiks, SICMOD 2OO6.
|25j N. }ain, D. Kil, I. Mahajan, I. YaIaganduIa, M. DahIin and Y. Zhang,
STAR: SeIf-Tuning Aggiegalion foi ScaIalIe Moniloiing, VLD 2OO7.
|26j R. Cupla and K. Rananiilhan, Oplinized Queiy IIanning of Con-
linuous Aggiegalion Queiies in Dynanic Dala Disseninalion Nel-
voiks, WWW 2OO7.
|27j S. Kashyap, }. Rananiilhan, R. Raslogi and I. ShukIa, Lfficienl Con-
sliainl Moniloiing using Adaplive ThieshoIds, ICDL 2OO8.
|28j D. S. Hochlaun, Appioxinalion aIgoiilhns foi lhe sel coveiing and
veilex covei piolIens, SIAM }ouinaI on Conpuling, voI. 11 (3) 1982.
|29j I. Ldaia, A. Linaye and K. Rananiilhan, Asynchionous In-nelvoik
Iiediclion: Lfficienl Aggiegalion in Sensoi Nelvoiks, ACM Tiansac-
lions on Sensoi Nelvoiks, VoIune 4, Nunlei 4, Augusl 2OO8.
Rajeev Gupta got his BTech from Indian Institute of Technology (IIT)
Kharagpur, India in Electronics Engineering. He is currently pursuing
his PhD from IIT Mumbai, India in Computer Science. He is working
as Researcher at IBM Research, New Delhi, India for last 10 years.
Krithi Ramamritham received the PhD in Computer Science from
University of Utah and then joined the University of Massachusetts.
He is currently at IIT Bombay as Professor in the Department of
Computer Science. He is a fellow of IEEE and a fellow of ACM. He
has served on numerous program committees of conferences and
workshops. His editorial board contributions include IEEE Transac-
tions, the Real Time Systems Journal, and the VLDB Journal.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.