SlideShare a Scribd company logo
1 of 136
Download to read offline
MOBILE DATABASE
4.1 Location and Handoff Management
Prepared by R. Arthy, AP/IT
4.1.1 Location Management
 The location of the mobile unit is
recorded to HLR and VLR
 Mobility Management has two main
task:
 Location Management
 Handoff Management
Prepared by R. Arthy, AP/IT
I Introduction to Location Management
 Objective:
 To minimize the communication overhead due to database
updates
 Three tasks:
 Location Lookup
 Location Update
 Paging
 Cost of update and paging increases as the cell size
increases
 Solution: Location area and paging areas
Prepared by R. Arthy, AP/IT
(contd…)
 Three modes that the mobile node can
operate
 Active mode
 Doze mode
 Power down mode
Prepared by R. Arthy, AP/IT
II Location Lookup
Prepared by R. Arthy, AP/IT
Steps
1. The caller dials a number. To find the location of the called number, the
caller unit sends a location query to its base station source base station
2. The source base station sends the query to the S – LS fro location
delivery
3. S – LS first looks up the VLR to find the location.
4. IF VLR search fails, then the location query is sent to the HLR
5. HLR finds the location of D – LS
6. The search goes to D – LS
7. D – LS finds the address of D – BS
8. Address of D – BS is sent to be HLR
9. HLR sends the address of D – BS to S – LS
10. The address of D – BS is sent to the source base station, which sets up
the communication session
Prepared by R. Arthy, AP/IT
III Location Update
Prepared by R. Arthy, AP/IT
Steps
1. The mobile unit moves to a new registration area which is serviced by a
new location server
2. The new base station sends the update query to new LS
3. The new LS searches the address of the HLR in its local database
4. The new location of the mobile unit is sent to HLR
5. The old location of the mobile unit is replaced by the new location
6. The HLR sends user profile and other information to new LS
7. The new LS stores the information it received from HLR
8. The new LS informs the new base station that location update has been
completed
9. The HLR also sends a message about this location update to the old LS.
The old LS deletes the old location information
10. The old LS sends a confirmation message to the HLRPrepared by R. Arthy, AP/IT
III.1 Forward Pointer Location
Management Scheme
 Objective:
 To minimize network overhead due to HLR
updates
 The pointer at the previous location of the
mobile unit which points to its current location
 The pointer is a descriptor which stores mobile
unit identity and its current location.
 The revisit to a registration area creates a
transient loop
Prepared by R. Arthy, AP/IT
(contd…)
Prepared by R. Arthy, AP/IT
III.1.a Updates using Forward
Pointers
 When MU2 leaves the R1 and moves to R2
then,
 The user profile and the number of forward
pointers created so far by MU2 is transferred
from R1 to R2
 A forward pointer is created at R1 which points to
R2
 This forward pointer can be stored in any of
the BS
Prepared by R. Arthy, AP/IT
(contd…)
 Heuristic based update approach
 Number of pointers created
 Number of search requests
 Based on constant update time
Prepared by R. Arthy, AP/IT
III.1.b Location Search using
Forward Pointer
Prepared by R. Arthy, AP/IT
Steps
 The caller dials the number of destination user
 The source base station sends the query to the source LS for location discovery
 Source LS first looks up the VLR to find the location. If the called number is a
visitor to the source base station, then the location is known and the connection is
setup
 If VLR search fails, then the location query is send to the HLR
 The destination HLR finds the location of destination location server
 The destination HLR sends the location of destination location server to the
source LS
 The source LS finds the first forward pointer and traverse the chain of forward
pointer and reaches the destination server
 The location of current base station is forward to the source LS
 Source Ls transfers the address of current base station and the call is set up
Prepared by R. Arthy, AP/IT
III.1.c. Forward Pointer Maintenance
 Need:
 To remove pointer which have not been used for
some time
 To delete dangling pointers
 Ways to remove pointers:
 Timestamp
 Directed graph
 Dangling pointer – If redundant pointers are
not removed in correct order
Prepared by R. Arthy, AP/IT
Example
R2 – R3
R3 – R4
R4 – R3
R3 – R5
Prepared by R. Arthy, AP/IT
4.1.2 Handoff Management
 Objective:
 To provide continuous connectivity
Degradation Interval
Prepared by R. Arthy, AP/IT
I Introduction
 Types of handoff
 Intra system
 Inter system
 Three steps
 Handoff detection
 Assignment of channels
 Transfer of radio link
Prepared by R. Arthy, AP/IT
II Handoff Detection
 Must properly detect genuine and false
handoff (which occurs because of signal
fading)
 Three approaches
 Mobile – Assisted Handoff (MAHO)
 Mobile – Controlled Handoff (MCHO)
 Network – Controlled Handoff (NCHO)
Prepared by R. Arthy, AP/IT
II.1. Mobile – Assisted Handoff
 Every mobile unit continuously measures the
signal strength data from the surrounding base
station
 And notifies the strength data to the serving base
station
 The strength of these signals are analyzed
 And a handoff is initiated, when the strength of the
neighbor BS > strength of the serving BS
Prepared by R. Arthy, AP/IT
II.2. Mobile – Controlled Handoff
 Mobile unit is responsible for detecting a
handoff
 The MU continuously monitors the signal
strength from neighboring BS and identifies
if a handoff is necessary
Prepared by R. Arthy, AP/IT
II.3. Network – Controlled Handoff
(NCHO)
 The BS monitors the signal strength
used by MU
 If it falls below a threshold value,
the BS initiates handoff
Prepared by R. Arthy, AP/IT
III Assignment of Channels
 Objective:
 To achieve a high degree of channel utilization
 To minimize chances of dropping connection due to
unavailability of channel
 Schemas
 Nonprioritized Schema
 Reserved Channel Schema
 Queuing Priority Schema
 Subrating Schema
Prepared by R. Arthy, AP/IT
III.1. Nonprioritized Schema
Prepared by R. Arthy, AP/IT
III.2. Reserved Channel Schema
Prepared by R. Arthy, AP/IT
III.3. Queuing Priority Schema
Prepared by R. Arthy, AP/IT
III.4. Subrating Schema
Prepared by R. Arthy, AP/IT
IV Radio Link Transfer
 Five link transfer cases for which the
handoff has to be processed
 Intracell handoff
 Intercell or Intra BS handoff
 Inter BS handoff or Intra MSC handoff
 Intersystem or Inter MSC handoff
Prepared by R. Arthy, AP/IT
Intra cell handoff
Prepared by R. Arthy, AP/IT
Inter cell / Intra BS
Prepared by R. Arthy, AP/IT
Inter BS / Intra MSC
Prepared by R. Arthy, AP/IT
Intersystem / Inter MSC
Prepared by R. Arthy, AP/IT
IV.1. Types of Handoff
 Hard Handoff
 Soft Handoff
Prepared by R. Arthy, AP/IT
Mobile Database
4.2. Effect of Mobility on Data Management
Prepared by R. Arthy, AP/IT
Introduction
 Continuous connectivity in mobile space
 Example
 In busy city traffic, carpoolers usually end up
spending a significant amount of time on the
road. Instead of waiting, they can use their mobile
gadget to connect to their corporate database
servers and begin their work. This facility will
minimize the negative effect of communication
delay on productivity
Prepared by R. Arthy, AP/IT
4.2.1 Effect of mobility on the
management of data
 In conventional database and distributed
database the data’s are stationary
 Integration of geographical mobility will
reduce the traveling time
Prepared by R. Arthy, AP/IT
I Data Categorization
 The data distribution in conventional
distributed database systems can be done in
three ways:
 Partitioned
 Partial replication
 Full replication
 In mobility, additionally we have Location –
Dependent Data (LDD)
Prepared by R. Arthy, AP/IT
Location – Dependent Data (LDD)
 It is a class of data values are tightly linked to
specific geographical location
 Example: city, telephone code area, ….
 LID example: Social Security Number (SSN)
 Two types of Query
 Location Dependent Query
 Location Aware Query
Prepared by R. Arthy, AP/IT
Location Dependent Query
 For computing the result
 Example: what is the distance between the
railway station to here?
where I am?
Prepared by R. Arthy, AP/IT
Location – Aware Query
 Includes reference to a particular location
either by name or by suitable geographical
coordinates
 Example: what is the distance between VNR
to MDU?
Prepared by R. Arthy, AP/IT
II Location Dependent Data
Distribution
Data Partitioning
Prepared by R. Arthy, AP/IT
Data Region
 A data region is a geographical region or a
geographical cell and every geographical
point of this region satisfies 1:1 mapping with
data
 Example:
 Hotel chain – same hotel different branch –
different cost
Prepared by R. Arthy, AP/IT
(contd…)
Partial Replication
Prepared by R. Arthy, AP/IT
Effect of Mobility in Atomicity
 Guarantees that partial results of a
