You are on page 1of 8

Transaction Processing in a Mobile Computing Environment with Alternating

Client Hosts*

Sven Buchholz, Thomas Ziegert and Alexander Schill Albert Held


Department of Computer Science DaimlerChrysler
Dresden University of Technology Research & Technology Ulm
sb15@ibdr.inf.tu-dresden.de albert.held@daimlerchrysler.com
{ziegert,schill}@ibdr.inf.tu-dresden.de

Abstract e.g. by phone. Now he collects related information from


product and production databases on the fixed network.
Previous research in mobile data management has Therefore, he starts a distributed transaction on the
been focused on scenarios where mobile clients replace workstation (a fixed host) in his office. However, the
fixed ones. However, not all potential application fields of information found may not be sufficient to solve the
mobile computing fit into this scenario. There exist problem. So the engineer will typically decide to move to
scenarios where mobile clients will not replace but the manufacturing site to have a close look at the problem
accompany fixed ones. In this paper we introduce a real and to have a talk with the involved workers. As a result
world application scenario requiring the capability to of this he is able to solve the problem and – after
process a transaction from alternating, potentially mobile returning to the office – adapt the information in the
client hosts. With this scenario in mind we have developed databases and commit the transaction.
three approaches supporting multiple clients in Our target is to supply this scenario with an IT support
combination with a so called TXAgent, an object in the for the engineer while being mobile. Therefore, the
fixed network, which manages transactions on behalf of engineer is equipped with a mobile host connected to the
the client and the approach to realise the client as a fixed network by wireless LAN. Thus, the future pattern
migrating object. Finally we present a prototype of work could look like this: After being notified about a
implementation of the most promising approach. problem the engineer starts a transaction on his fixed host
to retrieve information (fig. 1 (1)). When the engineer
decides to move to the manufacturing site he takes his
1. Introduction mobile host (fig. 1 (2)). At the manufacturing site, he
Previous research in mobile data management has been
resumes the transaction he has started on the fixed host
focused on the delivery of information from fixed data
before (fig. 1 (3)). This means he gets exactly the same
servers to mobile clients, considering a scenario where
mobile client hosts replace fixed ones. There exists a
number of applications which fit into this scenario, e.g. base station database
accessing a customer database by a travelling salesman.
However, not all potential application fields for mobile
computing correspond to this scenario. There is a large 3
fixed network 1
number of applications imaginable, where a mobile client
host does not replace but accompany the fixed client host.
The approach presented in this paper is based upon one of 2
these applications.
The goal of our approach is the provision of a support mobile host fixed host
platform for mobile database access in the industrial pilot
lot manufacturing. Nowadays a typical pattern of the
Figure 1. Resuming a transaction, started on the
engineers work looks like this: Our engineer gets notified
whenever a problem arises in the manufacturing process, fixed host, on the mobile host

*
This material is based on work supported by the BMBF under grant number 01BK604/8. The content of this material is in the
responsibility of the authors.

