18
Managing Real-Time Managing Real-Time Transactions in Mobile Transactions in Mobile Ad-Hoc Network Ad-Hoc Network Databases Databases Le Gruenwald Le Gruenwald The University of Oklahoma The University of Oklahoma School of Computer Science School of Computer Science Norman, Oklahoma, U.S.A. Norman, Oklahoma, U.S.A. http://www.cs.ou.edu/~database http://www.cs.ou.edu/~database [email protected] [email protected] Funded by National Science Foundation Funded by National Science Foundation Grants: EIA-9973465 Grants: EIA-9973465 and and IIS-0312746 IIS-0312746

Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Embed Size (px)

Citation preview

Page 1: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Managing Real-Time Managing Real-Time Transactions in Mobile Transactions in Mobile

Ad-Hoc Network Ad-Hoc Network DatabasesDatabases

Le GruenwaldLe GruenwaldThe University of OklahomaThe University of OklahomaSchool of Computer ScienceSchool of Computer ScienceNorman, Oklahoma, U.S.A.Norman, Oklahoma, U.S.A.

http://www.cs.ou.edu/~databasehttp://www.cs.ou.edu/[email protected]@ou.edu

Funded by National Science FoundationFunded by National Science Foundation

Grants: EIA-9973465Grants: EIA-9973465 andand IIS-0312746IIS-0312746

Page 2: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

IntroductionIntroductiono GoalGoal

• To develop and prototype a real-time database transaction management model for Mobile Ad-Hoc Network (MANET).

o MANETMANET::• Collection of wireless mobile nodesCollection of wireless mobile nodes• No fixed infrastructureNo fixed infrastructure• Frequent occurrence of Network PartitionsFrequent occurrence of Network Partitions• Server and Client Power restrictionServer and Client Power restriction• Time-critical applicationsTime-critical applications

o Used in Battlefield, Disaster Recovery, etc.Used in Battlefield, Disaster Recovery, etc.

Page 3: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

System ArchitectureSystem Architecture

o Servers (Large Mobile Host LMH)Servers (Large Mobile Host LMH)• Classical workstations with high memory, power and computing Classical workstations with high memory, power and computing

capabilitiescapabilities• Contains the complete DBMSContains the complete DBMS

o Clients (Small Mobile Host SMH)Clients (Small Mobile Host SMH)• Computers with reduced memory, power and computing Computers with reduced memory, power and computing

capabilitiescapabilities• Clients contain the Query Processing Module of the DBMSClients contain the Query Processing Module of the DBMS

Client1

Server1

Server2

Client2

Client3

Client4Client5

Client6

Server3Server4

Page 4: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Research IssuesResearch Issueso Transaction ManagementTransaction Management

o Data CachingData Caching

o Data ReplicationData Replication

o Concurrency ControlConcurrency Control

o Commit ProtocolCommit Protocol

o Recovery Recovery

Page 5: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Transaction Transaction ManagementManagement

o Incorporated three energy modes: active, doze and sleep.

o Designed a Client Transaction Submission Protocol: LEQ (Location-Energy-Queue)

o Firm Transactions

• Time is the most important factor => sent to the least workload and nearest server for transaction processing.

o Soft Transaction

• Energy is the most important factor => sent to the least workload and highest energy server for transaction processing.

Page 6: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Transaction Transaction ManagementManagemento Designed a Real Time Transaction Scheduling

algorithm.

s = d - (t + c + Pd * Td)

o Designed a Server Transaction Processing protocol making use of servers’ energy modes (active vs. doze) to reduce the number of firm transaction aborts while conserving energy.

o Designed a Server Transaction Result Delivery protocol making use of clients’ energy modes (active vs. doze) to reduce the number of firm transaction aborts while conserving energy.

s – Slack Timed – Deadlinet – Transaction Execution Timec – Current TimePd – Probability of DisconnectionTd – Average Disconnection Time

Page 7: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Simulation Results Simulation Results (Transaction Management)(Transaction Management)

Figure 4.1 Effect of Firm Ratio on % Missed Deadlines

01020304050607080

0 0.25 0.5 0.75 1Firm Ratio

% M

issed D

eadlin

e

SSR SMR Caching

Figure 4.2 Effect of Firm Ratio on Overall Energy Consumption

20

30

40

50

60

70

0 0.25 0.5 0.75 1Firm Ratio

Tota

l Energ

y

consum

ptio

n (

kW)

SSR SMR Caching

Figure 4.8 Effect of Disconnection Probability on % Missed Deadlines

0

20

40

60

80

0 0.1 0.2 0.3 0.4 0.5Disconnection Probability

% M

issed

Deadlin

e

SSR SMR Caching

Figure 4.9 Effect of Disconnection Probability on Overall Energy Consumption

20

30

40

50

60

70

0 0.1 0.2 0.3 0.4 0.5Disconnection Probability

Tota

l Energ

y

consum

ptio

n (

kW)

SSR SMR Caching

Page 8: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