transaction do not exist in the database
 Logging approach is not used – several
server is available
Prepared by R. Arthy, AP/IT
Effect of Mobility on Consistency
 Only one correct value for each data object
 Mutual consistency – indicates that all values
of the same data item converge to this one
correct value
Prepared by R. Arthy, AP/IT
Effect of Mobility on Isolation
 Ensures that a transaction does not interfere
with the execution of another transaction
 Fragmentation – ensure isolation
 Data regions – ensure isolation
Prepared by R. Arthy, AP/IT
Effect of Mobility on Durability
 Guarantees the persistence of
committed data items in the DB
Prepared by R. Arthy, AP/IT
Effect of Mobility on Commit
 Location Commit – binds a transaction
commit to a region
 Example:
 Reserve 5 seats in a vegetarian restaurant located
1 mile from here
Prepared by R. Arthy, AP/IT
Effect of Connectivity on
Transaction Processing
 Continuously Connected mode
 Disconnected mode
 Intermittent Connected mode
Prepared by R. Arthy, AP/IT
Mobile Database
4.3. Mobile Transaction Model
Prepared by R. Arthy, AP/IT
4.3.1 Mobile Database System
 It provides full database and mobile
communication functionalities
 It allows a mobile user to initiate transactions
from anywhere and of anytime
 It guarantees their consistency preserving
execution
 It guarantees database recovery
Prepared by R. Arthy, AP/IT
I Properties
 Geographical Mobility
 Connection and Disconnection
 Data Processing Capability
 Wireless communication
 Transparency
 Scalability
Prepared by R. Arthy, AP/IT
II Reference Architecture of a Mobile
Database System
Prepared by R. Arthy, AP/IT
Different Replication Types
Prepared by R. Arthy, AP/IT
III Transaction Execution in MDS
 Parallel processing – to improve system
performance
 Leads to fragmenting a transaction
 Coordinator – manages the set of activities
 3 main ways to implement a coordinator
 Centralized
 Partially replicated
 Totally replicated
Prepared by R. Arthy, AP/IT
Identification of Coordinator in MDS
 A coordinator must have:
 Direct and continuous communication with other
nodes
 Theoretically unlimited and continuous power
and large storage space
 High reliability and availability
Prepared by R. Arthy, AP/IT
Transaction Processing in MDS
 A transaction in MDS can be initiated from a
DBS or from a MU or from both
 When there are more than one nodes involved
in the execution, then the following situation
may arise:
 Origin at MU
 Origin at DBS
Prepared by R. Arthy, AP/IT
(contd…)
 Local execution (MU) – if it cannot be executed at
MU, then there are two option:
 Transfer required data items from DBS to MU
 Distribute transaction to a set of nodes
 Mobility of MU is difficulty task for a coordinator
which requires coordinating and movement of the
MU correctly
 With mobility the following scenarios are possible:
 MU does not move
 MU moves
 Distributed processing and MU moves
Prepared by R. Arthy, AP/IT
(contd…)
 Link can be maintained in two ways:
 Static method
 Dynamic method
Prepared by R. Arthy, AP/IT
IV Need for Mobile Transaction
Model
 Handoff
 The presence of doze mode, disconnected
mode, forced disconnection
 Lack of necessary resources – memory &
wireless channel
 Presence of location data
Prepared by R. Arthy, AP/IT
Execution Model Based on ACID
Transaction Framework
 A transaction is a collection of operations on the
physical and abstract application state
 Geographic Domain:
 The Geographic Domain, G, is the total geographical area
covered by all mobile units of a cellular system
 G = (C1+C2+C3+….+Cn), Ci – area of the cell
 Location:
 A location is a premise point within the Geographical
Domain.
 It represents the smallest identifiable position in the
domain.
 Each location is identified by a specific id, L
 G=Union(L)
Prepared by R. Arthy, AP/IT
Mobile Transaction Model
 HiCoMo: High Commit Mobile Transaction
Model
 Moflex Transaction Model
 Kangaroo Mobile Transaction Model
 MDSTPM Transaction Execution Model
 Mobilaction – A Mobile Transaction Model
Prepared by R. Arthy, AP/IT
HiCoMo: High Commit Mobile
Transaction Model
 It is mobile transaction execution model
 It is mainly for processing aggregate data
stored in a data warehouse which resides in
mobile units
 It is always initiated on mobile units
 They are processed in a disconnection mode
 The results of these transactions are then
installed in the database upon reconnection
Prepared by R. Arthy, AP/IT
(contd…)
 The base database resides on the fixed
network
 It is manipulated by transactions called base
or source transactions
 These transactions are initiated at the fixed
network
 The transaction which is initiated at mobile
units are called HiCoMo
Prepared by R. Arthy, AP/IT
(contd…)
 It is based on the following assumptions:
 The data warehouse stores aggregate data of the
following types: average, sum, minimum and
maximum
 Operations such as subtraction, addition and
multiplication are allowed with some constraints
on their order of application
 The model allows some margin of errors
Prepared by R. Arthy, AP/IT
(contd…)
 The structure of HiCoMo transaction is
based on nested transaction model
 Consistency is satisfied through
convergence criteria
 when the states of the base database and
the data warehouse in mobile units are
identical
Prepared by R. Arthy, AP/IT
(contd…)
 Transaction Transformation Function
 Converts install updates by source transaction.
 Working:
 Conflict Detection
 Base Transaction Generation
 Alternates Base Transaction Generation
Prepared by R. Arthy, AP/IT
Moflex Transaction Model
 It is based on a flexible transaction model
 7 components
 T = {M, S, F, D, H, J, G}
 M = {t1, t2, …, tn}
 S = set of success dependencies between ti and tj
 F = set of failure dependencies
 D = set of external dependencies
 H = set of handoff control rules
 J = set of acceptable join rules
 G = set of all acceptable states of T
Prepared by R. Arthy, AP/IT
(contd…)
 A moflex transaction can be
 Not submitted for execution - N
 Currently under execution – E
 Successfully completed – S
 Failed - F
 An execution of T is regarded as being
complete if its current state exists in set G
 When this satisfied, then T can commit else
can abort
Prepared by R. Arthy, AP/IT
(contd…)
 Location Dependent Query in Moflex
 Example -
Prepared by R. Arthy, AP/IT
Kangaroo Mobile Transaction Model
 It captures both data and the movement of
mobile units
 It is based on split transaction model
 Joey Transaction
 Compensating or split mode
Prepared by R. Arthy, AP/IT
(contd…)
 A KT is initiated by a mobile unit is assigned
with a unique identity
 The initial BS immediately creates a JT with
a UID and becomes responsible for execution
 If handoff – KT is split into two transaction
(JT1, JT2)
 JTs are executed in sequential
Prepared by R. Arthy, AP/IT
MDSTPM Transaction Model
 Multi database Transaction Processing
Manager (MDTPM)
 It supports transaction initiation from mobile
unit
 Uses messaging and queue facilities to
establish necessary communication
Prepared by R. Arthy, AP/IT
(contd…)
 Components:
 Global Communication Manage (GCM)
 Global Transaction Manager (GTM)
 Local Transaction Manager (LTM)
 Global Recovery Manager (GRM)
 Global Interface Manager (GIM)
Prepared by R. Arthy, AP/IT
Mobilaction
 It is capable of processing location –
dependent data in the presence of spatial
replication
 It is composed of a set of sub transactions –
Execution Fragments
 To manage location – based processing, a
new fundamental property called “location
(L)” – it is managed by a location mapping
function
Prepared by R. Arthy, AP/IT
Mobile Database
4.4. Concurrency Control
Prepared by R. Arthy, AP/IT
4.4.1 Introduction
 Need for Concurrency control mechanism
 Data Sharing
 Serializing
 Two – phase locking protocol
 Approaches
 Locking
 Nonlocking
Prepared by R. Arthy, AP/IT
Ways of Locking Data Items
 Locking protocol supports two basic operations:
 Locking
 Unlocking
 Two phases:
 Growing phase
 Shrinking phase
 Three phase for managing two – phase locking
 Locking
 Execution
 Unlocking
Prepared by R. Arthy, AP/IT
(contd…)
 Four different combinations for managing
two – phase locking:
 Simultaneous Locking and Simultaneous Release
 Incremental Locking and Simultaneous Release
 Simultaneous Locking and Incremental release
 Incremental Locking and Incremental Release
Prepared by R. Arthy, AP/IT
(contd…)
 Simultaneous and Simultaneous Release
 Locking, execution and unlocking are applied
atomically
 Next phase begin only when the last phase
competes successfully
 Start and end locking ------> start and end of
transaction ------ start and end of unlocking
 The failure of one phase do not affect other
phase
Prepared by R. Arthy, AP/IT
(contd…)
Simultaneous Locking and Simultaneous Release Protocol
Prepared by R. Arthy, AP/IT
(contd…)
 Incremental Locking