-1-
view of the execution state on the mobile host which he transaction by the engineer may last up to several
has left on the fixed host and all future database queries hours in our scenario.
within the same transaction will be submitted from the Certainly, long lived transactions are not a problem
mobile host. Thus, he is able to collect additional restricted to mobile computing. The problem has been
information from the databases, find a solution in co- discussed in different fields of transaction processing,
operation with the workers, and update the databases e.g. workflow management or co-operative editing,
directly from the manufacturing site. After completing his e.g. Sagas [4] or Split-Transactions [8] were
work at the manufacturing site the engineer may decide to developed to minimise the blocking probability of
commit the transaction directly on the mobile host or resources (e.g. databases) by long-lived transactions.
return to the office to resume the transaction on the fixed However, all these approaches do not realise
host and eventually commit it. transactions with ACID (atomicity, consistency,
It is imaginable that the mobile host completely isolation, durability) properties. They apply weaker
replaces the fixed one so that all processing is done from constraints of consistency. That is why we do not
the mobile host (also in the office), even in applications consider special mechanisms coping with long lived
like the described one. However, our approach to process transactions but present an approach that handles
a transaction from alternating client hosts - a fixed one in ACID transactions. However, we assume that even
the office and a mobile one on the move - is more transaction models with weaker constraints of
convenient and the user benefits from the more powerful consistency will work in our approach.
resources of a fixed workstation for the processing which • lack of reliability of the mobile host and the wireless
is done in the office. link
It seems reasonable that concepts proved successful
for distributed transaction processing in fixed
2. Requirements networks are applicable to distributed transactions
There are a lot of special requirements of transaction with a mobile client as well – as long as the client
processing resulting from the presented scenario. These remains connected. However, common weaknesses of
arise from the mobility of the client hosts in general as the protocols may even get more problematic due to
well as from the special issues of alternating client hosts. the potential unreliability of the mobile host as well as
However, not all of the commonly discussed the wireless link.
requirements due to the mobility of client hosts do really For example, the unreliability of the master process
apply to our scenario. In our application scenario co-located with the client on the mobile host or of the
mechanisms for disconnected operation are less link between the master and the data resources as
important, because we assume that the mobile host will be participants in a two phase commit protocol may lead
reachable anytime in the industrial environment. So we do to a significantly higher blocking probability of the
not consider special mechanisms for disconnected data resources. To avoid this problem a solution for
operation. Furthermore do the issues of location commitment control in a mobile computing
awareness1 not apply to our scenario, because the mobile environment should place the commit master process
host is attached to the fixed network by a wireless LAN, on a host in the fixed network.
which is considered to cover a single location.
Other general requirements of transaction processing Beyond the general requirements of transaction
with mobile client hosts are relevant in our scenario. processing caused by the mobility of the client host there
These are: arises a special requirement from the presence of
• long-lived transactions alternating client hosts (this means a transaction is started
Beside the problem of disconnection especially the on one host and later resumed on another one). Common
fields where mobile computing is used may lead to a approaches assume, that there is only one client accessing
long duration of transactions. The processing of a data resources within a transaction. Therefore, the client
keeps the context information of the transaction. To
satisfy this constraint while using alternating client hosts,
1
the client must be realised as a mobile object, which will
Location awareness means that the application on the be able to migrate to the new client host. However, this
mobile host is aware of the mobility of the host. Thus, a approach requires an extensive system support allowing a
location change is not transparent to the application.
transparent migration of both the client object and all
Location awareness concerns the access to location
dependent data and location dependent permissions as well context information.
as adoptions to the location dependent performance of
remote resource access.

