Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

UNIT-V

SYNCHRONIZATION
Introduction
• We know that the database management in mobile
computing have two components-
Database engine and synchronizer
• Generally a mobile DBMS facilitates Insertion,
Modification, and retrieval of data from local
database it also synchronize the change of records at
databases in remote central server.
• Data dissemination techniques describes how a
server or distributed mobile computing system
broadcasts data to Mobile devices.
Need for Synchronization
• Let us consider a PC is associated with mobile
device and this computer connected to the internet
which download applications and large files.
• Now consider the data at the computer is modified
at some instant, the disseminated data at the server
has changed at another instant, the data at mobile
device is also changed at another instant- the
changes are take place at one of the three ends at
different instants.
• There be a need to synchronize the data at three
ends.
Synchronization
• Data replication may done by copying the data from
• one place to another place
• one place to many other places
• many other places to many other places.
• The replicated data may be full copy or an partial
copy
Synchronization
• Full copy replication: Means that the full set of
data records replicates according to certain domain-
specific data format rules at the replicating devices
or systems.
• For Example A server having a set of 8 images with
resolution 640 × 640 pixels in the domain of a
mobile device, it can replicate and hoard with 160 ×
160 pixels when all 8 images copied, though with
the different resolution, then it is known as full copy
replication
Synchronization
• Partial Replication: A subset of the data set copied
according to certain domain specific rules at the
devices or systems.
• Partial replication should have consistency and do
discrepancy and all basic features of original data.
Synchronization
• The synchronization refers to maintaining data
consistency among the disseminated or distributed
data.
• Data consistency means if there is data
modification at the server then the modification
should reflect in the data with in the device within a
defined period.
• There are two ways of synchronization
1. One-to-many synchronization
2. Many-to-many synchronization
One to Many
• This type of synchronization is occurred in the
client server architecture. Here the server maintains
a synchronization server, it may separate accounts
of different users for that data.
• The synchronization server, synchronizes the data
and disseminates the copies to each and every
client.
Many-to-many
• Synchronization system have peer-to-peer
architecture.
• Each system is capable of pushing the data to other
systems as well as getting the data by sending pull
requests.
• Synchronization within mobile computing comes
under the many-to-many synchronization and it is
categorizes into five areas
Many-to-many
1) Synchronization in mobile computing systems.
2) Usage models for synchronization in mobile
computing environment.
3) Domain dependent specific rules for
synchronization.
4) Conflict resolution strategies
5) The use of synchronizer.
Synchronization in mobile
computing systems
• Process of maintaining the availability of data
generated from the source and maintaining
consistency.
• A consistent copy of data is a copy which may not
be identical to the present data record at the data
generating source, but must satisfy all the required
functions and domain dependent specific rules .
• The domain specific rules are in terms of resolution,
precision, data format, and time interval permitted
for replication.
Synchronization
• Synchronization also helps mobile users in hoarding the data at
the personal computer and vice versa.
Processes in data synchronization
• Synchronization between the server and device when the server
sends full copy.
• Synchronization between device as a data generating source and
server when device sends full copy.
• Synchronization between server and device when partial but
consistent copy stored at device and updated as soon as the copy
modifies.
• Same as above, but the modified copy at server need not be send
to the device on next transaction.
Types of synchronization
• Mobile device and service provider (server)
• Mobile device and personal computer or between the mobile
devices which are enabled Wi-Fi or Bluetooth.
Different synchronization categories

• Two way synchronization: Partial or full copies of data


