A Remote Display System For Java Based Application
A Remote Display System For Java Based Application
Applications
Andre Luiz Camargos Tavares
andrelct@gmail.com
mtov@pucminas.br
ABSTRACT
Remote presentation is an interesting model for executing
applications in mobile devices, since applications can be executed on a server and their interfaces displayed on mobile
clients. This paper describes a non-invasive and transparent
remote presentation system for legacy J2ME applications,
called RDA (Remote Display using Aspects). RDA relies on
aspect-oriented programming to instrument J2ME applications with remote presentation code. Our first performance
results demonstrate that remote presentation is a promising
solution for executing CPU-intensive applications in mobile
devices or for running applications demanding resources not
available in such devices.
Keywords
Mobile computing systems; Software architectures; Aspectoriented programming.
1. INTRODUCTION
The growing popularity of mobile computing devices, such
as personal digital assistants (PDA) and smartphones, presents new challenges to software engineers [8, 11]. When
building applications for such devices, developers must consider new problems, including scarce hardware resources,
bandwidth fluctuations, voluntary and involuntary disconnections, ad hoc communications, etc [13]. Particularly, limitations in the CPU power and memory capacity currently
impact the execution of many applications in mobile devices,
including applications that depend on complex algorithms
or large amounts of memory. Further, recent improvements
in hardware technologies have benefit both workstations and
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
SAC08 March 16-20, 2008, Fortaleza, Ceara, Brazil
Copyright 2008 ACM 978-1-59593-753-7/08/0003 ...$5.00.
mobile devices, keeping the gap in terms of CPU and memory capacity between the two architectures constant.
For this reason, remote presentation is an interesting model for executing applications in mobile devices. Accordingly
to this model, mobile applications should be decomposed
in two layers: one to be executed in workstations located
in wired networks, containing the application logic and the
other containing just the interface of the system to be executed in mobile devices [1, 2, 3, 14]. This decomposition
relies on wireless communication just to transmit results and
input data between the components in charge of the application logic and interface.
Several solutions have been proposed to support remote
presentation over wireless networks. The first kind of solution requires manual decomposition of the target application, in order to insulate application logic and presentation
code in different components. An example is the Chroma
system [1]. However, such solutions require maintaining two
versions of the application: the monolithic version (that executes solely in mobile computers) and the remote presentation version. Other solutions require the use of proprietary
frameworks that extend or replace existing GUI frameworks.
Examples include ULC [14] and TCPTE [2, 3]. ULC classes
resembles the Swing API, but with a ULC prefix (e.g. ULCFrame, ULCLabel, etc). Therefore, the system is invasive and non-transparent to developers. On the other hand,
TCPTE reimplements all AWT classes and interfaces, preserving their names. The reimplemented classes contain remote presentation code and also code that implements GUI
concerns that must be executed in the server side (for example, processing event listeners or storing information about
GUI widgets). For this reason, modifications in the internal
logic of the original AWT classes may require modifications
in the correspondent TCPTE classes.
This paper describes a remote presentation system for
J2ME applications, called RDA (Remote Display using Aspects). RDA offers a non-invasive and transparent remote
presentation system. In other words, legacy J2ME system
can be executed remotely, without requiring source code
modifications. Moreover, the system takes benefit of aspectoriented programming to instrument the original J2ME Limited Connected User Interface (LCDUI) classes with remote
presentation code (i.e. the system does not rely on a library substitution approach). In this way, RDA is robust to
changes in the internal logic of the original LCDUI classes.
Our first performance results obtained with RDA shows that
the speedup gains can be expressive for CPU-bound tasks
(such as the Dijkstra shortest path algorithm used in the
1918
(a)
(b)
Figure 1: Application deployment (a) and execution (b) in the RDA system
experiment described in the paper).
The remaining of the paper is organized as follows. Section 2 presents the basic features and the architecture of
the RDA system. Section 3 describes the internal aspects
proposed by RDA in order to support transparent, noninvasive, remote presentation of J2ME applications. Section
4 presents results about an experiment performed with our
prototype implementation of the system. Section 5 discusses
related work and Section 6 concludes the paper.
2.
RDA ARCHITECTURE
3.
1919
There are other 15 similar pointcuts and advices that intercept the creation of the remaining types that can be included in the interface of J2ME applications.
Aspects that intercept method invocations directed
to SHOs: This interception is applied to methods that
change visual properties of SHOs. For example, the following pointcut intercepts the invocation of method setString
of class TextField:
pointcut setString(String text, TextField textField):
call(void TextField.setString(String)) &&
args(text) && target(textField);
4.
EXPERIMENTAL RESULTS
In order to evaluate the performance gains of our prototype implementation of the RDA system in a real setting, an
experiment was conducted with a PDA connected to a remote presentation server by an IEEE 802.11, 11 Mbps wireless network. The PDA was a Palm Lifedrive, Intel Xscale
416MHz, 64Mb of RAM, IBM JVM J9 2.2 and the server
an AMD Athlon64 1.80GHz, 1024Mb of RAM, Windows
XP Professional SP2. The application used in the experiment was the well-known Dijkstra Shortest Path Algorithm,
which constitutes the foundation of many location-based applications and services common in handheld computing.
Dijkstra algorithm was executed using graphs with 10,
150, 500 and 1000 nodes. We have also changed the percentage of edges in the graphs to 20%, 30% and 50%, regarding
a complete graph. In all the cases, edges were generated
randomly in order to obtain a graph with the specified density. The interface of the application was composed by two
textboxes to inform the number of edges and the density
and a button to request the calculation of the shortest path.
Figure 3 compares the execution time of the Dijsktra algorithm using the RDA system and when the application
was fully executed in the PDA (i.e. without remote presentation support). The presented times does not include
the generation of the graphs. On the first experiment (Figure 3a, graph with 10 nodes), the result of the RDA system
was not favorable, since the small number of nodes in the
graph has not demanded enough processing to compensate
the communication overhead inherent to using RDA. More
precisely, the execution time in the mobile device was very
1920
5.
RELATED WORK
Several systems for remote executing applications for mobile devices have already been designed. Among them, we
can mention Chroma [1], TCPTE [2, 3] and ULC [14]. In
Chroma, domain experts define a group of tactics (or possible alternatives) for decomposing an application, using a
so-called remote execution tactics language. In RDA this
1921
6.
CONCLUSIONS
7.
REFERENCES
1922