-2-
3. Approaches for transaction processing by
alternating clients supported by an agent
client agent server
on the fixed network
To avoid the need of an extensive system support for
transparent migration of both the client object and all
context information we suggest to discard the one-client Figure 2. Client-Agent-Server-Model (from [6])
approach and introduce an approach coping with multiple
clients. Whenever the user wants to alter the client host a client and therefore, the client holds the execution
new client instance is created on the new client host. state of the transaction. When the client host changes,
Afterwards, this new client gets the current execution it is in the clients responsibility to transfer the
state of the transaction transferred by the old client and execution state of the transaction from the old client to
resumes the transaction processing. the new one. Consequently, a failure of the client leads
The context information is not managed by the clients, to a loss of the execution state and the transaction
but by an object residing on a host in the fixed network, must be rolled back.
e.g. the engineers workstation in our application scenario. Approach 2: A TXAgent that keeps the execution
We call this instance Transaction Processing Agent state of the transaction in
(TXAgent). combination with stateless clients
The TXAgent approach prevents the transfer of context In this model the whole transaction processing is
data between host. Moreover, the TXAgent can act as the task of the TXAgent. Thus, the TXAgent is the only
proxy acting on behalf of a client within the fixed instance keeping a copy of the execution state of the
network. This is encouraged by the fact, that the TXAgent transaction. Consequently, the TXAgent plays the role
is more reliable than a client on a mobile host and allows of a transactional client.
therefore the utilisation of conventional infrastructures for The actual client on the client host provides the
database and transaction processing, which commonly not user interface. All interactions of the user are
support applications with mobile nor alternating clients. propagated to the TXAgent, that does the necessary
The TXAgent has at least the following two processing and transmits the view of the new state to
responsibilities: the client. Thus, this approach may result in a high
1. The TXAgent routes all queries from a client to the amount of messages exchanged between a client and
data resources. This means, that all communication the TXAgent and delays in the interactivity.
takes an indirect way via the TXAgent. This is also Approach 3: Replicated copies of the execution
called Client-Agent-Server-Model (fig. 2). Complex state of the transaction kept by the
queries may be decomposed in single queries to client and the TXAgent
different resources by the TXAgent. Afterwards, the This hybrid model combines the advantages of the
results of the sub-queries are reassembled and the other approaches. The transaction processing is done
result of the complex query is passed to the client. by the client, which keeps the execution state of the
Thus, the distribution of the data resources is transaction. However, the TXAgent holds a replica of
completely hidden from the client. this execution state. Thus, a failure of the client does
2. Moreover, the TXAgent manages the transaction.
This includes the control of the commit protocol client TXAgent client
between the TXAgent and the data resources on the (old) begin
(new)
fixed network. The TXAgent as well as the resources
participating in the commit protocol are located on
the fixed network, so the TXAgent may utilise an checkpoint
transaction service proven successful for distributed
transactions without mobile participants, e.g. checkpoint registration
X/Open DTP or the CORBA transaction service.
Different models of partitioning the responsibilities checkpoint
between the TXAgent and the client are conceivable:
Approach 1: A TXAgent without a copy of the checkpoint
execution state of the transaction
In this model the responsibilities of the TXAgent
are restricted to the above mentioned interaction with commit
the data resources and the management of the
transaction. The transaction processing is done by the Figure 3. Resume the transaction at the state
of the last checkpoint

-3-
not necessarily lead to a rollback because a new client TXAgent has to integrate the result of the operation
may resume the transaction with the TXAgents copy of into its copy of the execution state. Executing
the execution state. idempotent operations updating the TXAgents copy of
However, the copy of the execution state of the the execution state is not mandatory but we highly
transaction kept by the TXAgent is not updated every recommend to use the communication between the
time the client copy of the execution state changes but client and the TXAgent, which is necessary for the
only at certain points in time, so called checkpoints. operation call anyway, to transfer the execution state
This reduces the number of messages exchanged in a piggyback manner to the TXAgent. Hence, any
between the client and the TXAgent. Thus, after a operation call leads to an implicit checkpoint.
failure of the client a new client cannot resume the Moreover, the client may issue checkpoints explicitly
transaction at the current execution state but at the to prevent the loss of changes.
state of the last checkpoint (fig. 3).
To avoid inconsistencies between the copy of the
execution state kept by the TXAgent and the state of 4. Comparison of the different approaches
the data within the resources (e.g. databases) the copy Table 1 shows a comparison of the three approaches
of the execution state must reflect at least the results with a TXAgent as described above and the approach with
of all successful completed non-idempotent a client migrating from one client host to another. The
operations. Therefore, the client has to transfer the criteria for the comparison we have chosen are: the
current execution state to the TXAgent with any problem of commitment control, that may be done by the
request for a non-idempotent operation. Moreover, the client itself but only after migrating onto a fixed host or

Table 1. Comparison of the different approaches

one migrating approach 1 approach 2 approach 3


client

commitment by the client after by the TXAgent on by the TXAgent on by the TXAgent on
control migration onto a the fixed network the fixed network the fixed network
fixed host

coping with transaction inquire the result (exceptions caused by inquire the result
exceptions during rollback from the TXAgent faults on the fixed from the TXAgent
operation calls network only – then
(e.g. by call repetition) (e.g. by call repetition)
transaction rollback)