are synchronized between device and server.
• Server alerted synchronization: when the data is
modified at server, then it generates the alerts to the
clients.
• One way server initiated synchronization: server
initiates synchronization. Now the server sends the
modified copy to the client.
• Refresh synchronization at client: client initiates the
synchronization with the server for refreshing its data.
Different synchronization categories
• Refresh from client for backup and update
synchronization: Here the client initiates the
synchronization and sends backup to the server for
updating its data.
• Slow (full data copy) synchronization: In this method
client and server data copies are compared field by field.
Usage Models for Synchronization
Four usage models employed for synchronization
1. Synchronization between two APIs with in a mobile computing
system:
The usage model for synchronization between two application
programming interfaces
Usage Models for Synchronization
2. Synchronization between the device and nearby local computer
or device connected through a wireless or wired network
This type of synchronization fall into to another usage model to
synchronize the data.
Usage Models for Synchronization
3. Synchronization between remote systems and device
The device data records synchronize with the mobile and
service provider server records and vice versa.
Usage Models for Synchronization
4. Synchronization between the device and remote system
through local computer
In this case the synchronization is happened between remote server and
mobile device through a local system.
Domain dependent specific rules
for data synchronization
• A mobile computing system consists of multiple
domains in which data synchronization takes place.
• Data in mobile device domain has different rules for
storage and usage compared with remote system.
• For example data in a system domain is identified
by alphabets maximum of 255 characters, and the
same data in mobile domain may identified with 8
bit number.
Domain dependent specific rules
for data synchronization
Domain specific rules for data synchronization
1. Data synchronization in domain specific
platforms and data formats.
2. Domain specific data property dependent
synchronization.
3. Synchronization up to last successful act of
synchronization.
4. Memory infrastructure dependent rule based
synchronization at two different domains.
5. Synchronization with temporal properties of data.
1) Data synchronization in domain
specific platforms and data formats

• Here data synchronization can takes place


between data generating domain and destined
domain, both have different platforms and
formats.
• For example, a database record at the device
may be in structured text or XML format and
its OS is Symbian.
• Now the record is synchronized with database
record at server where it can be in DB2 or
oracle format and its OS may be Windows.
2) Domain specific data property dependent
synchronization

• Data synchronization takes place one domain


with one data property and another domain
having different property.
• For example, a data record ID at the device is
specified in byte format, after the
synchronization the same record is specified in
16-bit word at the server.
• Another one is a device use 8-bit ASCII for ID,
while server uses 16-bit Unicode.
3) Synchronization up to last successful act
of synchronization
• One of the domain specific rule is the data
record is considered to be synchronized if it was
updated at the last connection.
• For example, the call log in phone has the
records of missed calls, dialed numbers, and
received calls.
• A data record at the access point is synchronized
with phone it was updated at the last connection,
then it eventually updated on the next
connection.
4) Memory infrastructure dependent rule
based synchronization at two different
domains
• Here the domain specific rule is the data records are
synchronized up to the allotted memory.
• For example, At the remote server data is
maintained in the allotted memory of 8 MB and a
device allotted 128KB only for that data.
• Thus only part of the data items can be
synchronized and saved at the device.
5) Synchronization with temporal properties
of data

• A domain specific rule that data records


synchronized within specific time interval and
within time specified by the domain.
• For example, certain data records are
synchronized every day, week or in a month.
Personal Information Manager
• Personal Information Manager is a software that manages the
data. Nowadays most of the smart phones have a specialized API
for PIM.
• The function of the PIM is, creation of data copies, updating,
replacement, addition and deletion of data records.
• The PIM is also responsible for sending of data to API and
receiving of data from another API, as well as sorting of the
records.
• PIM may also manages the data copies at the devices for user.
• The PIM API has several applications such as calendar, address
book, tasks to do etc..
Synchronization & Conflict resolution
strategies
• Conflict in synchronization arises when a data copy
changed at one end but not simultaneously modified at
other ends.
• Let the data items P and Q, in conflict during computation
in the time interval between t1 and t2, where t1 and t2 are
the instants when P and Q are modified.
Synchronization & Conflict resolution
strategies
Specifies the rules that need to be applied for
conflict resolution
1. Priority based resolution rule
2. Time based resolution rule
3. Information based resolution rule
4. Time stamp based resolution rule
5. User interaction based resolution
1) Priority based resolution rule
• Data-server can be specified as dominant higher
priority entity for conflict resolution of synchronized
data records.
• For example, let us consider mobile-service provider
server S having a list of missed, dialed, and received
calls for the device D.
• D has a synchronized list of missed, dialed, and
received calls.
• When the list at D in conflict with the list at S,
priority-based resolution rule specifies that the server
priority is higher.
2) Time based resolution rule
• Data node P specified as dominant entity when P
always receives copies first from the server S.
• For example, S having the emails circulated to the
device D at an instant t1.
• D connects to a personal computer (PC) to which
the device always synchronizes the mails at a later
instant t2.
• Time-based resolution rule specifies that D
dominant because it receives the mails earlier than
the PC.
3) Information based resolution rule
• Data node can be specified as dominant entity when
information specific to it is synchronized with other
nodes.
• For example, Server S having the device
configuration record distributed from the device D.
• Information-based resolution rule specifies that since
the information is for the device D hence D is
dominant node.
• For device-specific information, the device data
accepted rather than the server data.
4) Time stamp based resolution rule