GMANET (Group based GMANET (Group based MANET) Caching ModelMANET) Caching Model

o Group leader movement vector: GM

o Group member movement vector: RM + GM

Page 9: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

GMANET Caching ModelGMANET Caching Modelo Cache AssignmentCache Assignment

o Selective caching: only data with access frequency Selective caching: only data with access frequency higher than some threshold is cached.higher than some threshold is cached.

o Data accessed by UD (Up-to-Date) type transactions are Data accessed by UD (Up-to-Date) type transactions are cached at group server leaders LMHg.cached at group server leaders LMHg.

o Data accessed by OU (Outdated Data) type transactions Data accessed by OU (Outdated Data) type transactions are cached at clients (LMHs and SMHs)are cached at clients (LMHs and SMHs)..

o Cache ConsistencyCache Consistency• Caches on clients are maintained at the weak Caches on clients are maintained at the weak

consistency level => calculate refresh time estimate for consistency level => calculate refresh time estimate for randomly/periodically updated data.randomly/periodically updated data.

• Caches on group leaders are maintained at the strong Caches on group leaders are maintained at the strong consistency level => invalidation method.consistency level => invalidation method.

o Cache Replacement• Based on access frequency and transaction type (firm

vs. soft)

Page 10: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

GMANET Caching ModelGMANET Caching Model

o All write transactions are sent to LMHgs.All write transactions are sent to LMHgs.

o UD type read-only transactions can access UD type read-only transactions can access cached data on LMHgscached data on LMHgs• Cache on LMHgs is always fresh by the strong Cache on LMHgs is always fresh by the strong

consistency protocol.consistency protocol.

o OD type read-only transactions can access OD type read-only transactions can access cached data on clients and LMHgscached data on clients and LMHgs• They accept stale cached data in return for They accept stale cached data in return for

fast retrieval.fast retrieval.

Page 11: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Simulation Results Simulation Results (Caching)(Caching)

Figure 5.2 Effect of Firm Ratio on Total Energy Consumption of LMHs

10

20

30

40

50

60

0 0.25 0.5 0.75 1Firm Ratio

Tota

l Energ

y

Consum

ptio

n o

f All

LM

Hs (

KW

)

NO Caching MANET CachingCHAN Caching GMANET Caching

Figure 5.13 Effect of MH Disconnection Probability on % Missed Deadlines

0

10

20

30

40

50

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7MH Disconnection Probability

% M

issed D

eadlin

es

NO Caching MANET CachingCHAN Caching GMANET Caching

Figure 5.14 Effect of MH Disconnection Probability on Total Energy Consumption of All LMHs

5

15

25

35

45

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7MH Disconnection Probability

Tota

l Energ

y

Consum

ptio

n o

f All

LM

Hs (

kw

)

NO Caching MANET CachingCHAN Caching GMANET Caching

Page 12: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Data ReplicationData ReplicationContacted the Norman Fire department and OU Military department for data and transaction model requirements.

Data Items

Read-Only Data ItemsTemporal Data Items Persistent Data Items

Periodic Update Periodic UpdateAperiodic Update Aperiodic Update

Transactions

Read Transactions Write Transactions

MRV MRVP OD Insert/Delete Use Previous

Value

Overwrite Previous

ValueMRV – Most Recent ValueMRVP – Most Recent Value in a PartitionOD – Outdated Data

Page 13: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Replication StrategyReplication Strategy

o Real Time Aware: data items accessed by firm transactions are replicated before those accessed by soft transactions.

o Partition Aware: the decision to replicate is based on:• Current network topology • Remaining power of servers• MRVP transactions are used to address network

partitioning.

o Power Aware: Servers with higher power hold the data items that are most frequently accessed.

Page 14: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Data Replication Data Replication StrategyStrategy

o Access frequencies of data items are computed based on:• Data Types• Transaction Types

o Hot data items are replicated before cold data items.

o Data accessibility is improved by reducing replica duplication between servers.

Page 15: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

PrototypePrototype

o HardwareHardware• Laptop (Servers)Laptop (Servers)• PDA (Clients)PDA (Clients)• Global Positioning System (GPS)Global Positioning System (GPS)• Wireless LAN CardWireless LAN Card

o SoftwareSoftware• Servers: MySQL, Linux, C, C++Servers: MySQL, Linux, C, C++• Clients: DALP, Win CE, Embedded Visual C++ Clients: DALP, Win CE, Embedded Visual C++ • Routing ProtocolRouting Protocol

Page 16: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,
Page 17: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Future Research Future Research DirectionsDirections

o Develop a Real-Time Commit Protocol for MANET databases.

o Develop a Real-Time Concurrency Control Protocol for MANET databases.

o Evaluate the performance of the proposed techniques using the developed prototype for

Fire Department and Military applications.

Page 18: Managing Real-Time Transactions in Mobile Ad-Hoc Network Databases Le Gruenwald The University of Oklahoma School of Computer Science Norman, Oklahoma,

Thanks!Thanks!