local processing possible possible impossible possible


during
disconnections (until the next data (until the next data (until the next
resource access) resource access) checkpoint)

transfer of the by migration direct transfer no need to transfer indirect transfer


execution state between clients between clients
of the transaction (execution state is kept
by the TXAgent)

coping with transaction transaction resume the resume the


failures of rollback rollback transaction with a transaction with a
the client new client in the new client in the
current execution execution state saved
state at the last checkpoint

-4-
by the TXAgent on the fixed network on behalf of the To sum up approach 3 is the most suitable one for our
client; how to cope with exceptions during operation calls application scenario. Therefore, we selected this approach
caused by failures of the communication link; whether or for the prototype implementation presented in the next
not the whole processing must be suspended during section. The applicability of approach 2 depends on the
disconnections; how to transfer the execution state of the efficiency of the underlying communication subsystem. In
transaction between client hosts; and finally how to cope conjunction with a suitable communication subsystem this
with failures of the client. approach might be appropriate as well.
Because the client might be situated on a potentially
unreliable host, one has to assume that failures of the
client are frequent compared with an application on a 5. Prototype implementation
fixed host. Therefore, an appropriate solution should To demonstrate the applicability of approach 3 a
allow one to resume a transaction even when a failure of prototype implementation has been developed. The
the client occurs. That is why the approach with one implementation has been realised using the Java
migrating client as well as approach 1 is not suitable for Programming Language. We used the Java Remote
our application scenario because the only instance Method Invocation (RMI) for the remote communication
keeping a copy of the execution state of the transaction is between client and TXAgent. Because Java RMI offers
the client itself and, therefore, a failure of the client only maybe failure semantics and under the conditions of
implies a transaction rollback. potentially long lasting disconnections, we implemented a
In the other approaches at least a copy of the execution call repetition mechanism in conjunction with duplicate
state is kept by the TXAgent on the fixed network. elimination to ensure that every call is executed exactly
Because we assume failures on the fixed network and, once. Failures of the TXAgent, however, are treated by a
thus, failures of the TXAgent are rare, a transaction transaction rollback. The execution state of the transaction
rollback is acceptable when the TXAgent fails. is represented as a serialisable object, accumulating all
Considering the criteria of table 1, approach 2 seems to data manipulated within the transaction. Due to this fact
meet our requirements. There is a little disadvantage: the execution state can be transferred between client and
disconnections force the application to suspend also the TXAgent as a parameter of a remote method invocation.
local processing. But we assume disconnections as a very Figure 1 shows the basic architecture of the prototype
rare event in our target scenario, so this might be implementation. The potentially mobile and unreliable
acceptable. However, there is another problem the client hosts are the part of the application the user is
approach inherently suffers from: every user interaction, directly interacting with. These are View and Controller
e.g. a key press or a mouse click, causes communication forming the graphical user interface and the Client, which
to pass the event to the TXAgent. Afterwards, the TXAgent is the model, in the means of the Model-View-Controller
manipulates the execution state corresponding to the user design pattern. According to approach 3 presented in
interaction and propagates the view of the new state to the section 3 the Client keeps a copy of the transactions
client. This implies not only a high amount of messages execution state. Operations on this state which can be
exchanged between client and TXAgent, moreover any executed locally on the client host are executed by the
delay of the communication link directly influences the Client. Moreover the Client initiates database access
interactivity of the application (response time). It is in operations on the TXAgent. However, the Client does not
doubt whether or not this kind of application meets call the operations on the TXAgent directly but via a proxy
ergonomic requirements. of the TXAgent located on the client host. This TXAgent
Approach 3 is comparable with the approach with Proxy converts the calls of the client into RMI calls on the
stateless clients considering the criteria of table 1. Only TXAgent and handles RMI exceptions by call repetition in
the circumstance that the transaction cannot be resumed in conjunction with duplicate elimination transparently for
the up-to-date execution state but in a potentially outdated the Client.
one, the one of the last checkpoint, is a little drawback of The reliable agent host hosts the TXAgent. It keeps a
this approach. However, this may be compensated by replicated copy of the execution state of the transaction,
explicit checkpoints initiated by the client. On the other converts database access calls of the client into calls on
hand, this approach allows the continuation of the local the Resource Adapter, and passes the results via the
transaction processing while disconnections. The major TXAgent Proxy back to the Client. Furthermore it
advantage, however, is that the amount of messages is integrates the results into the TXAgents copy of the
considerable less compared to the approach with a execution state. The Resource Adapter is introduced to
stateless client as user interface. This results from the hide the resource distribution and the access method.
delayed update of the TXAgents copy of the execution Moreover it is responsible for the management of
state at a checkpoint. distributed transactions.

