



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Continuously adaptive queries over streams (cacq), a system that addresses the challenges of long-running queries over data streams using adaptivity, work sharing, and state sharing. Cacq uses eddies for adaptivity, tuple lineage for work sharing, and state modules for state sharing. Motivating applications include monitoring queries over sensor data, stock analysis, and router events.
Typology: Slides
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















1
CACQ Introduction
2
Continuous Queries
4
Joins in CACQ
5
R.a S.b
Build (^) Build
Probe
Probe
CACQ Main Points
policies
operators between queries
selections over multiple queries
state sharing among joins 7
Step by Step Using Example
8
10
R
(R.a > 10)
(R.b < 15) R (^1)
R (^1)
R (^1)
R a 5 b 25
R a 15 b 0
Ready Done
(R.a > 10)
(R.b < 15)
R (^2)
R R^2 2 R^2 R (^2)
R (^2)
SELECT * FROM R WHERE R.a > 10 AND R.b < 15
11
R
R
R
Q1 Q2 Q
R.a > 10 R.a > 20 R.a = 0
R.b < 15 R.b = 25 R.b <> 50
σb
σa
R
R (^1)
R (^1)
R (^1)
R (^1)
R (^1)
Grouped Filters
R a 5 b 25
SELECT * FROM R WHERE R.a > 10 AND R.b < 15
Q
SELECT * FROM R WHERE R.a > 20 AND R.b = 25
Q
**SELECT ***
FROM R
WHERE R.a = 0
AND R.b <> 50
Q
R 1 R^1
R 1 R 1 R (^1)
R 1 R (^1) R (^1)
0 0 0 0 00 0 1 0 00 1 1 0 00 1 1 1 11 1 1 1 1
Done QueriesCompletedDocsity.com
Tuple & Query Data Structures
13
Tuple [10, 1100, …] Bit Value QueriesCompleted Query 1 1 Query 2 0 Done S.a Index 1 S.b Index 1 R.a – S.b Join 0 UDF (R.a) 0 Query [0110] Bit Value completionMask S.a Index 0 S.b Index 1 R.a – S.b Join 1 UDF (R.a) 0 Docsity.com
Outputting Tuples
14 Q2: 0111
Q1: 1100 &^ Done^ == 1100
& Done == 0111
&& QueriesCompleted[0] == 0
SELECT * FROM R WHERE R.a > 10 AND R.b < 15
Q
SELECT * FROM R WHERE R.b < 15 AND R.c <> 5 AND R.d = 10
Q
completionMasks
Q1 1 1 0 0 Q2 0 1 1 1
Done (^) QC
Tuple
1 1 0 0 0 01 1 0 0 1 01 1 0 0 1 0
Docsity.com
Work Sharing via Tuple Lineage
16
Work Sharing via Tuple Lineage
17
Reject?
Q1: SELECT * FROM s WHERE A, B, C Q2: SELECT * FROM s WHERE A, B, D
Inter- section of CD goes through AB an extra time!
AB must be applied first!
Lineage (Queries Completed) Enables Any Ordering!
0 | 0 QC
0 or 1 | 0 QC
1 | 1 0 or 1 | 0 or 1^ QC QC
0 or 1 | 0 or 1 QC
C D
0 or 1 | 0 or 1 QC
Joins in CACQ
between joins with a common base relation
19
R.a S.b
Build (^) Build
Probe
Probe
Processing Joins Via State Modules
20
S.b = T.c
Query 1 R.a = S.b
Query 2
R S
T
R.a S.b
T.c
Build Probe
Build Probe
Probe