and Simultaneous
Release
 Locking and execution
phases are interleaved
and precede the entire
unlocking phase
 Lock ------ process
-------- lock ----
process ----- unlock
 Deadlock
Prepared by R. Arthy, AP/IT
(contd…)
 Simultaneous Locking and
Incremental Release
 Growing phase is atomic
 Unlock phase is
interleaved with execution
phase
 Locking ---- execution
------ unlock------
execution ------ unlock
 Expensive to manage
cascading than deadlock
Prepared by R. Arthy, AP/IT
(contd…)
 Incremental Locking
and Incremental
Release
 Execution phase is
interleaved with both
locking and release
phase
 Suffers from deadlock
and cascading
 Objective to minimize
transaction waiting time
Prepared by R. Arthy, AP/IT
4.4.2 Multigranularity Locking
 Locking units are of different sizes
 This diversity defines a hierarchy of lockable
granularity
 In this scheme a transaction Ti locks data
items in a hierarchical manner in different
locking modes
 Use – transactions which access and modify
large amount of data
Prepared by R. Arthy, AP/IT
(contd…)
 Five different lock modes
 Read
 Write
 Intention Read – IR
 Intention Write - IW
 Read Intention Write - IRW
Prepared by R. Arthy, AP/IT
(contd…)
Example:
Prepared by R. Arthy, AP/IT
(contd…)
 Suppose a transaction Ti wants to read file3 and
Tj wants to write to R32 . The execution Ti and Tj
goes as follows
 Ti intends to re4ad File3, which a node of the root
database so it applies ir lock to database
 It applies ir lock to Area1
 Finally it applies a r lock to File3
 Tj applies iw lock to database successfully
Prepared by R. Arthy, AP/IT
(contd…)
 It applies iw lock to Area1 successfully
 It cannot apply iw to File3 becase the lock
conflicts with Ti’s lock r
 Ti releases r from File3
 Tj now sets iw on File3 and applies won R32
 Tk wants to read Area1 so it successfully sets ir
on database
 It tries to set r lock on Area 1 but it conflicts with
Tj’s lock (iw)
 It waits for Tj to release its iw lock on Area 1
Prepared by R. Arthy, AP/IT
4.4.3 Heuristic Approach
 Locking protocol – conflict occurs when the
transaction requesting the same data item is
blocked
 Incremental Approach – Deadlock
 Solution – Rollback – increases transaction
waiting time
 Solution – immediately rollback
Prepared by R. Arthy, AP/IT
a. Cautious Waiting
 Improvement over Wound wait (WW) and
Wait – Die mechanism
 Conflict is resolved by rolling back / blocking
one of the conflicting transaction
 Rollback is down based on the transaction
status
 Rollback only when the holder is in a blocked
state
Prepared by R. Arthy, AP/IT
(contd…)
 Properties
 It is non preemptive- it never aborts during the
conflict
 The wait – for graph can have a queue length
greater than one
 It is deadlock free
 It can be optimized if in the conflict transaction,
the amount of resource utilized by the conflicting
transaction is taken into consideration
Prepared by R. Arthy, AP/IT
b. Running Priority
 Blocks if the transaction of holder is running
 Conflict transaction aborts (waits) – others
continue
Prepared by R. Arthy, AP/IT
c. Krishna
 Uses dynamic attributes of conflicting
transactions to resolve conflict
 Transactions during their execution life
inherits a number of attributes
 Example attributes: # of conflicts suffered by