-5-
client host agent host

execution execution
state execution execution state
output View state state

TXAgent
Proxy
TXAgent
Client execution
input Controller state

Resource
Adapter

database database
Figure 4. Basic architecture of the prototype implementation
TXAgents – each assigned with a single transaction – updated so that a new client gets the current execution
are generated by a TXAgent Factory (located on the agent state (fig. 7).
host but not shown in fig. 4) on demand of a client To enable access control for clients connecting with a
application. On this occasion, an initial execution state is TXAgent the TXAgent stores the proved identity of the
created by the TXAgent. Moreover, the new TXAgent is user associated with the client application that creates the
registered with a directory service realised as a RMI TXAgent. Whenever a new client requests to be registered
registry. Afterwards, the client may register with the with a TXAgent it presents the proved identity of its user.
TXAgent and receive the initial execution state by the If the identity does not match the identity of the user that
TXAgent. has created the TXAgent the request is rejected. Due to
When the user wants to change the client host he starts this mechanism the security gap in this approach is
a new client application on the new client host. After that, closed.
the new client locates the TXAgent using the directory Within the prototype implementation no databases
service and contacts it to get the current execution state of managed by DBMS systems are used as data resources.
the transaction. If an old client is still registered with the Instead, we simulate the resource access by objects in the
TXAgent, the TXAgent asks it for the current execution execution environment of the Resource Adapter.
state. Implicitly, the old client is deregistered (fig. 5). Moreover, these resource objects do not implement
When the old client is unreachable, after a timeout period mechanisms to make any persistent changes of the data.
the TXAgent assumes that the old client has failed and Protocol mechanisms for commitment control are realised
claims its copy of the execution state as the valid one. by the Resource Adapter itself. However, the
Consequently, the TXAgents copy of the execution state is implementation is open to integrate a transaction service
transferred to the new client (fig. 6). If a client ends conforming to the CORBA transaction service
before it has been replaced by a new one, it explicitly de- specification with minor adoptions.
registers itself with the TXAgent. At the same time the
copy of the execution state kept by the TXAgent is
client TXAgent client
client TXAgent client (old) Checkpoint (new)
(old) Checkpoint (new)
s1
s1
state of work? registration execution state
state of work? registration execution state

deregistration
s2 timeout
s2
s1

Figure 5. The old client is active when it is replaced Figure 6. The old client is unreachable when it is
replaced

