Mobcomp Unit3
Mobcomp Unit3
Mobcomp Unit3
Database hoarding may be done at the application tier itself. The following figure shows a
simple architecture in which a mobile device API directly retrieves the data from a database. It
also shows another simple architecture in which a mobile device API directly retrieves the data
from a database through a program, for ex: IBM DB2 Everyplace (DB2e).
Both the two architectures belong to the class of one-tier database architecture because the
databases are specific to a mobile device, not meant to be distributed to multiple devices, not
synchronized with the new updates, are stored at the device itself. Some examples are
downloaded ringtones, music etc. IBM DB2 Everyplace (DB2e) is a relational database
engine which has been designed to reside at the device. It supports J2ME and most mobile
device operating systems. DB2e synchronizes with DB2 databases at the synchronization,
application, or enterprise server.
The database architecture shown below is for two-tier or multi-tier databases. Here, the
databases reside at the remote servers and the copies of these databases are cached at the client
tiers. This is known as client-server computing architecture.
A cache is a list or database of items or records stored at the device. Databases are hoarded at
the application or enterprise tier, where the database server uses business logic and connectivity
for retrieving the data and then transmitting it to the device. The server provides and updates
local copies of the database at each mobile device connected to it. The computing API at the
mobile device (first tier) uses the cached local copy. At first tier (tier 1), the API uses the cached
data records using the computing architecture as explained above. From tier 2 or tier 3, the
server retrieves and transmits the data records to tier 1 using business logic and synchronizes
the local copies at the device. These local copies function as device caches.
The advantage of hoarding is that there is no access latency (delay in retrieving the queried
record from the server over wireless mobile networks). The client device API has instantaneous
data access to hoarded or cached data. After a device caches the data distributed by the server,
the data is hoarded at the device. The disadvantage of hoarding is that the consistency of the
cached data with the database at the server needs to be maintained.
Data Replication in Mobile Computing
Data Replication
Data Replication in mobile computing means the sharing of information to ensure data
consistency between software and hardware resources connected via the internet, to improve
reliability, availability, fault-tolerance, and accessibility of data.
In simpler terms, data replication is the process of storing different copies of the database at
two or more sites in order to improve data availability in less time and at a cheaper cost.
Data replication in mobile computing is a popular fault tolerance technique for distributed
databases.
In modern mobile computing, scenario data replication has been adopted as an efficient way
to ensure data availability, integrity, and an effective means to achieve fault tolerance. Data
replication not only ensures the availability of the data but also minimize the communication
cost, increase data sharing, and enhance the security of sensitive data. Data replication in
mobile computing also determines when and which location to store the replica of data,
controlling different data replicas over a network for efficient utilization of the network
resources.
1. Synchronous Replication
In synchronous replication, the replica of the database is modified immediately after changes
are made in the relation table.
So there is no difference between the original data and the replicated data table.
2. Asynchronous replication
In asynchronous replication, the replica will be modified after commit action is fired on to the
database.
Replication Schemes
In full replication scheme, the database is available at all the locations to ease the user in the
communication network
It gives high availability of data. In this scheme, the database is available at each location.
It supports faster execution of queries.
2. No Replication
Disadvantages of no replication
3. Partial replication
A partial replication scheme means only part of the or data fragments are replicated.
20
19 18
Figure 3: System topology
Figure 4: Clustering