a transaction, # of entities locked by the
transaction, duration the transaction waited
for the desired data time,…
Prepared by R. Arthy, AP/IT
(contd…)
 Dynamic attribute set can be represented as
 DAS = {a1, a2, …
 Conflicting resolution scheme
 Computes priorities of conflicting transaction –
uses this to resolve conflict
 DASj = {a1, a2, …, an}
 DASk = {b1, b2, …, bn}
 Pj and Pk = priorities of Tj and Tk
Prepared by R. Arthy, AP/IT
(contd…)
Prepared by R. Arthy, AP/IT
(contd…)
Prepared by R. Arthy, AP/IT
4.4.4 Non – Locking Based Schema
 To lock or unlock an data item, detection of
deadlock an preventing
 a few thousand instructions have to be
executed each time
 To eliminate these overheads, timestamp
based schemes were used
Prepared by R. Arthy, AP/IT
(contd…)
 Simple timestamping scheme:
 TS(Q)>TS(Ti) = transaction came too late and the
access is not allowed
 Rollback
 Higher timestamp
 Problem: can’t differentiate read and write locks
Prepared by R. Arthy, AP/IT
(contd…)
 Basic Timestamping Scheme:
 Each data items have two timestamp – to resolve
read – write and write – write conflicts
 RTS(Q) compared WTS(Q)
Prepared by R. Arthy, AP/IT
4.4.5. Concurrency Control
Mechanism
 Need for maintaining database consistency
 Mechanism
 Locking – Based CCM
 CCM Based on Epsilon Serializability
 Relationship with ESR
Prepared by R. Arthy, AP/IT
a. Locking – Based CCM
 Two – phase incremental locking and
simultaneous release
 Three different ways:
 Centralized two – phase locking
 Primary copy locking
 Distributed two – phase locking
Prepared by R. Arthy, AP/IT
a. i. Centralized Two – Phase
Locking
 One node is responsible for managing all
locking activities
 Locking request traffic is very high – central
node should be always available
 In a mobile database system, this requirement
limits the choice of central node
Prepared by R. Arthy, AP/IT
(contd…)
 A mobile unit cannot be a central node
because:
 It is a kind of personal processing unit
 It is not powerful enough to manage locking
requests
 It cannot maintain the status of data items
 It is not fully connected to other nodes in the
network
 Its mobility is unpredictable
Prepared by R. Arthy, AP/IT
(contd…)
 Base station is the next choice but there is
problems related mainly with functionality
issues
 A fixed station is attached with the BS
 Problem – Single point failure
Prepared by R. Arthy, AP/IT
a. ii. Primary Copy Two – Phase
Locking
 Eliminates a single point of failure
 Each lock manager is now responsible fir a
subset of data items
 The node executing a part is the transaction
sends lock request to appropriate lock
manager
 Problem – identifying suitable sited for
distributing locking responsibility
 Choice – BS or FH or both
Prepared by R. Arthy, AP/IT
a. iii. Distributed Two – Phase
Locking
 Maximized the extent of lock distribution
 All nodes can serve as a lock manager
Prepared by R. Arthy, AP/IT
a (contd…)
 Include separate database servers connected
to base stations through wired network
 Communication overhead for managing
locking and unlocking requests is another
problem
Prepared by R. Arthy, AP/IT
a. (contd…)
 If a mobile unit makes a lock request on
behalf of a transaction, it executed and then
 It will send the request to lock manager site
 The lock manager will decide to grant or to refuse
the lock and send the result to the mobile unit
 The mobile unit makes the decision to continue
with forward processing or block or rollback
depending upon lock manager’s decision
Prepared by R. Arthy, AP/IT
Distributed HP – 2PL CCM
 Based on two phase locking and extension of
HP – 2PL CCM
 Uses conflict resolution scheme of caution
waiting mechanism to reduce the degree of
transaction roll – backs
 Each BS – lock scheduler
Prepared by R. Arthy, AP/IT
Steps
 On a conflict check the priority of the holder and the requestor
 It Priority (Tr) > Priority (Th) then check the status of (Th). If (Th) is
not committing then check if it is a local transaction
 It (Th) is a local transaction then restart it locally
 If (Th) is a global transaction the restart it globally
 If (Th) is in committing process then it is not restarted rather the (Tr)
is forced to wait until (Th) commits and releases all its lock
 Adjust its Priority of (Th) as follows
 Priority (Th) := Priority (Tr) + some fixed priority level
 If Priority (Tr) <= Priority (Th) then block (Tr) until (Th) commits
and release its locks
Prepared by R. Arthy, AP/IT
b. CCM Based on Epsilon
Serializability
 Tolerates limited amount of inconsistency
 Based on two –tier replication scheme
 Advantage – availability, accommodates the
disconnection problem and is scalable
 Reduces transaction commit time and number of
transaction rejections
 Metric space S is defined as a state space having
the following properties”
 Distance function dist(u,v)
 Triangular inequality
 Symmetry
Prepared by R. Arthy, AP/IT
(contd…)
 BS can broadcast information to all the MUs
I its cell
 A central server holds and manages the
database D = {Di}, i Є N and Di Є S
 di – current value of the data object D
 ni – number of replicas of Di in MDS
 ∆ - amount of change can occur on each
replica at each MU
Prepared by R. Arthy, AP/IT
Steps at a DBS
 ∆i is calculated for each object Di
 A timeout value r is linked with ∆i values of the data
item
 DBS broadcasts the values if (di, ∆i) for each data
item and a timeout r for these values at the beginning
of the broadcast cycle
 The DBS either receives pre – committed
transactions or can receive request transactions
 The DBS serializes the pre – committed transactions
according to their order of arrival
Prepared by R. Arthy, AP/IT
Steps at MU
 MU has the value of (di, ∆i) and the timeout r for
every data item Di it has cached
 MU executes transaction ti. It changes the current
value of Di by ∆i-ti.
 The value ∆i-ti is added ∆i-e. The following cases
are possible depending in the value of ∆i-ti and ∆i-e
 If ∆i-ti <= ∆i and ∆i-e <= ∆i, then ti is committed at MU
and it is sent to DBS for re – execution
 If ∆i-ti <= ∆i and ∆i-e > ∆i, then ti is blocked at MU until
new set of (Di, ∆i) is broadcasted by the server
 If ∆i-ti > ∆i then ti is blocked at MU and submitted to the
server as a request transaction
Prepared by R. Arthy, AP/IT
c. Relationship with ESR
 The mechanism for maintaining ESR has two
methods:
 Divergence Control (DC)
 Consistency Restoration (CR)
Prepared by R. Arthy, AP/IT
Mobile Database
4.5. Transaction Commit Protocol
Prepared by R. Arthy, AP/IT
Introduction
 The entire process of commit has two
phases:
 Checking the intention of each node
participating in the execution of a
transaction
 Collecting the intensions of
participants and committing the
transaction
Prepared by R. Arthy, AP/IT
Two – Phase Commit Protocol –
Centralized 2PC
 Assumption – a distributed database system with
multiple nodes
 Coordinator fragments Ti and distributes then to a
set of participants
 The coordinator may or may not keep the fragments
for itself
 The protocol makes sure of the following:
 Participants’ decision
 Decision change
 Coordinator’s decision
 No Failure
 With failure
Prepared by R. Arthy, AP/IT
(contd…)
 Steps:
 Transaction fragmentation and distribution
 Voting Phase
 Voting
 Participants’ vote
 Decision Phase
 Commit decision and dispatch
 Participants decision
Prepared by R. Arthy, AP/IT
Node Failure and Timeout Action
 Occurrences of infinite wait because of node
failure
 One scheme – timeout action
 How long a participant to wait
 Coordinator sent commit – reaches subset of
participants
 To handle immature abort by a timeout,
cooperative termination protocol can be used
Prepared by R. Arthy, AP/IT
Cooperative Termination Protocol
 Two options:
 Ask the coordinator about its last message
 Ask one of its neighbor participants
 To evaluate the cost of communication, two
parameters are used
 Time complexity
 Message complexity
Prepared by R. Arthy, AP/IT
Linear or Nested 2PC
 In linear 2PC the message complexity is
reduced by collecting votes serially
Prepared by R. Arthy, AP/IT
Mobile Database
4.6. Mobile Database Recovery
Prepared by R. Arthy, AP/IT
Log Management in Mobile Database
Systems
 Log is a sequential file where information
necessary for recovery is recorded
 Each log record represents a unit of
information
 The position of a record in the log identifies
the relative order of the occurrences of the
event the record represents
 Property – Write Ahead Logging (WAL)
Prepared by R. Arthy, AP/IT
Where to Save the Log?
 MSC
 BS
 MU
Prepared by R. Arthy, AP/IT
Logging Scheme
 Centralized Logging – Saving of log at a designated
site
 Drawback
 It has very low reliability
 Logging may become a bottleneck
 Home Logging
 Drawback
 Scattered over a number of base stations
 It may not work for Location dependent data
 Poor availability
Prepared by R. Arthy, AP/IT
(contd…)
 At all visited base stations
 Log is saved at the BS of the cell it is currently
visiting
 Lazy scheme
 Pessimistic scheme
 Logs are stored on the current BS and if the MU
moves to a new BS, a pointer to the old BS is
stored in the new BS
 It has a large recovery time because it require
unification of log portions
Prepared by R. Arthy, AP/IT
Mobile Database Recovery Schemes
 Three – phase Hybrid Recovery Scheme
 Low – Cost Checkpointing and Failure Recovery
 A Mobile Agent – Based Log Management Scheme
 Architecture of Agent – Based Logging Scheme
 Interaction among agents for log management
 Forward strategy
 Forward Log Unification Scheme
 Forward Notification Scheme
Prepared by R. Arthy, AP/IT
Three – Phase Hybrid Recovery
Scheme
Prepared by R. Arthy, AP/IT
(contd…)
Prepared by R. Arthy, AP/IT
Low – Cost Checkpointing and
Failure Recovery
Prepared by R. Arthy, AP/IT
(contd…)
Prepared by R. Arthy, AP/IT
A Mobile Agent – Based Log
Management Scheme
 Mobile agent is used
 MA – is an autonomous program that can
move from machine to machine in a
heterogeneous network under its own control
 Advantages of MA
 Protocol Encapsulation
 Robustness and fault – tolerance
 Asynchronous and autonomous execution
Prepared by R. Arthy, AP/IT
Architecture of Agent – Based
Logging Scheme
 Components
 Bootstrap Agent
 Base Agent
 Home Agent
 Coordinator Agent
 Event Agent
 Driver Agent
Prepared by R. Arthy, AP/IT
Interaction Among Agents for Log
Management
 Interaction of CoAg and HoAg
 Action of agent when handoff occurs
Prepared by R. Arthy, AP/IT

More Related Content

What's hot

Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
sumitjain2013
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local names
Varsha Kumar
 

What's hot (20)

Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
Deductive databases
Deductive databasesDeductive databases
Deductive databases
 
Replication in Distributed Database
Replication in Distributed DatabaseReplication in Distributed Database
Replication in Distributed Database
 
Adhoc and routing protocols
Adhoc and routing protocolsAdhoc and routing protocols
Adhoc and routing protocols
 
Network hardware
Network hardwareNetwork hardware
Network hardware
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
 
Comprehensive survey on routing protocols for IoT
Comprehensive survey on routing protocols for IoTComprehensive survey on routing protocols for IoT
Comprehensive survey on routing protocols for IoT
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
Utran architecture(rashmi)
Utran architecture(rashmi)Utran architecture(rashmi)
Utran architecture(rashmi)
 
Run time storage
Run time storageRun time storage
Run time storage
 
Global state routing
Global state routingGlobal state routing
Global state routing
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Data Integration and Transformation in Data mining
Data Integration and Transformation in Data miningData Integration and Transformation in Data mining
Data Integration and Transformation in Data mining
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to Virtualization
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
 
Umts system architecture
Umts system architectureUmts system architecture
Umts system architecture
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local names
 

Similar to Mobile database

A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...
IJERA Editor
 
A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...
IJERA Editor
 
1x ev do hard handoff
1x ev do hard handoff1x ev do hard handoff
1x ev do hard handoff
Phuoc Phuoc
 
1x ev do hard handoff
1x ev do hard handoff1x ev do hard handoff
1x ev do hard handoff
Phuoc Phuoc
 
Remote sensing satellite data demodulation and bit synchronization 2
Remote sensing satellite data demodulation and bit synchronization 2Remote sensing satellite data demodulation and bit synchronization 2
Remote sensing satellite data demodulation and bit synchronization 2
IAEME Publication
 
basic-celluar-systefhurdhguudhugudhguugudghum.ppt
basic-celluar-systefhurdhguudhugudhguugudghum.pptbasic-celluar-systefhurdhguudhugudhguugudghum.ppt
basic-celluar-systefhurdhguudhugudhguugudghum.ppt
makeporium
 

Similar to Mobile database (20)

IRJET- Survey Paper on Human Following Robot
IRJET- Survey Paper on Human Following RobotIRJET- Survey Paper on Human Following Robot
IRJET- Survey Paper on Human Following Robot
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...
 
A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...A Comparative Study on Profile Based Location Management for Personal Communi...
A Comparative Study on Profile Based Location Management for Personal Communi...
 
Coordinate Location Fingerprint Based On WiFi Service
Coordinate Location Fingerprint Based On  WiFi ServiceCoordinate Location Fingerprint Based On  WiFi Service
Coordinate Location Fingerprint Based On WiFi Service
 
SELECTING VOTES FOR ENERGY EFFICIENCY IN PROBABILISTIC VOTING-BASED FILTERING...
SELECTING VOTES FOR ENERGY EFFICIENCY IN PROBABILISTIC VOTING-BASED FILTERING...SELECTING VOTES FOR ENERGY EFFICIENCY IN PROBABILISTIC VOTING-BASED FILTERING...
SELECTING VOTES FOR ENERGY EFFICIENCY IN PROBABILISTIC VOTING-BASED FILTERING...
 
1x ev do hard handoff
1x ev do hard handoff1x ev do hard handoff
1x ev do hard handoff
 
1x ev do hard handoff
1x ev do hard handoff1x ev do hard handoff
1x ev do hard handoff
 
Nuzzer algorithm based Human Tracking and Security System for Device-Free Pas...
Nuzzer algorithm based Human Tracking and Security System for Device-Free Pas...Nuzzer algorithm based Human Tracking and Security System for Device-Free Pas...
Nuzzer algorithm based Human Tracking and Security System for Device-Free Pas...
 
Internet of Things: Energy Efficient Public Sensing
Internet of Things: Energy Efficient Public SensingInternet of Things: Energy Efficient Public Sensing
Internet of Things: Energy Efficient Public Sensing
 
Mobility collector: Battery Conscious Mobile Tracking
Mobility collector: Battery Conscious Mobile TrackingMobility collector: Battery Conscious Mobile Tracking
Mobility collector: Battery Conscious Mobile Tracking
 
Cellular communication
Cellular communicationCellular communication
Cellular communication
 
Performance of Various Mobile IP Protocols and Security Considerations
Performance of Various Mobile IP Protocols and Security ConsiderationsPerformance of Various Mobile IP Protocols and Security Considerations
Performance of Various Mobile IP Protocols and Security Considerations
 
G0333039041
G0333039041G0333039041
G0333039041
 
Remote sensing satellite data demodulation and bit synchronization 2
Remote sensing satellite data demodulation and bit synchronization 2Remote sensing satellite data demodulation and bit synchronization 2
Remote sensing satellite data demodulation and bit synchronization 2
 
Researchpaper a survey-on-de-registration-schemes-in-pcs-network
Researchpaper a survey-on-de-registration-schemes-in-pcs-networkResearchpaper a survey-on-de-registration-schemes-in-pcs-network
Researchpaper a survey-on-de-registration-schemes-in-pcs-network
 
Basic celluar-system
Basic celluar-systemBasic celluar-system
Basic celluar-system
 
basic-celluar-systefhurdhguudhugudhguugudghum.ppt
basic-celluar-systefhurdhguudhugudhguugudghum.pptbasic-celluar-systefhurdhguudhugudhguugudghum.ppt
basic-celluar-systefhurdhguudhugudhguugudghum.ppt
 
Crowd control system using ir transmitter and receiver
Crowd control system using ir transmitter and receiverCrowd control system using ir transmitter and receiver
Crowd control system using ir transmitter and receiver
 
Crowd control system using ir transmitter and receiver
Crowd control system using ir transmitter and receiverCrowd control system using ir transmitter and receiver
Crowd control system using ir transmitter and receiver
 

More from ArthyR3

More from ArthyR3 (20)

Unit IV Knowledge and Hybrid Recommendation System.pdf
Unit IV Knowledge and Hybrid Recommendation System.pdfUnit IV Knowledge and Hybrid Recommendation System.pdf
Unit IV Knowledge and Hybrid Recommendation System.pdf
 
VIT336 – Recommender System - Unit 3.pdf
VIT336 – Recommender System - Unit 3.pdfVIT336 – Recommender System - Unit 3.pdf
VIT336 – Recommender System - Unit 3.pdf
 
OOPs - JAVA Quick Reference.pdf
OOPs - JAVA Quick Reference.pdfOOPs - JAVA Quick Reference.pdf
OOPs - JAVA Quick Reference.pdf
 
NodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
 
MongoDB.pdf
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
 
REACTJS.pdf
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
 
ANGULARJS.pdf
ANGULARJS.pdfANGULARJS.pdf
ANGULARJS.pdf
 
JQUERY.pdf
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
 
Qb it1301
Qb   it1301Qb   it1301
Qb it1301
 
CNS - Unit v
CNS - Unit vCNS - Unit v
CNS - Unit v
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit i
 
Java quick reference
Java quick referenceJava quick reference
Java quick reference
 
Cs8792 cns - Public key cryptosystem (Unit III)
Cs8792   cns - Public key cryptosystem (Unit III)Cs8792   cns - Public key cryptosystem (Unit III)
Cs8792 cns - Public key cryptosystem (Unit III)
 
Cryptography Workbook
Cryptography WorkbookCryptography Workbook
Cryptography Workbook
 
Cns
CnsCns
Cns
 
Cs6701 cryptography and network security
Cs6701 cryptography and network securityCs6701 cryptography and network security
Cs6701 cryptography and network security
 
Compiler question bank
Compiler question bankCompiler question bank
Compiler question bank
 

Recently uploaded

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 

Mobile database

  • 1. MOBILE DATABASE 4.1 Location and Handoff Management Prepared by R. Arthy, AP/IT
  • 2. 4.1.1 Location Management  The location of the mobile unit is recorded to HLR and VLR  Mobility Management has two main task:  Location Management  Handoff Management Prepared by R. Arthy, AP/IT
  • 3. I Introduction to Location Management  Objective:  To minimize the communication overhead due to database updates  Three tasks:  Location Lookup  Location Update  Paging  Cost of update and paging increases as the cell size increases  Solution: Location area and paging areas Prepared by R. Arthy, AP/IT
  • 4. (contd…)  Three modes that the mobile node can operate  Active mode  Doze mode  Power down mode Prepared by R. Arthy, AP/IT
  • 5. II Location Lookup Prepared by R. Arthy, AP/IT
  • 6. Steps 1. The caller dials a number. To find the location of the called number, the caller unit sends a location query to its base station source base station 2. The source base station sends the query to the S – LS fro location delivery 3. S – LS first looks up the VLR to find the location. 4. IF VLR search fails, then the location query is sent to the HLR 5. HLR finds the location of D – LS 6. The search goes to D – LS 7. D – LS finds the address of D – BS 8. Address of D – BS is sent to be HLR 9. HLR sends the address of D – BS to S – LS 10. The address of D – BS is sent to the source base station, which sets up the communication session Prepared by R. Arthy, AP/IT
  • 7. III Location Update Prepared by R. Arthy, AP/IT
  • 8. Steps 1. The mobile unit moves to a new registration area which is serviced by a new location server 2. The new base station sends the update query to new LS 3. The new LS searches the address of the HLR in its local database 4. The new location of the mobile unit is sent to HLR 5. The old location of the mobile unit is replaced by the new location 6. The HLR sends user profile and other information to new LS 7. The new LS stores the information it received from HLR 8. The new LS informs the new base station that location update has been completed 9. The HLR also sends a message about this location update to the old LS. The old LS deletes the old location information 10. The old LS sends a confirmation message to the HLRPrepared by R. Arthy, AP/IT
  • 9. III.1 Forward Pointer Location Management Scheme  Objective:  To minimize network overhead due to HLR updates  The pointer at the previous location of the mobile unit which points to its current location  The pointer is a descriptor which stores mobile unit identity and its current location.  The revisit to a registration area creates a transient loop Prepared by R. Arthy, AP/IT
  • 11. III.1.a Updates using Forward Pointers  When MU2 leaves the R1 and moves to R2 then,  The user profile and the number of forward pointers created so far by MU2 is transferred from R1 to R2  A forward pointer is created at R1 which points to R2  This forward pointer can be stored in any of the BS Prepared by R. Arthy, AP/IT
  • 12. (contd…)  Heuristic based update approach  Number of pointers created  Number of search requests  Based on constant update time Prepared by R. Arthy, AP/IT
  • 13. III.1.b Location Search using Forward Pointer Prepared by R. Arthy, AP/IT
  • 14. Steps  The caller dials the number of destination user  The source base station sends the query to the source LS for location discovery  Source LS first looks up the VLR to find the location. If the called number is a visitor to the source base station, then the location is known and the connection is setup  If VLR search fails, then the location query is send to the HLR  The destination HLR finds the location of destination location server  The destination HLR sends the location of destination location server to the source LS  The source LS finds the first forward pointer and traverse the chain of forward pointer and reaches the destination server  The location of current base station is forward to the source LS  Source Ls transfers the address of current base station and the call is set up Prepared by R. Arthy, AP/IT
  • 15. III.1.c. Forward Pointer Maintenance  Need:  To remove pointer which have not been used for some time  To delete dangling pointers  Ways to remove pointers:  Timestamp  Directed graph  Dangling pointer – If redundant pointers are not removed in correct order Prepared by R. Arthy, AP/IT
  • 16. Example R2 – R3 R3 – R4 R4 – R3 R3 – R5 Prepared by R. Arthy, AP/IT
  • 17. 4.1.2 Handoff Management  Objective:  To provide continuous connectivity Degradation Interval Prepared by R. Arthy, AP/IT
  • 18. I Introduction  Types of handoff  Intra system  Inter system  Three steps  Handoff detection  Assignment of channels  Transfer of radio link Prepared by R. Arthy, AP/IT
  • 19. II Handoff Detection  Must properly detect genuine and false handoff (which occurs because of signal fading)  Three approaches  Mobile – Assisted Handoff (MAHO)  Mobile – Controlled Handoff (MCHO)  Network – Controlled Handoff (NCHO) Prepared by R. Arthy, AP/IT
  • 20. II.1. Mobile – Assisted Handoff  Every mobile unit continuously measures the signal strength data from the surrounding base station  And notifies the strength data to the serving base station  The strength of these signals are analyzed  And a handoff is initiated, when the strength of the neighbor BS > strength of the serving BS Prepared by R. Arthy, AP/IT
  • 21. II.2. Mobile – Controlled Handoff  Mobile unit is responsible for detecting a handoff  The MU continuously monitors the signal strength from neighboring BS and identifies if a handoff is necessary Prepared by R. Arthy, AP/IT
  • 22. II.3. Network – Controlled Handoff (NCHO)  The BS monitors the signal strength used by MU  If it falls below a threshold value, the BS initiates handoff Prepared by R. Arthy, AP/IT
  • 23. III Assignment of Channels  Objective:  To achieve a high degree of channel utilization  To minimize chances of dropping connection due to unavailability of channel  Schemas  Nonprioritized Schema  Reserved Channel Schema  Queuing Priority Schema  Subrating Schema Prepared by R. Arthy, AP/IT
  • 25. III.2. Reserved Channel Schema Prepared by R. Arthy, AP/IT
  • 26. III.3. Queuing Priority Schema Prepared by R. Arthy, AP/IT
  • 27. III.4. Subrating Schema Prepared by R. Arthy, AP/IT
  • 28. IV Radio Link Transfer  Five link transfer cases for which the handoff has to be processed  Intracell handoff  Intercell or Intra BS handoff  Inter BS handoff or Intra MSC handoff  Intersystem or Inter MSC handoff Prepared by R. Arthy, AP/IT
  • 29. Intra cell handoff Prepared by R. Arthy, AP/IT
  • 30. Inter cell / Intra BS Prepared by R. Arthy, AP/IT
  • 31. Inter BS / Intra MSC Prepared by R. Arthy, AP/IT
  • 32. Intersystem / Inter MSC Prepared by R. Arthy, AP/IT
  • 33. IV.1. Types of Handoff  Hard Handoff  Soft Handoff Prepared by R. Arthy, AP/IT
  • 34. Mobile Database 4.2. Effect of Mobility on Data Management Prepared by R. Arthy, AP/IT
  • 35. Introduction  Continuous connectivity in mobile space  Example  In busy city traffic, carpoolers usually end up spending a significant amount of time on the road. Instead of waiting, they can use their mobile gadget to connect to their corporate database servers and begin their work. This facility will minimize the negative effect of communication delay on productivity Prepared by R. Arthy, AP/IT
  • 36. 4.2.1 Effect of mobility on the management of data  In conventional database and distributed database the data’s are stationary  Integration of geographical mobility will reduce the traveling time Prepared by R. Arthy, AP/IT
  • 37. I Data Categorization  The data distribution in conventional distributed database systems can be done in three ways:  Partitioned  Partial replication  Full replication  In mobility, additionally we have Location – Dependent Data (LDD) Prepared by R. Arthy, AP/IT
  • 38. Location – Dependent Data (LDD)  It is a class of data values are tightly linked to specific geographical location  Example: city, telephone code area, ….  LID example: Social Security Number (SSN)  Two types of Query  Location Dependent Query  Location Aware Query Prepared by R. Arthy, AP/IT
  • 39. Location Dependent Query  For computing the result  Example: what is the distance between the railway station to here? where I am? Prepared by R. Arthy, AP/IT
  • 40. Location – Aware Query  Includes reference to a particular location either by name or by suitable geographical coordinates  Example: what is the distance between VNR to MDU? Prepared by R. Arthy, AP/IT
  • 41. II Location Dependent Data Distribution Data Partitioning Prepared by R. Arthy, AP/IT
  • 42. Data Region  A data region is a geographical region or a geographical cell and every geographical point of this region satisfies 1:1 mapping with data  Example:  Hotel chain – same hotel different branch – different cost Prepared by R. Arthy, AP/IT
  • 44. Effect of Mobility in Atomicity  Guarantees that partial results of a transaction do not exist in the database  Logging approach is not used – several server is available Prepared by R. Arthy, AP/IT
  • 45. Effect of Mobility on Consistency  Only one correct value for each data object  Mutual consistency – indicates that all values of the same data item converge to this one correct value Prepared by R. Arthy, AP/IT
  • 46. Effect of Mobility on Isolation  Ensures that a transaction does not interfere with the execution of another transaction  Fragmentation – ensure isolation  Data regions – ensure isolation Prepared by R. Arthy, AP/IT
  • 47. Effect of Mobility on Durability  Guarantees the persistence of committed data items in the DB Prepared by R. Arthy, AP/IT
  • 48. Effect of Mobility on Commit  Location Commit – binds a transaction commit to a region  Example:  Reserve 5 seats in a vegetarian restaurant located 1 mile from here Prepared by R. Arthy, AP/IT
  • 49. Effect of Connectivity on Transaction Processing  Continuously Connected mode  Disconnected mode  Intermittent Connected mode Prepared by R. Arthy, AP/IT
  • 50. Mobile Database 4.3. Mobile Transaction Model Prepared by R. Arthy, AP/IT
  • 51. 4.3.1 Mobile Database System  It provides full database and mobile communication functionalities  It allows a mobile user to initiate transactions from anywhere and of anytime  It guarantees their consistency preserving execution  It guarantees database recovery Prepared by R. Arthy, AP/IT
  • 52. I Properties  Geographical Mobility  Connection and Disconnection  Data Processing Capability  Wireless communication  Transparency  Scalability Prepared by R. Arthy, AP/IT
  • 53. II Reference Architecture of a Mobile Database System Prepared by R. Arthy, AP/IT
  • 55. III Transaction Execution in MDS  Parallel processing – to improve system performance  Leads to fragmenting a transaction  Coordinator – manages the set of activities  3 main ways to implement a coordinator  Centralized  Partially replicated  Totally replicated Prepared by R. Arthy, AP/IT
  • 56. Identification of Coordinator in MDS  A coordinator must have:  Direct and continuous communication with other nodes  Theoretically unlimited and continuous power and large storage space  High reliability and availability Prepared by R. Arthy, AP/IT
  • 57. Transaction Processing in MDS  A transaction in MDS can be initiated from a DBS or from a MU or from both  When there are more than one nodes involved in the execution, then the following situation may arise:  Origin at MU  Origin at DBS Prepared by R. Arthy, AP/IT
  • 58. (contd…)  Local execution (MU) – if it cannot be executed at MU, then there are two option:  Transfer required data items from DBS to MU  Distribute transaction to a set of nodes  Mobility of MU is difficulty task for a coordinator which requires coordinating and movement of the MU correctly  With mobility the following scenarios are possible:  MU does not move  MU moves  Distributed processing and MU moves Prepared by R. Arthy, AP/IT
  • 59. (contd…)  Link can be maintained in two ways:  Static method  Dynamic method Prepared by R. Arthy, AP/IT
  • 60. IV Need for Mobile Transaction Model  Handoff  The presence of doze mode, disconnected mode, forced disconnection  Lack of necessary resources – memory & wireless channel  Presence of location data Prepared by R. Arthy, AP/IT
  • 61. Execution Model Based on ACID Transaction Framework  A transaction is a collection of operations on the physical and abstract application state  Geographic Domain:  The Geographic Domain, G, is the total geographical area covered by all mobile units of a cellular system  G = (C1+C2+C3+….+Cn), Ci – area of the cell  Location:  A location is a premise point within the Geographical Domain.  It represents the smallest identifiable position in the domain.  Each location is identified by a specific id, L  G=Union(L) Prepared by R. Arthy, AP/IT
  • 62. Mobile Transaction Model  HiCoMo: High Commit Mobile Transaction Model  Moflex Transaction Model  Kangaroo Mobile Transaction Model  MDSTPM Transaction Execution Model  Mobilaction – A Mobile Transaction Model Prepared by R. Arthy, AP/IT
  • 63. HiCoMo: High Commit Mobile Transaction Model  It is mobile transaction execution model  It is mainly for processing aggregate data stored in a data warehouse which resides in mobile units  It is always initiated on mobile units  They are processed in a disconnection mode  The results of these transactions are then installed in the database upon reconnection Prepared by R. Arthy, AP/IT
  • 64. (contd…)  The base database resides on the fixed network  It is manipulated by transactions called base or source transactions  These transactions are initiated at the fixed network  The transaction which is initiated at mobile units are called HiCoMo Prepared by R. Arthy, AP/IT
  • 65. (contd…)  It is based on the following assumptions:  The data warehouse stores aggregate data of the following types: average, sum, minimum and maximum  Operations such as subtraction, addition and multiplication are allowed with some constraints on their order of application  The model allows some margin of errors Prepared by R. Arthy, AP/IT
  • 66. (contd…)  The structure of HiCoMo transaction is based on nested transaction model  Consistency is satisfied through convergence criteria  when the states of the base database and the data warehouse in mobile units are identical Prepared by R. Arthy, AP/IT
  • 67. (contd…)  Transaction Transformation Function  Converts install updates by source transaction.  Working:  Conflict Detection  Base Transaction Generation  Alternates Base Transaction Generation Prepared by R. Arthy, AP/IT
  • 68. Moflex Transaction Model  It is based on a flexible transaction model  7 components  T = {M, S, F, D, H, J, G}  M = {t1, t2, …, tn}  S = set of success dependencies between ti and tj  F = set of failure dependencies  D = set of external dependencies  H = set of handoff control rules  J = set of acceptable join rules  G = set of all acceptable states of T Prepared by R. Arthy, AP/IT
  • 69. (contd…)  A moflex transaction can be  Not submitted for execution - N  Currently under execution – E  Successfully completed – S  Failed - F  An execution of T is regarded as being complete if its current state exists in set G  When this satisfied, then T can commit else can abort Prepared by R. Arthy, AP/IT
  • 70. (contd…)  Location Dependent Query in Moflex  Example - Prepared by R. Arthy, AP/IT
  • 71. Kangaroo Mobile Transaction Model  It captures both data and the movement of mobile units  It is based on split transaction model  Joey Transaction  Compensating or split mode Prepared by R. Arthy, AP/IT
  • 72. (contd…)  A KT is initiated by a mobile unit is assigned with a unique identity  The initial BS immediately creates a JT with a UID and becomes responsible for execution  If handoff – KT is split into two transaction (JT1, JT2)  JTs are executed in sequential Prepared by R. Arthy, AP/IT
  • 73. MDSTPM Transaction Model  Multi database Transaction Processing Manager (MDTPM)  It supports transaction initiation from mobile unit  Uses messaging and queue facilities to establish necessary communication Prepared by R. Arthy, AP/IT
  • 74. (contd…)  Components:  Global Communication Manage (GCM)  Global Transaction Manager (GTM)  Local Transaction Manager (LTM)  Global Recovery Manager (GRM)  Global Interface Manager (GIM) Prepared by R. Arthy, AP/IT
  • 75. Mobilaction  It is capable of processing location – dependent data in the presence of spatial replication  It is composed of a set of sub transactions – Execution Fragments  To manage location – based processing, a new fundamental property called “location (L)” – it is managed by a location mapping function Prepared by R. Arthy, AP/IT
  • 76. Mobile Database 4.4. Concurrency Control Prepared by R. Arthy, AP/IT
  • 77. 4.4.1 Introduction  Need for Concurrency control mechanism  Data Sharing  Serializing  Two – phase locking protocol  Approaches  Locking  Nonlocking Prepared by R. Arthy, AP/IT
  • 78. Ways of Locking Data Items  Locking protocol supports two basic operations:  Locking  Unlocking  Two phases:  Growing phase  Shrinking phase  Three phase for managing two – phase locking  Locking  Execution  Unlocking Prepared by R. Arthy, AP/IT
  • 79. (contd…)  Four different combinations for managing two – phase locking:  Simultaneous Locking and Simultaneous Release  Incremental Locking and Simultaneous Release  Simultaneous Locking and Incremental release  Incremental Locking and Incremental Release Prepared by R. Arthy, AP/IT
  • 80. (contd…)  Simultaneous and Simultaneous Release  Locking, execution and unlocking are applied atomically  Next phase begin only when the last phase competes successfully  Start and end locking ------> start and end of transaction ------ start and end of unlocking  The failure of one phase do not affect other phase Prepared by R. Arthy, AP/IT
  • 81. (contd…) Simultaneous Locking and Simultaneous Release Protocol Prepared by R. Arthy, AP/IT
  • 82. (contd…)  Incremental Locking and Simultaneous Release  Locking and execution phases are interleaved and precede the entire unlocking phase  Lock ------ process -------- lock ---- process ----- unlock  Deadlock Prepared by R. Arthy, AP/IT
  • 83. (contd…)  Simultaneous Locking and Incremental Release  Growing phase is atomic  Unlock phase is interleaved with execution phase  Locking ---- execution ------ unlock------ execution ------ unlock  Expensive to manage cascading than deadlock Prepared by R. Arthy, AP/IT
  • 84. (contd…)  Incremental Locking and Incremental Release  Execution phase is interleaved with both locking and release phase  Suffers from deadlock and cascading  Objective to minimize transaction waiting time Prepared by R. Arthy, AP/IT
  • 85. 4.4.2 Multigranularity Locking  Locking units are of different sizes  This diversity defines a hierarchy of lockable granularity  In this scheme a transaction Ti locks data items in a hierarchical manner in different locking modes  Use – transactions which access and modify large amount of data Prepared by R. Arthy, AP/IT
  • 86. (contd…)  Five different lock modes  Read  Write  Intention Read – IR  Intention Write - IW  Read Intention Write - IRW Prepared by R. Arthy, AP/IT
  • 88. (contd…)  Suppose a transaction Ti wants to read file3 and Tj wants to write to R32 . The execution Ti and Tj goes as follows  Ti intends to re4ad File3, which a node of the root database so it applies ir lock to database  It applies ir lock to Area1  Finally it applies a r lock to File3  Tj applies iw lock to database successfully Prepared by R. Arthy, AP/IT
  • 89. (contd…)  It applies iw lock to Area1 successfully  It cannot apply iw to File3 becase the lock conflicts with Ti’s lock r  Ti releases r from File3  Tj now sets iw on File3 and applies won R32  Tk wants to read Area1 so it successfully sets ir on database  It tries to set r lock on Area 1 but it conflicts with Tj’s lock (iw)  It waits for Tj to release its iw lock on Area 1 Prepared by R. Arthy, AP/IT
  • 90. 4.4.3 Heuristic Approach  Locking protocol – conflict occurs when the transaction requesting the same data item is blocked  Incremental Approach – Deadlock  Solution – Rollback – increases transaction waiting time  Solution – immediately rollback Prepared by R. Arthy, AP/IT
  • 91. a. Cautious Waiting  Improvement over Wound wait (WW) and Wait – Die mechanism  Conflict is resolved by rolling back / blocking one of the conflicting transaction  Rollback is down based on the transaction status  Rollback only when the holder is in a blocked state Prepared by R. Arthy, AP/IT
  • 92. (contd…)  Properties  It is non preemptive- it never aborts during the conflict  The wait – for graph can have a queue length greater than one  It is deadlock free  It can be optimized if in the conflict transaction, the amount of resource utilized by the conflicting transaction is taken into consideration Prepared by R. Arthy, AP/IT
  • 93. b. Running Priority  Blocks if the transaction of holder is running  Conflict transaction aborts (waits) – others continue Prepared by R. Arthy, AP/IT
  • 94. c. Krishna  Uses dynamic attributes of conflicting transactions to resolve conflict  Transactions during their execution life inherits a number of attributes  Example attributes: # of conflicts suffered by a transaction, # of entities locked by the transaction, duration the transaction waited for the desired data time,… Prepared by R. Arthy, AP/IT
  • 95. (contd…)  Dynamic attribute set can be represented as  DAS = {a1, a2, …  Conflicting resolution scheme  Computes priorities of conflicting transaction – uses this to resolve conflict  DASj = {a1, a2, …, an}  DASk = {b1, b2, …, bn}  Pj and Pk = priorities of Tj and Tk Prepared by R. Arthy, AP/IT
  • 98. 4.4.4 Non – Locking Based Schema  To lock or unlock an data item, detection of deadlock an preventing  a few thousand instructions have to be executed each time  To eliminate these overheads, timestamp based schemes were used Prepared by R. Arthy, AP/IT
  • 99. (contd…)  Simple timestamping scheme:  TS(Q)>TS(Ti) = transaction came too late and the access is not allowed  Rollback  Higher timestamp  Problem: can’t differentiate read and write locks Prepared by R. Arthy, AP/IT
  • 100. (contd…)  Basic Timestamping Scheme:  Each data items have two timestamp – to resolve read – write and write – write conflicts  RTS(Q) compared WTS(Q) Prepared by R. Arthy, AP/IT
  • 101. 4.4.5. Concurrency Control Mechanism  Need for maintaining database consistency  Mechanism  Locking – Based CCM  CCM Based on Epsilon Serializability  Relationship with ESR Prepared by R. Arthy, AP/IT
  • 102. a. Locking – Based CCM  Two – phase incremental locking and simultaneous release  Three different ways:  Centralized two – phase locking  Primary copy locking  Distributed two – phase locking Prepared by R. Arthy, AP/IT
  • 103. a. i. Centralized Two – Phase Locking  One node is responsible for managing all locking activities  Locking request traffic is very high – central node should be always available  In a mobile database system, this requirement limits the choice of central node Prepared by R. Arthy, AP/IT
  • 104. (contd…)  A mobile unit cannot be a central node because:  It is a kind of personal processing unit  It is not powerful enough to manage locking requests  It cannot maintain the status of data items  It is not fully connected to other nodes in the network  Its mobility is unpredictable Prepared by R. Arthy, AP/IT
  • 105. (contd…)  Base station is the next choice but there is problems related mainly with functionality issues  A fixed station is attached with the BS  Problem – Single point failure Prepared by R. Arthy, AP/IT
  • 106. a. ii. Primary Copy Two – Phase Locking  Eliminates a single point of failure  Each lock manager is now responsible fir a subset of data items  The node executing a part is the transaction sends lock request to appropriate lock manager  Problem – identifying suitable sited for distributing locking responsibility  Choice – BS or FH or both Prepared by R. Arthy, AP/IT
  • 107. a. iii. Distributed Two – Phase Locking  Maximized the extent of lock distribution  All nodes can serve as a lock manager Prepared by R. Arthy, AP/IT
  • 108. a (contd…)  Include separate database servers connected to base stations through wired network  Communication overhead for managing locking and unlocking requests is another problem Prepared by R. Arthy, AP/IT
  • 109. a. (contd…)  If a mobile unit makes a lock request on behalf of a transaction, it executed and then  It will send the request to lock manager site  The lock manager will decide to grant or to refuse the lock and send the result to the mobile unit  The mobile unit makes the decision to continue with forward processing or block or rollback depending upon lock manager’s decision Prepared by R. Arthy, AP/IT
  • 110. Distributed HP – 2PL CCM  Based on two phase locking and extension of HP – 2PL CCM  Uses conflict resolution scheme of caution waiting mechanism to reduce the degree of transaction roll – backs  Each BS – lock scheduler Prepared by R. Arthy, AP/IT
  • 111. Steps  On a conflict check the priority of the holder and the requestor  It Priority (Tr) > Priority (Th) then check the status of (Th). If (Th) is not committing then check if it is a local transaction  It (Th) is a local transaction then restart it locally  If (Th) is a global transaction the restart it globally  If (Th) is in committing process then it is not restarted rather the (Tr) is forced to wait until (Th) commits and releases all its lock  Adjust its Priority of (Th) as follows  Priority (Th) := Priority (Tr) + some fixed priority level  If Priority (Tr) <= Priority (Th) then block (Tr) until (Th) commits and release its locks Prepared by R. Arthy, AP/IT
  • 112. b. CCM Based on Epsilon Serializability  Tolerates limited amount of inconsistency  Based on two –tier replication scheme  Advantage – availability, accommodates the disconnection problem and is scalable  Reduces transaction commit time and number of transaction rejections  Metric space S is defined as a state space having the following properties”  Distance function dist(u,v)  Triangular inequality  Symmetry Prepared by R. Arthy, AP/IT
  • 113. (contd…)  BS can broadcast information to all the MUs I its cell  A central server holds and manages the database D = {Di}, i Є N and Di Є S  di – current value of the data object D  ni – number of replicas of Di in MDS  ∆ - amount of change can occur on each replica at each MU Prepared by R. Arthy, AP/IT
  • 114. Steps at a DBS  ∆i is calculated for each object Di  A timeout value r is linked with ∆i values of the data item  DBS broadcasts the values if (di, ∆i) for each data item and a timeout r for these values at the beginning of the broadcast cycle  The DBS either receives pre – committed transactions or can receive request transactions  The DBS serializes the pre – committed transactions according to their order of arrival Prepared by R. Arthy, AP/IT
  • 115. Steps at MU  MU has the value of (di, ∆i) and the timeout r for every data item Di it has cached  MU executes transaction ti. It changes the current value of Di by ∆i-ti.  The value ∆i-ti is added ∆i-e. The following cases are possible depending in the value of ∆i-ti and ∆i-e  If ∆i-ti <= ∆i and ∆i-e <= ∆i, then ti is committed at MU and it is sent to DBS for re – execution  If ∆i-ti <= ∆i and ∆i-e > ∆i, then ti is blocked at MU until new set of (Di, ∆i) is broadcasted by the server  If ∆i-ti > ∆i then ti is blocked at MU and submitted to the server as a request transaction Prepared by R. Arthy, AP/IT
  • 116. c. Relationship with ESR  The mechanism for maintaining ESR has two methods:  Divergence Control (DC)  Consistency Restoration (CR) Prepared by R. Arthy, AP/IT
  • 117. Mobile Database 4.5. Transaction Commit Protocol Prepared by R. Arthy, AP/IT
  • 118. Introduction  The entire process of commit has two phases:  Checking the intention of each node participating in the execution of a transaction  Collecting the intensions of participants and committing the transaction Prepared by R. Arthy, AP/IT
  • 119. Two – Phase Commit Protocol – Centralized 2PC  Assumption – a distributed database system with multiple nodes  Coordinator fragments Ti and distributes then to a set of participants  The coordinator may or may not keep the fragments for itself  The protocol makes sure of the following:  Participants’ decision  Decision change  Coordinator’s decision  No Failure  With failure Prepared by R. Arthy, AP/IT
  • 120. (contd…)  Steps:  Transaction fragmentation and distribution  Voting Phase  Voting  Participants’ vote  Decision Phase  Commit decision and dispatch  Participants decision Prepared by R. Arthy, AP/IT
  • 121. Node Failure and Timeout Action  Occurrences of infinite wait because of node failure  One scheme – timeout action  How long a participant to wait  Coordinator sent commit – reaches subset of participants  To handle immature abort by a timeout, cooperative termination protocol can be used Prepared by R. Arthy, AP/IT
  • 122. Cooperative Termination Protocol  Two options:  Ask the coordinator about its last message  Ask one of its neighbor participants  To evaluate the cost of communication, two parameters are used  Time complexity  Message complexity Prepared by R. Arthy, AP/IT
  • 123. Linear or Nested 2PC  In linear 2PC the message complexity is reduced by collecting votes serially Prepared by R. Arthy, AP/IT
  • 124. Mobile Database 4.6. Mobile Database Recovery Prepared by R. Arthy, AP/IT
  • 125. Log Management in Mobile Database Systems  Log is a sequential file where information necessary for recovery is recorded  Each log record represents a unit of information  The position of a record in the log identifies the relative order of the occurrences of the event the record represents  Property – Write Ahead Logging (WAL) Prepared by R. Arthy, AP/IT
  • 126. Where to Save the Log?  MSC  BS  MU Prepared by R. Arthy, AP/IT
  • 127. Logging Scheme  Centralized Logging – Saving of log at a designated site  Drawback  It has very low reliability  Logging may become a bottleneck  Home Logging  Drawback  Scattered over a number of base stations  It may not work for Location dependent data  Poor availability Prepared by R. Arthy, AP/IT
  • 128. (contd…)  At all visited base stations  Log is saved at the BS of the cell it is currently visiting  Lazy scheme  Pessimistic scheme  Logs are stored on the current BS and if the MU moves to a new BS, a pointer to the old BS is stored in the new BS  It has a large recovery time because it require unification of log portions Prepared by R. Arthy, AP/IT
  • 129. Mobile Database Recovery Schemes  Three – phase Hybrid Recovery Scheme  Low – Cost Checkpointing and Failure Recovery  A Mobile Agent – Based Log Management Scheme  Architecture of Agent – Based Logging Scheme  Interaction among agents for log management  Forward strategy  Forward Log Unification Scheme  Forward Notification Scheme Prepared by R. Arthy, AP/IT
  • 130. Three – Phase Hybrid Recovery Scheme Prepared by R. Arthy, AP/IT
  • 131. (contd…) Prepared by R. Arthy, AP/IT
  • 132. Low – Cost Checkpointing and Failure Recovery Prepared by R. Arthy, AP/IT
  • 133. (contd…) Prepared by R. Arthy, AP/IT
  • 134. A Mobile Agent – Based Log Management Scheme  Mobile agent is used  MA – is an autonomous program that can move from machine to machine in a heterogeneous network under its own control  Advantages of MA  Protocol Encapsulation  Robustness and fault – tolerance  Asynchronous and autonomous execution Prepared by R. Arthy, AP/IT
  • 135. Architecture of Agent – Based Logging Scheme  Components  Bootstrap Agent  Base Agent  Home Agent  Coordinator Agent  Event Agent  Driver Agent Prepared by R. Arthy, AP/IT
  • 136. Interaction Among Agents for Log Management  Interaction of CoAg and HoAg  Action of agent when handoff occurs Prepared by R. Arthy, AP/IT