View Updates - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

View Updates

Description:

Balancing the 2 timing requirements by redefining Temporal Correctness. Design scheduling algorithms so that temporal correctness is enforced ... Properties of Updates ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 36
Provided by: reyn64
Category:
Tags: updates | view

less

Transcript and Presenter's Notes

Title: View Updates


1
View Updates Temporal Correctness in Soft
Real-Time Database Systems
Oral Defence by Cheng Chun Kong (MPhil.,
HKUCSIS) Supervised by Dr. B.C.M. Kao 10th
August, 2000.
2
Contents
  • Problems Studied
  • Updates Recomputations
  • Temporal Correctness
  • Transaction Scheduling
  • Performance Study
  • Future Work

3
I Problems Studied
4
Real-Time Database Systems (RTDB)
  • A database system with time constraints
  • Transactions can be associated with time
    constraints e.g., deadlines
  • Refresh database items to reflect the external
    world.

5
Examples of RTDB
  • Cellular Phone Network
  • Threat Analysis System
  • Programmed Stock Trading

6
Example Programmed Stock Trading
  • Monitoring stocks financial instruments
  • On discovering an opportunity, a trading
    transaction is performed.
  • The transaction becomes useless if it misses the
    deadline.

7
System Model
Monitor
Dynamic Environment
Base Data
Views
8
Timing Requirements of Application Transactions
  • Transaction Timeliness How fast a transaction is
    completed
  • Can a transaction finish before its deadline?
  • Data Timeliness How fresh the data is
  • Stale data is less useful to a transaction

9
The 2 Requirements Conflict!
  • Updates Recomputations applied promptly to
    satisfy data timeliness.
  • They are very heavy loads.
  • Transactions get little share of system
    resources.
  • This hurts transaction timeliness.

10
Problems Studied in this Thesis
  • Understand Updates, Recoms Transactions
  • Balancing the 2 timing requirements by redefining
    Temporal Correctness
  • Design scheduling algorithms so that temporal
    correctness is enforced

11
II Updates Recomputations
12
Properties of Updates
  • Based on Adelberg, Garcia-Molina Kaos work
    Applying Update Streams in a Soft RTDB in ACM
    SIGMOD 1995.

13
Properties of Updates
  • Updates arrive at a very high rate
  • In the US market, 500 stock updates per second.
  • An update need not be given full transactional
    support.
  • Use a single update process to install updates

14
Properties of Recomputations
  • Based on Adelberg, Garcia-Molina Kaos work,
    Database Support for Efficiently Maintaining
    Derived Data in EDBT 1996.

15
Fan-in and Fan-out
High Fan-out
High Fan-in
16
Batching
  • A technique for alleviating the heavy recom load
  • A recom request is not served immediately.
  • It sleeps for a small amount of time.
  • During the sleep period, any recoms for the same
    item are batched into a single recom.

17
Implications
  • Updates Recoms are heavy burdens.
  • Need special techniques e.g., batching
  • These techniques need to be integrated into the
    scheduling protocols.

18
III Temporal Correctness
19
Temporal Correctness
  • Absolute Consistency (AC)
  • A data item timely reflects the state of an
    external object.
  • Relative Consistency (RC)
  • A set of data items with values reflecting the
    states of the external objects at the same time
    instant.

20
AC and RC An Example
A1
A2
time
A
B1
B2
time
B
Current Time
  • A2 and B2 are AC. They are also RC.
  • (A1 , B1) and (A1 , B2) are RC pairs.
  • A2 and B1 are NOT consistent pairs.

21
Temporal Correctness from Transactions Point of
View
  • Keeping an AC/RC database is difficult.
  • We can extend temporal consistency from the
    transactions perspective.
  • Can much reduce the update/recomputation
    required.

22
Defining AC/RC from the Perspective of a
Transaction
Database containing 1000 items
23
Instantaneous System
  • An ideal system which applies updates/recoms as
    soon as they arrive, taking zero time to do it.
  • A measure of correctness of real systems.

24
Real System - ACS
  • A transaction is given the values of all objects
    it reads such that
  • these values can be found in an instantaneous
    system at the commit time.
  • No transactions can read old or inconsistent data.

25
Real System - RCS
  • Can we relax data timeliness?
  • Allow transactions to read slightly old data.
  • The set of values read by a transaction can be
    found in an instantaneous system not older than
    transactions start time - ?.

26
ACS vs RCS An Example
A1
time
A
time
B
time
T
commit
start
  • Readset of T in ACS (A2, B1)
  • Readset of T in RCS (A1, B1), (A2, B1)

27
Advantages of RCS over ACS
  • In ACS, an incoming update/recom can abort a
    transaction due to data conflicts
  • In RCS, a transaction will not suffer from this
    problem.
  • Freshness is sacrificed for fewer transaction
    aborts.

28
IV Transaction Scheduling
29
Schedulers for ACS and RCS
  • URT
  • Updates and Recoms first, Transactions later
  • OD
  • On Demand Triggering of Updates Recoms
  • OD-H
  • No transactions URT
  • Otherwise, OD

30
Implementing the Schedulers
  • Concurrency control
  • ACS HP-2PL
  • RCS Multi-version Concurrency Control
  • OD manager for OD
  • Version manager for RCS

31
Implementing the Schedulers
  • Batching
  • No transaction should read the view while its
    recomputation is sleeping.
  • Lock the view before sleeping.

32
V Performance Study
33
Effect of Transaction Arrival Rate (ACS)
34
Comparing URT, OD OD-H
35
Effect of Transaction Arrival Rate (ACS RCS)
36
Effect of Transaction Arrival Rate(OD-H/ACS vs
OD-H/RCS)
37
Comparing ACS and RCS
  • All 3 policies under RCS perform significantly
    better than ACS.
  • 2 drawbacks of RCS
  • Use of older versions.
  • More complex to implement.

38
VI Conclusions
39
Conclusions
  • We studied how temporal correctness can be
    incorporated into an RTDB.
  • We defined temporal consistency from the
    perspective of transactions.

40
Conclusions
  • The data timeliness of ACS is too strict.
  • It has a high transaction miss rate.
  • RCS is less strict.
  • It has a smaller transaction miss rate.

41
Conclusions
  • We studied how URT, OD and OD-H should be
    implemented for ACS.
  • OD-H when applied to an RCS results in the
    smallest transaction miss rate.

42
Logical vs Temporal Correctness
Logical Correctness
Temporal Correctness
43
Future Work
  • Version selection problem in an RCS
  • If the readset of a transaction is known before
    its execution, the performance of RCS may be
    improved.
  • The simulation model can be expanded from single
    processor and single disk, to multiple processors
    and multiple disks.

44
Q A Session
Write a Comment
User Comments (0)
About PowerShow.com