mds_khazaei
TRANSCRIPT
Mobile Database SystemsMobile Database Systems
Hamzeh KhazaeiHamzeh KhazaeiMath & Computer Sc. Dep Math & Computer Sc. Dep
Amirkabir University of Amirkabir University of Technology, (Tehran Technology, (Tehran
Polytechnic)Polytechnic)[email protected]
Agenda
Mobile Database Systems, Intro Wireless Network Communication Location & Handoff Management Fundamentals of Database Technology Concurrency Control Mechanisms Data Processing & Mobility Transaction Management in MDS Mobile Database Recovery Wireless Information Broadcast
Mobile Database SystemsMobile Database Systems
Outline
Fully Connected Information Space Personal Communication System (PCS) Mobile Database Systems (MDS) Transaction Management Data Caching Query Processing Data Classification Conclusion
Mobile Database SystemsMobile Database Systems
Fully connected information spaceFully connected information space
Mobile Database SystemsMobile Database Systems
Fully connected information space
Each node of the information space has some communication capability.
Some node can process information.
Some node can communicate through voice channel.
Some node can do both
Mobile Database SystemsMobile Database Systems
Fully connected information space
Can be created and maintained by integrating
legacy database systems, and wired and wireless
systems (PCS, Cellular system, and GSM)
Mobile Database SystemsMobile Database Systems
A system with the following structural and functional properties
Distributed system with mobile connectivity
Full database system capability
Complete spatial mobility
Built on PCS/GSM platform
Wireless and wired communication capability
What is a Mobile Database System (MDS)?
Mobile Database SystemsMobile Database Systems
What is a mobile connectivity?
A mode in which a client or a server can establish
communication with each other whenever needed.
Intermittent connectivity is a special case of mobile
connectivity.
Mobile Database SystemsMobile Database Systems
A node in which only the client can establish
communication whenever needed with the server but the
server cannot do so.
What is intermittent connectivity?
Types of Mobility
Terminal Mobility
Types of Mobility
Personal Mobility
Terminal Mobility
It allow a Mobile unit (laptop, cell phone, PDA, etc) to access desired services from any location while in motion or stationary, irrespective of who is carrying the unit.
For example a cell phone can use of network service with owner or someone else.
In terminal mobility, it is the responsibility of wireless network to identify communication device.
Personal Mobility
A user dose not have to carry any communication equipment with him.
User can use any communication device for establishing communication with the other party.
This facility requires an identification scheme to verify the person wishing to communicate.
Each person has uniquely identified and can use any mobile device for communication. (example is the internet).
Wireless Network Communication
This part deal with architecture of cellular communication and identifies hardware & software component to build mobile database systems.
All wireless system use electromagnetic waves to propagate information from one place to another. (radio frequencies).
Use different frequencies for different purposes.
Cellular Communication
Geographical area divided to some slots that use RF to setup communication in each slots, this slots referred to as a cell.
The entire communication infrastructure is known as cellular communication.
The best coverage pattern is hexagons shapes, that no have uncovered space.
A cell must have a wireless component for managing the communication.
The transceiver is installed in the best place of cell.
Cellular Communication
Cellular Communication
In a cellular architecture a number of wireless and wired components are required to establish the desired point-to-point, point-to-multipoint communication.
One such component is the transceiver, which referred as Base Station (BS).
A BS functions under the supervision of telecommunication switch called Mobile Switching Center (MSC) and connected to it through wired line.
Cellular Communication
Structure of a Channel
In mobile discipline two frequencies are required to establish communication; one from mobile unit (MU) to Base Station (BS) (uplink channel) and inverse (downlink channel).
Downlink and uplink Channel
PCS & GSM
Personal Communication SystemEvolved in North America Support Digital and analogue
Global System for Mobile CommunicationEvolved in Europe Purely Digital
Personal Communication System (PCS)Personal Communication System (PCS)
Architecture Wireless communication Bandwidth limitations Frequency reuse
Part 1
Personal Communication System (PCS)Personal Communication System (PCS)
A system where wired and wireless networks are integrated for
establishing communication.
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
BS
MSC (MTSO)
MSMS Wireless component
Base Station (BS): A switch, which serves as
communication link between MU and the entire
network
Mobile Units (MU): Also called Mobile Systems (MS) or
Mobile Hosts (MH). A mobile component, which
communicates with BS through a limited number of
wireless channels.
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
Home Location Register (HLR): It’s a large database
which stores necessary information such as
geographical location of subscriber, call processing,
billing, service subscription, service restriction, etc. It
can be distributed database.
Authentication Center (AC): The AC is the processor
system, witch authenticate subscribers, AC needs to
access user information for authentication process so
its co-located with HLR, then the AC and HLR store in
MSC. The authentication steps as follows :
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
1- AC sends a random number to the mobile unit from
where the call originates.
2- Authentication algorithm stored in SIM (Subscriber
Identity Module) manipulates this random number using
a Subscriber Authentication Key, which is also stored in
SIM.
3- The result of this manipulation is sent to AC along with
an encryption key.
4- Concurrent with the authentication computation at the
mobile unit, AC performs identical computation using the
random number and information stored in HLR.
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
5- AC compares the result of its own computation and the
result received from the mobile unit. In the case of
successful comparison, it permits the subscriber to access
the network and stores and sends the encryption key to BS
to enable ciphering to take place.
Equipment Identify Register (EIR): it is a database which
stores information for the identification of mobile units. It
maintains a database of Electronic Serial Number which is
unique to mobile unit which prevent its theft and malicious
use.
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
Public Switched Telephone Network (PSTN) : This
component refers to the regular wired line
telecommunication network which is commonly
accessed by landline calls.
Integrated Service Digital Network (ISDN): It is a wired
line network which provides enhanced digital services
to subscribers.
Short Message Entity (SME): This is a part of the
System Message Service (SMS), which looks after text
messages.
Personal Communication System (PCS)Personal Communication System (PCS)
Wireless Components
Message Center (MC) : This unit stores and forwards
short messages to mobile destination. If the
destination is unavailable for any reason , it stores the
message for later dispatch.
Personal Communication System (PCS)Personal Communication System (PCS)
Limited channels must be utilized efficiently. It is done
so by
Frequency reuse
The same radio frequency is used for
communication by more than one cell
sessions.
Mobile cells
To achieve frequency reuse, the entire
wireless coverage area is divided into
cells.
Personal Communication System (PCS)Personal Communication System (PCS)
Mobile cellsMetropolitan area Metropolitan area
Coverage area in one cell Coverage area in three cells
BS
BSBSBase Station
Large cells.Low density
Small cells.High density
Smaller cells.Higher density
Personal Communication System (PCS)Personal Communication System (PCS)
Mobile cells
The entire coverage area is a group of a number of
cells. The size of cell depends upon the power of
the base stations.
PSTNMSC
Personal Communication System (PCS)Personal Communication System (PCS)
Frequency reuse
61
7
54
3
2
61
7
54
3
2
61
7
54
3
2
D A
AA
AA
AA
NR
D3
D = distance between cells using the same frequencyR = cell radiusN = reuse pattern (the cluster size, which is 7).
Thus, for a 7-cell group with cell radius R = 3 miles, the frequency reuse distance D is 13.74 miles.
Personal Communication System (PCS)Personal Communication System (PCS)
Problems with cellular structure
How to locate of a mobile unit in the entire coverage area?
Solution: Location management
How to maintain continuous communication between two parties in the presence of mobility?
Solution: Handoff
How to maintain continuous communication between two different service provider?
Solution: Roaming
Personal Communication System (PCS)Personal Communication System (PCS)
HandoffA process, which allows users to remain in touch, even
while breaking the connection with one BS and
establishing connection with another BS.
Old BS New BS
MSC
Old BS New BS
MSC
MSC
Old BS New BS New BSOld BS
MSC
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff
To keep the conversation going, the Handoff
procedure should be completed while the MS (the
bus) is in the overlap region.
G
Old BS New BS
Cell overlap region
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff issues
Handoff detection
Channel assignment
Radio link transfer
Personal Communication System (PCS)Personal Communication System (PCS)
Mobile-Controlled handoff (MCHO)
Network-Controlled handoff (NCHO)
Mobile-Assisted handoff (MAHO)
Handoff detection strategies
Personal Communication System (PCS)Personal Communication System (PCS)
Mobile-Controlled Handoff (MCHO)
In this strategy, the MS continuously monitors the
radio signal strength and quality of the surrounding
BSs. When predefined criteria are met, then the MS
checks for the best candidate BS for an available
traffic channel and requests the handoff to occur.
MCHO is used in DECT and PACS.
Personal Communication System (PCS)Personal Communication System (PCS)
Network-Controlled Handoff (NCHO)
In this strategy, the surrounding BSs, the MSC or
both monitor the radio signal. When the signal’s
strength and quality deteriorate below a predefined
threshold, the network arranges for a handoff to
another channel. NCHO is used in CT-2 Plus and
AMPS.
Personal Communication System (PCS)Personal Communication System (PCS)
Mobile-Assisted Handoff (MAHO)
It is a variant of NCHO strategy. In this strategy,
the network directs the MS to measure the signal
from the surrounding BSs and to report those
measurements back to the network. The network
then uses these measurements to determine
where a handoff is required and to which channel.
MACHO is used in GSM and IS-95 CDMA.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to the network
Intra-system handoff or Inter-BS handoff
The new and the old BSs are connected to
the same MSC.
Old BS New BS
MSC
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to the network
Intersystem handoff or Inter-MSC handoff
The new and the old BSs are connected to
different MSCs.
Old BS New BS
MSCMSC
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Hard handoff
The MU connects with only one BS at a time,
and there is usually some interruption in the
conversation during the link transition.
Soft handoff
The two BSs are briefly simultaneously
connected to the MU while crossing the cell
boundary. As soon as the mobile's link with
the new BS is acceptable, the initial BS
disengages from the MU.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Hard handoff
1. MU temporarily suspends the voice conversation
by sending a link suspend message to the old BS.
2. MU sends a handoff request message through an
idle time slot of the new BS to the network.
3. The new BS sends a handoff ack message and
marks the slot busy.
4. The MU returns the old assigned channel by
sending a link resume message to the old BS.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Hard handoff
5. MU continues voice communication while the
network prepares for the handoff.
6. Upon receipt of a handoff request message, the
new BS sends a handoff ack message and
reconfigures itself to effect the handoff.
7. The MSC inserts a bridge into the conversation
path and bridges the new BS.
8. Finally, the network informs the MU to execute the
handoff via both the new and old BSs by sending
the handoff execute message.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Hard handoff
9. MU releases the old channel by sending an
access release message to the old BS.
10. Once the MU has made the transfer to the new
BS, it sends the network a handoff complete
message through the new channel, and resumes
the voice communication. The network removes
the bridge from the path and frees up the
resources associated with the old channel.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Soft handoff
1. MU sends a pilot strength measurement message
to the old BS, indicating the new BS to be added.
2. The old BS sends a handoff request message to
the MSC. If the MSC accepts the handoff request,
it sends a handoff request message to the new
BS.
3. The BS sends a null traffic message to the MU to
prepare the establishment of the communication
link.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Soft handoff
4. The new BS sends a join request message to the
MSC. The MSC bridges the connection for the
two BSs, so that the handoff can be processed
without breaking the connection.
5. The new BS sends a handoff ack message to the
old BS via the MSC. The old BS instructs the MU
to add a link to the new BS by exchanging the
handoff command and handoff complete
messages.
Personal Communication System (PCS)Personal Communication System (PCS)
Handoff types with reference to link transfer
Soft handoff
6. The old BS and the MSC conclude this procedure
by exchanging the required handoff information.
The quality of the new link is guaranteed by the
exchange of the pilot measurement request and
the pilot strength measurement message pair
between the MU and the new BS.
Personal Communication System (PCS)Personal Communication System (PCS)
Roaming
Roaming is a facility, which allows a subscriber to
enjoy uninterrupted communication from anywhere in
the entire coverage space.
A mobile network coverage space may be managed
by a number of different service providers. They
must cooperate with each other to provide roaming
facility.
Roaming can be provided only if some administrative
and technical constraints are met.
Personal Communication System (PCS)Personal Communication System (PCS)
Roaming
Administrative constraints
Billing.
Subscription agreement.
Call transfer charges.
User profile and database sharing.
Any other policy constraints.
Personal Communication System (PCS)Personal Communication System (PCS)
Roaming
Technical constraints
Bandwidth mismatch. For example, European
900MHz band may not be available in other
parts of the world. This may preclude some
mobile equipment for roaming.
Service providers must be able to
communicate with each other. Needs some
standard.
Mobile station constraints.
Personal Communication System (PCS)Personal Communication System (PCS)
RoamingTechnical constraints
Integration of a new service provider into the
network. A roaming subscriber must be able
to detect this new provider.
Quick MU response to a service provider’s
availability.
Personal Communication System (PCS)Personal Communication System (PCS)
Location Management
Two-Tier Scheme
HLR: Home Location Register
A HLR stores user profile and the
geographical location.
VLR: Visitor Location Register
A VLR stores user profile and the current
location who is a visitor to a different cell that
its home cell.
Personal Communication System (PCS)Personal Communication System (PCS)
Location Management
Two-Tier Scheme steps. MU1 wants to talk to MU2.
MU1
MU2
Cell 1 Cell 2
Personal Communication System (PCS)Personal Communication System (PCS)
Location Management
Two-Tier Scheme steps. MU1 wants to talk to MU2.
1. VLR of cell 2 is searched for MU2’s profile.
2. If it is not found, then HLR is searched.
3. Once the location of MU2 is found, then the
information is sent to the base station of cell 1.
4. Cell 1 establishes the communication.
Personal Communication System (PCS)Personal Communication System (PCS)
Location Management
Two-Tier Scheme steps location update
1. MU2 moves from cell 1 to cell 2.
2. MU2’s location is changed so new location
must be recorded.
3. HLR is updated with the new location address.
4. MU2’s entry is deleted from the VLR of cell 1
and new entry is made in cell 2’s VLR.
Personal Communication System (PCS)Personal Communication System (PCS)
Location ManagementTwo-Tier Scheme steps location search
Location Search
1- The Caller dials a number, to find the called number (destination), 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 (source location server) for location discovery.
3- S-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 connection is set up.
4- If VLR search fails, then the location query is sent to HLR.
5- HLR finds the location of D-LS (Destination Location server)
Location Search
6- The search goes to D-LS7- D-LS finds the address of D-BS (destination
base station)8- Address of D-BS send to the HLR9- HLR sends the address of D-BS to S-LS
(source location server)10- The address of D-BS is send to the source
base station, which sets up the communication session.
Personal Communication System (PCS)Personal Communication System (PCS)
Location ManagementTwo-Tier Scheme steps location update
Location Update
1- The mobile unit moves to a new registration area which is serviced by a new location server (New LS). The mobile unit informs the new base station about it’s arrival.
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.
Location Update
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 send a message about this location update to the old LS. The old LS deletes the old location information of the mobile unit stored in its database.
10- the old LS sends a confirmation message to the HLR.
End of part one
Fundamentals of Database Processing
The types of DBMSCentralized
There is one node processing (server) and a number of intelligent terminals (client) connected to the server with wired network
DistributedA number of centralized database systems are
connected together with a communication network.
Fundamentals of Database Processing
The servers can be configured dependent or independent.
Homogeneous or heterogeneous.
Centralized DBMS
Distributed DBMS
Distributed DBMS
Based on : Node autonomy Data processing Distribution mode
There are two commonly known categories: Federated database system Multidatabase system
Federated architecture
Subset of servers are partially autonomous in managing their activities
They are member of federation and willing to cooperate and participate with other members (servers) under agreed protocols.
This federation can be homogeneous or heterogeneous.
example is a big company that have many department that each have their own server, and participate themselves to maintain the consist view of the entire company.
Multidatabase architecture
All servers have full autonomyIt’s up to server to cooperate or not with
any other server.
Database partition and distributionIn distributed database the database is distributed in
three ways: PartitionedThe entire database is distinctly divided into a number
of partitions.Some important criteria for partitioning:
Support highest database locality Minimize the cost of communication Minimize the cost of maintaining global consistency Minimize of recovery
Partial Replication
Database is partitioned and a subset of partitions is replicated at more than one servers.
Improve database locality and reliabilityThe recovery is easier than partitionedMore time consuming to maintain the
global consistency
Full Replication
The entire database is replicated at all servers
Maximum locality and minimize data communication cost
Highest reliability and availability Maximum cost of maintaining global
consistency. This schema not used reality, because of
higher consistency and storage cost.
Transaction
Transaction with it’s property preserve consistency of database.
Constraint can be implement in two ways:Programmed in the application codeIncluded in transaction structure
Flat Transaction
Is the simplest type of mechanism which support one level operation
During of their execution, they do not trigger other dependent transaction
It has for essential property:Atomicity (idempotent property of rollback)Consistency Isolationdurability
Advanced transaction model
For achieve :Increase the degree of parallelism in the
execution of long running transactionRedefine consistency to manage
statistical database transactionHandle failure cases in confined wayRedefine conflict scenarioAdvanced transaction necessary.
Nested transaction model
Nested transaction model
Sub transactions at the leaf are flat transaction which actually perform the necessary data processing
Parent does not manipulate any data, but invokes sub transactions and controls the flow of execution.
A sub transaction can be commit or rollback independent to other sub transactions or the parent of the tree.
A sub transaction has only A,C and I properties, because it’s durability depends only on its parent.
If the parent rolls back, then all its sub transaction must be rolled back.
Nested transaction model
Open nested transaction modelThe parent does not enforce restriction of
the execution, rollback, and commitment of its sub transactions.
The parent only invoke sub transaction, and the sub transactions executed independently to each other and also to the parent.
Closed nested transaction model
SAGA transaction model
SAGA based on compensation transaction and long running transaction.
A transaction can be divided into number of fine granularity transaction and chained together, then each fine transaction can execute independently.
It’s also possible to remedy (compensation) the malfunctioning of a single fine transaction without effecting others.
Each sub transaction correspond with the compensation transaction.
SAGA with ACID
SAGA allows other SAGAs to see the partial results of a transaction, as a result SAGA can not guarantee complete atomicity
Consistency and Isolation because of above property is not guaranteed
Durability is preserved because SAGA guarantees that the main transaction commits only when al its subtransaction are committed.
Cooperative transaction model
Cooperative transaction model
Transaction Group (TG):A TG is a parent for a number of cooperative
transaction, and supervises the activities of cooperative members.
It interact with other TGs with external protocols.Every TG its own version of a data item which is
not accessible to other TG.All cooperating member can access to this versionTG does not take part in data processingTG plays the role of server for its cooperating
transaction member.
Cooperative transaction model
Cooperative Transaction members:Operate under internal protocolThey are like client that issue reads and writes on
data items which performed by their TGTG can either process operation from client
process, refuse and queue for later processingSerialization of member is monitored by TGFlexibility in achieving serialization and purpose-
specific correctness criteria are of the contributions of cooperative transaction model.
Flex Transaction Model
This model is based on flat transaction Allow users to define their data processing
preferences The objective of this model is to minimize
ACID constraints to allow more flexibility in processing concurrent transactions.
A flex transaction T can be represent as 5-tuple (B,S,F,π,f). Each members describe as follows:
Flex Transaction Model
Concurrency Control Mechanisms
Concurrency Control Mechanisms
The available CCMs can be categorized into:Locking (2 phase locking)
Locking and un locking are atomic and mutually exclusive for transaction.
Non locking
Ways of locking data items
Simultaneous locking and simultaneous unlocking.
Incremental locking and simultaneous unlocking.
It can cause of deadlock
simultaneous locking and Incremental unlocking.
It suffer with cascading, which is serious time-consuming activity
Ways of locking data items
The objective is to minimize the transaction waiting. It suffer from deadlock and cascading, so it not use in
reality.
Non locking based schemes
TimestampIn this method the execution order is
defined before they begin their executionThe order of execution is established by
associating timestamp (integer) to every transaction
Simple timestamp schemeBasic timestamping scheme
Optimistic concurrency control
It tries to reduce locking overhead by delaying lock operation until conflicting of transactions are ready to commit.
It uses three phases: read, validate and write. Read: transaction read the desired data completely
unrestricted and save it in local cache Validate: in this phase it is determined that transaction will
not generate an inconsistent data and the result is correct Write: if the validation success, the transaction writes the
modified data to database, to be available for other transaction.
This approach replace lock overhead with rollback overhead in compare with 2PL.
Data processing and Mobility
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
How MDS looks at the database data?
Data classification
Location Dependent Data (LDD)
Location Independent Data (LID)
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
Location Dependent Data (LDD)
The class of data whose value is functionally
dependent on location. Thus, the value of the
location determines the correct value of the data.
Location Data value
Examples: City tax, City area, etc.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
The class of data whose value is functionally
independent of location. Thus, the value of the
location does not determine the value of the
data.
Example: Person name, account number, etc.
The person name remains the same irrespective
of place the person is residing at the time of
enquiry.
Location Independent Data (LID)
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
Location Dependent Data (LDD)
Example: Hotel Taj has many branches in India.
However, the room rent of this hotel will depend
upon the place it is located. Any change in the
room rate of one branch would not affect any
other branch.
Schema: It remains the same only multiple
correct values exists in the database.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
Location Dependent Data (LDD)
LDD must be processed under the location
constraints. Thus, the tax data of Pune can be
processed correctly only under Pune’s finance
rule.
Needs location binding or location mapping
function.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
Location Dependent Data (LDD)
Location binding or location mapping can be
achieved through database schema or through
a location mapping table.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
Location Dependent Data (LDD) Distribution
MDS could be a federated or a multidatabase
system. The database distribution (replication,
partition, etc.) must take into consideration
LDD.
One approach is to represent a city in terms of a
number of mobile cells, which is referred to as
“Data region”. Thus, Pune can be represented
in terms of N cells and the LDD of Pune can be
replicated at these individual cells.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Data Management Issues
In a data region the entire LDD of that location
can be represented in a hierarchical fashion.
County 1 data County 2 data County n data
City data
Subdivision 1 data Subdivision data Subdivision m data
Concept Hierarchy in LDD
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Query processing
Query types
Location dependent query
Location aware query
Location independent query
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Query processing
Location dependent query
A query whose result depends on the geographical
location of the origin of the query.
Example
What is the distance of LA railway
station from here?
The result of this query is correct only for “here”.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Query processing
Location dependent query
Situation: Person traveling in the car desires to
know his progress and continuously asks the
same question. However, every time the answer
is different but correct.
Requirements: Continuous monitoring of the
longitude and latitude of the origin of the query.
GPS can do this.
Effect of Mobility on ACID
Effect of Mobility on Atomicity:It is difficult to enforcement atomicity in
MDSTransaction logs are use for atomicity.In conventional system that logs find on
server easily.In MDS the logs not easy to access
because of disconnect mode of MU.
Effect of Mobility on Consistency
In conventional system there is only one correct value for each data object.
Mutually consistent state if all copies have the exact same value.
In mobile database the presence of location-dependent data defines two types of consistency:Spatial consistencyTemporal consistency
Effect of Mobility on Isolation and durability
In MDS ensure the isolation at the fragment level is enough.
Regional and global durability should be considered.
Effect of Mobility on commit
Transaction commitment not effected by mobility.
Because of location-dependent data, a location commit is defined.
A location commit binds a transaction commit to a region.
Example:Reserve 5 seats in a vegetarian restaurant
located 1 mile from here
Transaction Management in Mobile Database Systems
Transaction management in mobile database systems
PCS and GSM used for establish mobile database
Conventional ACID transaction model was unable to satisfactory manage mobile database because of following reason:Hands off, which unpredictableDoze mode of mobile unitDisconnected modeForce disconnectionLack of memory and channel resourceLocation dependent data
Mobile database systems
MDS provides full database and mobile communication functionalities. It allows mobile user to initiate transaction from any ware and at any time and guarantees their consistency preserving execution. In the any kind of failure (transaction, system and media), MDS guarantees database recovery
An MDS is a distributed multidatabse client/server system based on PCS & GSM
Architecture of MDS
Mobile database systems
Fixed Hosted (FH) are general purpose computers that interconnected through a high-speed wired network.
FHs are not fitted with transceiver, so they do not communicate with MU
One or more BSs are connected with a Base Station Controller (BSC) that coordinate the BSs to communicate BSs with FHs and DBS
To incorporate full database functionality, its necessary to incorporate DataBase Server (DBS) to PCS or GSM
DBSs are connected to the mobile system through wired line as separate nodes
Each DBS can be reached by any BS or FH A DBS communicates with a MU only through BSs
Mobile database systems
Three mode of mobile unit:Powered mode (not actively listening to the BS) Idle mode (doze mode – not communicate but
continuously listening to the BS)Active mode (communicating with other party,
processing data) The MDS has multiple DBSs, and a database
can be distributed by partition or by partial or fully replication.
Special replication must follow the constraints of location dependent and location free data
Different replication types
Transaction execution in MDS
Implements parallel processing by fragmenting a transaction into a number of subtransactions which are then executed at multiple nodes
The entire execution require a software modules called a coordinator
The coordinator must have Direct and continuous communication with other nodes Theoretically unlimited and continuous power and large
storage space High reliability and availability
So Between MU, DBS, FH, MSC and BS which one is suitable for coordinator?
Transaction Processing in MDS
A transaction in MDS can be initiated from a DBS or from MU or from both
It can be processed entirely at the MU or in the DBS or a combination of the two
If process entirely at one node, so coordinator have minor role in execution and commitment of the transaction
It is important to note that no other MUs should be involved in the execution of transaction
If an MU initiate transaction, at first check that if the transaction can be entirely executed locally (at MU), in this case the MU execute and commit transaction and send the update for install in server and finally send the result to the user
Transaction Processing in MDS
If it cannot be entirely executed at MU there are two options:Transfer required data items from DBSs to
MUMU get the desire data from BSSend the results to user and update to install in
serverNot require of coordinator servicesSignificant amount of communication overhead
Transaction Processing in MDS
Distribute transaction to a set of nodesThe MU divides the transaction into a number of
subtransactionsKeeps the subtransactions it can executeWith help of coordinator distribute the rest of
subtransactoins to a subset of DBSsThe current BS of the MU becomes the
coordinator of transaction and manage the execution leading either to a commit or abort
This schema generates less communication overhead and database update cost
Mobility and transaction execution
The mobility of MU make the job of coordinator difficult, following processing scenarios: Mobile Unit dose not move MU moves and the transaction entirely execute on MU, this
is quite common in mobile computing Distributed processing and MU moves, transaction
originates at a MU and is fragmented to MU and DBSs The service of coordinator must available
continuously during the execution of transaction This link may be broken when the MU crosses the
current cell boundary and enters a different cell
Mobility and transaction execution
The link can be maintain in two ways:Static method
Coordinator not changed, BS1 coordinate transaction with help of BS2
MU inform the new BS of its coordinator
Mobility and transaction execution
Dynamic methodThe role of coordinator moves with MU
The new BS informs all DBSs of the new coordinator
Mobile Transaction Model
Execution model based on ACID transaction framework:Execution Model with Reporting
TransactionTwo-Level Consistency ModelPro-Motion: Proactive management of
Mobile TransactionsPre-Write transaction Execution Model
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Mobile Transaction execution.
DBS4
DBS1
DBS3
DBS2
T2(e4, e5)
MU2
MU1 T1(e1, e2, e3)MU3
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Transaction fragments for distributed execution
Execution scenario: User issues transactions from
his/her MU and the final results comes back to the
same MU. The user transaction may not be
completely executed at the MU so it is fragmented
and distributed among database servers for
execution. This creates a Distributed mobile
execution.
Execution Model with Reporting Transaction
Based on Open-nested transaction A parent ACID transaction is set of
component transactions, where each component can be further fragmented in to a number of lower level components
Types of component transaction: Atomic transaction
It is an ACID transaction and can be compensated It can be commit before parent commit
Types of component transaction
Noncompensating component It is an atomic component but cannot be
compensated It delegate its updates to its parent transaction,
which handles the final commit Reporting transaction
Shares its update with the parent transaction at any time
Reports to other transaction by delegating some of its current result
Types of component transaction
Co-transactionLike reporting transaction but they can maintained
their execution state, suspend and resume This schema also identified component as
vital and none vital, a transaction commit if all vital component commit and all non vital component commit or successfully aborted
The reporting and Co-transaction components are responsible for all data modification
Execution Model with Reporting Transaction
Reporting component always execute on base station where co-transaction execute on MU
When a MU, running a co-transaction, moves and register with another BS, the corresponding reporting component also move to the BS and the communication between reporting and co-transaction remain active
Co-transaction get the most up-to-date values for data items
Reporting component receives update to install in the database
This model does not addressed location-dependent data processing issues.
Two-level consistency Model
A flexible execution model which considered data distribution as a part of the model
It created clusters of semantically related or closely located data which were dynamically configured
Data Cluster: A cluster is a set of data with a similar set of properties.
The model also allows mobile user to specify conditions for creating clusters
Useful for local computers who frequently access a well-defined set of data items
Mobile database MD={CL1,CL2, … , CLn}, CLi is a cluster.
Two-level consistency Model
Cluster consistency:There exist two kind of consistency:
Intra-cluster consistency: refers to consistency of data items of a cluster (local consistency)
Inter-cluster consistency: refers to data item consistency across the clusters similar to global consistency
The model defines weak transaction and strong transaction
Defines weak read and weak write and refers to the normal read as strict read and normal write strict write.
Two-level consistency Model
Strict write: it writes and leaves the database in a consistent state
Strict read: it read main database items which were written by the last strict writes
Weak write: Write local data (data in cluster). This data value becomes permanent only whit installed in the main database
Weak read: Reads local data (data in cluster) which is written by weak write
Two-level consistency Model
Weak transaction: a weak transaction is made up of only weak reads and writes
Strong transaction: a strict transaction is made up of only strict reads and writes
When a transaction is initiate with user, then it fragmented into a number of weak and strong transaction
Pro-Motion: Proactive management of Mobile Transactions
This model focuses on the issues introduced by disconnections and limited resources
The model manages the execution with the help of compacts and exploits object semantics for improving concurrency
Compacts: A compacts is an object which is composed of (a) cached data (b) cached data access method (c) information about the current state of the compact (d) rules of maintaining global consistency (e) obligations such as deadlines, and (f) an interface for the mobile unit to manage the compact
Compact object structure
Pro-motion Model
The server comes to an agreement with the mobile unit where a transaction is to be executed through a compact
MU provides its update through the compact The creation and removal of a compact is handled by
database server When the MU need data, then send the request to
server, after that, server creates a compact, initials with data and other necessary information, and send to MU
If there already exist compact then server update it.
Pro-motion Model
The transaction processing under Pro-Motion model has four basic step:Hoarding: the required compacts are prepared to
manage disconnected execution of transactionConnection execution: the MU connected to the
network and the compact manager processes transactions
Disconnected execution: the MU disconnected from the network, and compact manager processes transactions locally
Pro-motion Model
Resynchronization: the MU, after disconnected execution, is reconnected to the server and the compact agent reconciles local updates performed during disconnected execution with the server database
Mobile Transaction Model
HiCoMo: High commit Mobile transaction Model
Moflex Transaction ModelKangaroo Mobile Transaction modelMobilaction Model
HiCoMo: High commit Mobile transaction Model
The execution model is mainly for processing aggregate data stored in a data warehouse which resides in mobile units
Since the data warehouse resides in mobile units, HiCoMo transactions are always initiated on MU where they are processed in a disconnected mode
As a result transaction commitment are quite fast. The base database resides on the fixed network The structured of HiCoMo transaction is based on
nested transaction model.
HiCoMo: High commit Mobile transaction Model
It manipulated by transaction called base or source transactions. These transaction initiated at the fixed network.
This require that to install updates of HiCoMo transaction, they must be converted to source transactions.
This conversion is done by a Transaction Transformation Function
Moflex Transaction Model
Its based on Flexible transaction model, and a Moflex has 7 components and can be defined as Moflex transaction T = {M, S, F, D, H, J, G}
Moflex Transaction Model
If the parent subtransaction is compensable and processing location-dependent data, then the handoff rule forces the subtransaction to abort or restart in new cell. A restart can be split-restart where the value of the partial execution of the partial execution of the subtransaction in the last cell is preserved.
In the case of location-independent subtransaction, it further splits in finer subtransactions, the last subtransaction that occur in the last cell is free to commit.
Kangaroo Mobile Transaction Model
Presented which captured both data and the movement of mobile unit
The model based on a split transaction and enforce the ACID properties
A parent Kangaroo transaction, KT, is composed of a number of subtransaction, that each of them an ACID transaction, and called Joey Transaction (JT) and are local to a base station
Upon initiation of a Kangaroo transaction, a base station creates a JT for its execution
When the MU migrates to another cell, the BS of this cell takes control of the execution of this transaction
Kangaroo Mobile Transaction Model
A KT, when initiate by a MU, the initial BS immediately creates a JT with a unique identify and become responsible for its execution
When a MU encounters with handoff KT is split in two JTs, thus the mobility of a MU is captured by splitting a KT
This JTs executed sequentially, all subtransaction of JT1 are executed and committed before JT2’s
Mobileaction Model
A mobile transaction (MT) can be defined asTi is a triple <F, L, FLM>; whereF = {e1, e2, …, en} is a set of execution
fragments,L = {l1, l2, …, ln} is a set of locations, andFLM = {flm1, flm2, …, flmn} is a set of
fragment location mapping where j, flmi (ei) = li
Mobileaction Model
An execution fragment eij is a partial order eij = {j, j}
where
i = OSj {Ni} where OSj = kOjk, Ojk {read, write},
and Nj {AbortL, CommitL}.
For any Ojk and Ojl where Ojk = R(x) and Ojl = W(x) for
data object x, then either Ojk j Ojl or Ojl j Ojk.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
In MDS a transaction may be fragmented and may
run at more than one nodes (MU and DBSs). An
efficient commit protocol is necessary. 2-phase
commit (2PC) or 3-phase commit (3PC) is no good
because of their generous messaging
requirement. A scheme which uses very few
messages, especially wireless, is desirable.
Transaction commit.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Transaction commit.
One possible scheme is “timeout” based
protocol.
Concept: MU and DBSs guarantee to complete
the execution of their fragments of a mobile
transaction within their predefined timeouts.
Thus, during processing no communication is
required. At the end of timeout, each node
commit their fragment independently.
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Transaction commit.
Protocol: TCOT-Transaction Commit On Timeout
Requirements
Coordinator: Coordinates transaction commit
Home MU: Mobile Transaction (MT) originates here
Commit set: Nodes that process MT (MU + DBSs)
Timeout: Time period for executing a fragment
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Activities of MUh:
Protocol: TCOT-Transaction Commit On Timeout
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Protocol: TCOT-Transaction Commit On Timeout
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Activities of CO:
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
Activities of DBs:
Mobile Database Systems (MDS)Mobile Database Systems (MDS)
MDS Transaction Management
TCOT with Handoff:
Wireless information Broadcast
Wireless information Broadcast
Wireless information Broadcast
Data Dissemination ModeBroadcast Mode: in this mode the
broadcast server periodically broadcast most popular data on some wireless channel form which users can listen and, if necessary, download if required data. There is no uplink channel involved in this mode
Wireless information Broadcast
Data Dissemination ModeOn-Demand Mode: this mode allows a
client to request specific data which is not available in the current broadcast or may never appear in the broadcast. The client send the query for require data through an uplink channel
Wireless information Broadcast
Data Dissemination ModeHybrid Mode: in this mode, broadcast and
on-demand modes combined.
Wireless information Broadcast
Pull processPull process is user (client) oriented, the user
assume that the desire in the wireless space, and he pulls it by tuning the channel.
Its user friendly and provides interactive capability to users for accessing the information through query
In wireless data dissemination platform, the pull approach is resource-intensive. Separate channel for sending the query and get the response from server are required.
Wireless information Broadcast
Push processThe server broadcast data on one or multiple
channels. For example it can push weather info and traffic info on the separate channels.
Client depending upon their data requirements, tune the appropriate channel
Client can not send the specific query to the serverMessage indexing can be used for speed up
broadcast search
Wireless information Broadcast
Broadcast Disk
Wireless information Broadcast
Broadcast Schedule
Any Questions?