-6-
to extend the TXAgent by the mobility feature. Unlike the
client TXAgent client Kangaroo Transaction approach, that assigns one DAA
(old) checkpoint (new) with one base station or one network domain, and the user
s1 agent approach of [9], that assigns one user agent with
deregistration one mobile host, our approach assigns one TXAgent with
execution state
one transaction.
s2
registration
7. Summary
s2 In this paper we have investigated transaction
processing from alternating, potentially mobile hosts to
allow mobile hosts to accompany instead of to replace
Figure 7: The old client is shut down before it is fixed ones as client hosts for the purpose of transaction
replaced processing. Proceeding from a real world application
scenario we have developed three different approaches
applying multiple clients in conjunction with an instance
on the fixed network, the TXAgent, managing the
6. Related Research transaction on behalf of the client. Furthermore we have
To our knowledge previous research has not addressed compared them with the idea to realise the client as a
the problem of transaction processing from alternating, migrating object. The most promising approach: having
potentially mobile hosts. However, transaction processing both the client and the TXAgent keeping a replicated copy
from mobile hosts has been discussed by several research of the execution state of the transaction has proven
papers. successful in a prototype implementation.
Different papers have investigated new transaction
models with adopted, possibly weaker constraints of
consistency than ACID to cope with disconnections. For 8. References
instance, this approach used by the clustering model [7] [1] P. K. Chrysanthis: Transaction Processing in Mobile
with weak and strict transactions or Reporting and Co- Computing Environment; Proc. of IEEE Workshop on Advances
in Parallel and Distributed Systems, pp.77-82, October 1993
Transactions [1] for structuring workflow transactions.
Another approach followed up by [10] is to incorporate
[2] M. H. Dunham, A. Helal, S. Balakrishnan: A mobile
the semantics of the data to allow consistent2, concurrent
transaction Model that captures both the data and movement
access even in case of disconnected operation. behavior; ACM/Baltzer Journal on Special Topics in Mobile
Mobility behaviour is captured by the Kangaroo Networks and Applications, Vol 2, pp.149-162, 1997
Transaction Model ([2]). Similar to our approach all data
resources are accessed through an instance on the fixed [3] Margaret H. Dunham, Abdelsalam (Sumi) Helal: Mobile
network (typically on the base station), the Data Access Computing and Databases: Anything new?; SIGMOD Record,
Agent (DAA), that performs the transaction management. Vol 24, No. 4, pp.5-9, 1995
However, the Kangaroo model enhances this idea by
moving the management of the transaction from one DAA [4] H. Garcia-Molina, K. Salem: Sagas; Proc. Of the ACM
to another one as the mobile host moves. Hence, the SIGMOD International Conference on Management of Data,
communication between the client and the DAA is kept pp.249-259, May 1987
local even when the mobile host moves. Due to the fact
that the Kangaroo model assumes a multidatabase [5] Q. Lu, M. Satyanarayanan: Isolation-Only Transactions for
Mobile Computing; Operating Systems Review, Vol 28, No. 2,
approach with autonomous underlying DBMS systems,
pp.81-87, 1994
which allow subtransactions to commit independently,
Kangaroo Transactions do not have ACID properties. [6] Oracle Mobile Agents White Paper;
Another work discussing the approach to have an instance http://www.oracle.com/mobile/olite/html/omawp.html
on the fixed network, a so called user agent, acting on
behalf of the client on the mobile host can be found in [9]. [7] E. Pitoura. B. Bhargava: Maintaining Consistency of Data in
This paper considers how the user agent migrates on the Mobile Distributed Environments; Proc. of the 15th International
network. Our approach does not consider the migration of Conference on Distributed Computing Systems, pp.404-413,
the agent or of the transaction management, as in the 1995
Kangaroo Transaction Model. However, it is conceivable
[8] C. Pu, G. E. Kaiser: Split-Transactions for Open-Ended
2
Activities; Proc. of the 14th International Conference on Very
ACID properties can be maintained. Large Data Bases, pp.26-36, 1988

-7-
[9] R.Ramjee, T. F. La Porta, M. Veeraragahvan: The use of [10] G. Walborn, P. Chrysanthis: Supporting Semantic-Based
network-based migrating user agents for personal Transaction Processing in Mobile Database Applications; Proc.
communication services; IEEE Personal Communications, of the 14th IEEE Symposium on Reliable Distributed Systems,
pp.62-68, December 1995 pp.31-40,1995

[10] Java TM Remote Method Invocation Specification;


http://java.sun.com/products/jdk/1.2/docs/guide/rmi/; Sun
Microsystems Inc. 1998

-8-

You might also like