• Timestamp-based resolution rule requires that a


time-stamp must be used while sending a data
copy.
• For example, Server S having the flight
information which it always distributes at
regular intervals with a time stamp over it to the
device D and as well as to a PC.
5) User interaction based resolution
• An API at a device allows a user to interact with the
device and this interaction resolves the conflict
arising out of the duplicate.
• For example, Two phone number entries found for
same name and address, the device prompts user to
resolve the conflict, user resolves the conflict by
opting for one of it.
Synchronizer
• Synchronizer is a software tool for
synchronization. It resides at the host.
• If the synchronizer host is a server then it is called
synchronization server.
• Synchronizer is configured as per specified
domain dependent and conflict resolution rules.
• Synchronizer finds any data item or record
appended at the data set.
• The synchronizer discovers modifications with
respect to the last action of synchronization on
specified data copies Which has been deleted,
added, or modified.
Mobile Agent
• Mobile agent is a composition of computer
software and data which is able to migrate (move)
from one computer to another autonomously and
continue its execution on the destination
computer.
• A Mobile Agent, namely, is a type of software
agent, with the feature of autonomy, social
ability, learning, and most significantly, mobility.
Mobile agent architecture
Mobile agent characteristics
1. Mobility of code and data from one computing
system (host) to another.
2. Ability to learn in order to adapt code and data to
the host computing system.
3. Ability to clone, extend, or dispose itself after its
role finishes.
4. Compatibility to the hosts.
5. Ability to continuously and autonomously process
requests and send responses and alerts.
Advantages of mobile agents
1.Parallel processing -asynchronous execution on
multiple heterogeneous network hosts.
2.Reduces compilation time.
3.Dynamic adaptation - actions are dependent on
the state of the host environment.
4.Tolerant to network faults - able to operate
without an active connection between client and
server.
5.Flexible maintenance - to change an agent's
actions, only the source (rather than the
computation hosts) must be updated.
Advantages of mobile agents
• The connection protocol and the connecting
network between host and source are immaterial.
• The main objective of mobile agents is application
virtualization environment. An agent may have
strong or weak mobility.
• An agent may also have migration and collaboration
latencies. Migration latency means the waiting
period in migrating from one host to another.
• Collaboration latency means waiting period in start
of collaboration between application server and
service requesting system.
Aglets
• Aglet is a Java base agent. Java is a mobile
agent platform and library which are used for
building applications based on mobile agents.
• An aglet can move autonomously and
spontaneously and its code can move from one
host to another.
• Aglet code can able to execute on remote host
and it adopt the behavior according to the host.
• Java security classes are used to provide security
to the aglets.
Application Server
• Application server (AS) is a software which
executes on server computer.
• The application server implements application level
logic for business functions.
(a)Establishing connection between mail APIs
(application program interfaces) and mail server.
(b)Updating mails by inserting, adding, replacing, or
deleting.
(c)Querying for the mails.
(d)Terminating the connection between the API and
the mail server.
Application Server
• The following are different functions exhibit by
the application server.
1)It provides application services and runtime
environment.
2)It handles presentation services to the systems
(clients) for this purpose it maintains a separate
database records.
3)An application server itself integrates with
backend databases and systems.
The following diagram shows N tire
application server

You might also like