Advanced Database Management Systems
Data Stream Management Alvaro A A Fernandes
School of Computer Science, University of Manchester
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 1 / 115
Advanced Database Management Systems Data Stream Management Alvaro - - PowerPoint PPT Presentation
Advanced Database Management Systems Data Stream Management Alvaro A A Fernandes School of Computer Science, University of Manchester AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 1 / 115 Outline Data Streams Defined and
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 1 / 115
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 2 / 115
Data Streams Defined and Motivated
◮ transactional streams, in which case an item conveys a notification
◮ monitoring streams, in which case an item conveys a notification that
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 3 / 115
Data Streams Defined and Motivated
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 4 / 115
Data Streams Defined and Motivated
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 5 / 115
Data Streams v. Stored Data
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 6 / 115
Data Streams v. Stored Data
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 7 / 115
Data Streams v. Stored Data
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 8 / 115
Data Streams v. Stored Data
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 9 / 115
Windows on Data Streams
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 10 / 115
Windows on Data Streams
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 11 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 12 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 13 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 14 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 15 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 16 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 17 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 18 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 19 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 20 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 21 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 22 / 115
Query Syntax and Semantics in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 23 / 115
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 24 / 115
Query Optimization in DSMSs
◮ Operators ◮ Queues, both input and
◮ State (e.g., windows, previous
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 25 / 115
Query Optimization in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 26 / 115
Query Optimization in DSMSs
◮ Same SELECT and WHERE clauses but different window scope in the
◮ Same SELECT and FROM clauses but different predicates in the
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 27 / 115
Query Optimization in DSMSs
◮ Many tuples at a time: each operator gets a time-slice and the tuples
◮ Many operators at a time: each tuple is processed by all the operators
◮ If minimize end-to-end latency, then a tuple should take the least
◮ If maximize tuple output rate for the query, then, given an arrival rate
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 28 / 115
Query Optimization in DSMSs
◮ The overall workload can change as the QEP collection changes. ◮ Stream arrival rates can change, e.g., from fast to slow, from steady to
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 29 / 115
Query Optimization in DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 30 / 115
Query Optimization in DSMSs
◮ Randomly dropping a fraction of arriving tuples: for monitoring
◮ Examining the contents of a tuple before deciding whether or not to
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 31 / 115
Query Optimization in DSMSs
◮ Spill them over to disk and pick them up for processing during quieter
◮ Narrow the scope of the windows, perhaps progressively.
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 32 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 33 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 34 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 35 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 36 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 37 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 38 / 115
Example DSMSs
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 39 / 115
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 40 / 115
SNDM
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 41 / 115
SNDM
◮ (typically) small ◮ battery-powered ◮ endowed with limited computing capabilities ◮ capable of sensing the physical environment ◮ capable of forming links with other nodes by means of wireless radio
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 42 / 115
SNDM
◮ of natural phenomena such as floods, fires, volcanic
◮ of natural habitats such as bird colonies, forests,
◮ of civil structures such as bridges, buildings, etc..
◮ of animals in natural environments, ◮ of vehicles in built environments, ◮ of goods in organizations, etc..
◮ of risk hazards such as rising pressure in utility pipes,
◮ of intruders, patients in risk, etc.. AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 43 / 115
SNDM
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 44 / 115
SNs as a DC Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 45 / 115
SNs as a DC Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 46 / 115
SNs as a DC Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 47 / 115
SNs as a DC Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 48 / 115
SNDM Desiderata
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 49 / 115
SNDM Desiderata
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 50 / 115
SNDM Desiderata
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 51 / 115
SNDM Desiderata
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 52 / 115
SN as a H/S Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 53 / 115
SN as a H/S Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 54 / 115
SN as a H/S Platform
◮ The topmost layer implements
◮ It relies on a routing layer that
◮ The routing layer relies on the
◮ Scheduling tasks cuts
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 55 / 115
SN as a H/S Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 56 / 115
SN as a H/S Platform
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 57 / 115
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 58 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 59 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 60 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 61 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 62 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 63 / 115
SN Queries
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 64 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 65 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 66 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 67 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 68 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 69 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 70 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 71 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 72 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 73 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 74 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 75 / 115
SN Querying with TinyDB
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 76 / 115
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 77 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 78 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 79 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 80 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 81 / 115
TinyDB QP
◮ All messages are sent with a 5-byte timestamp indicating node time in
◮ When a node receives a message it sets its node time to the
◮ All nodes agree that the waking period begins when
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 82 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 83 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 84 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 85 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 86 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 87 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 88 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 89 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 90 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 91 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 92 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 93 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 94 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 95 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 96 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 97 / 115
TinyDB QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 98 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 99 / 115
SNEE QP
◮ specification of event-based
◮ materialization of results
◮ allowing the user to stipulate
◮ performing in-network,
◮ allowing selection and
◮ correlating data across time
◮ supporting application-specific
◮ allowing windows on the past ◮ supporting joins without
◮ allowing the specification of
◮ correlating data across sites
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 100 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 101 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 102 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 103 / 115
SNEE QP
◮ acquisition rate ◮ maximum delivery time
◮ the schema of each sensed stream ◮ which sensor nodes sense which attributes ◮ the network connectivity graph (NCG) AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 104 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 105 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 106 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 107 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 108 / 115
SNEE QP
◮ Fn indicates that the denoted
◮ txn indicates that that node at that
◮ The acquisition rate is reflected in
◮ The delivery time can be read as
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 109 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 110 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 111 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 112 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 113 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 114 / 115
SNEE QP
AAAF (School of CS, Manchester) Advanced DBMSs 2011-2012 115 / 115