Você está na página 1de 3

Distributed Java Support for Mobile Applications on

Lightweight Devices
K.A.Hawick and H.A.James
Computer Science Division, School of Informatics
University of Wales, Bangor, North Wales, LL57 1UT, UK
Tel: +44 1248 38 2717, Fax: +44 1248 36 1429

Keywords: Java; mobile application; PDA; dis- wish to operate in “nomadic” mode between peri-
tributed applications; middleware. ods of connectivity. We wish to add mobile location
context to a smart agent based software infrastruc-
ture to allow more pro-active mobile applications.
Extended Abstract We also consider the necessary mobile support en-
vironment from the perspective of a smart mobile
Mobile computers and personal digital assistants
device. We are working with swarm based mobile
are now widely affordable and are powerful enough
networked robots [7] which have similar computa-
to run paradigm shifting mobile applications and
tional power to a PDA but which carry sensors and
support programming environments like Java. We
are controlled by an agent based software system.
are investigating the support services and software
Our goal is to investigate the issues surrounding
infrastructure that is needed for the next gener-
a interoperating mobile software support structure
ation of mobile users and applications that will
that can be scaled to cope with large numbers of
use such devices. As well as email, messaging and
participating nodes - both humans represented by
web based applications that are already prevalent
their PDA proxies and robots represented by agent
on wireless laptops and PDAs we are investigating
based control systems. In this paper we discuss the
context-aware applications that play an active role
Java support environments we have experimented
on their users’ behalf and taking actions dependent
with; the performance of the base components and
upon spatial and temporal information. Systems
our observed trends for mobile Java; and our ar-
such as Fox’s Garnet environment have shown that
chitecture for a mobile support environment us-
mobile chat and collaborative environments can be
ing Java: network; thread; introspection and com-
built using PDAs and Java and message-oriented
munications packages. We also discuss our use of
WaveLAN and Bluetooth communications systems
Java is a particularly attractive development en-
from Java and also the use of location context in-
vironment for smart mobile applications allowing
formation to enrich potential mobile applications
for a considerably richer higher level set of devel-
behaviour [6]..
opment libraries and components than would be
possible using traditional embedded systems lan-
guages. Java on Mobile Devices
In this paper we consider two mobile user appli-
cation categories. Firstly the mobile householder or Support for Java on embedded devices is develop-
office based worker or scientist who is mobile within ing quite rapidly. At the time of writing, Sun’s Java
the context of one or more building zones and who 2 Micro Edition(J2ME) and associated specifica-
might wish to interact with devices and other users tion has two main strands. A Specification known
in his/her environment. Secondly we consider a as PersonalJava is being incorporated into the aus-
field worker who might be a field scientist gather- pices of the J2ME framework but is already a useful
ing data or a soldier in a battlefield scenario. This specification. It has been implemented Insignia for
sort of user is working in a more hostile environ- their Jeode Java product and environment for the
ment with more likelihood of poor network coverage Compaq PDA [1]. Other companies have similar
or temporary disruption to services. He/she might products for other PDAs. We also employ another
JVM product based upon Sun’s J2ME framework. Multi-threaded Mobile Peers
The KVM specification underpins the Java envi-
We have experimented for some years with multi-
ronment supported by Dallas Semiconductors on
threaded Java based daemons for middleware sup-
their Tiny Internet Interface (Tini) device [2]. This
port on fixed network distributed systems. We are
control board with up to 1 MB of memory runs
presently working with a lightweight version of our
a communications rich system with Java software
DISCWorld [4] Java daemon that can run as a peer
able to access ethernet; 1-wire; serial port and In-
on PDAs such as the Compaq iPAQ. Our program
ter IC communications protocols. The KVM takes
is capable of running as both a graphically interac-
its name (apparently) because of its achievement of
tive client program as well as a lightweight server
cramming a JVM into 100’s of kBytes rather than
encapsulating various agent components that inter-
act with other nodes on the mobile user’s behalf.
We are employing the Tini and associated Java Our original DISCWorld system was written us-
system into our mobile swarm robots where a very ing a relatively large number of threads and it used
simplified control software infrastructure runs on a workflow based model to support user jobs in the
the Tini as master to various device microcon- form of task graphs. Successful use of the Java
trollers. The mobile robots communicate with one threads model requires some care to avoid dead-
another via wireless ethernet at present although lock and other resource allocation problems [9]. For
we are working on a Bluetooth accessible commu- “DISCWorld Lite” we have had to redesign the
nications system for them. A fixed network base thread model we employ to cope with the limits
station act as as a communications broker and an on thread numbers supported by by the Pocket PC
interface to the Internet-ed world. We have used OS and hence the PersonalJava JVM we rely upon
similar technology for implementing wireless net- on the Compaq iPAQ. We had designed a Java
works of sensors devices [5], again controlled by lightweight message-passing system [10] for use in
small Java applications. parallel programs and have been able to re-engineer
this to enable lightweight message passing within a
mobile network.
We will report on our software architecture in de-
Java Performance Trends tail in the full paper. In brief our system consists of
some infrastructural thread components that: bro-
We have carried out benchmark tests of the Com-
ker communications; ensure security and manage
paq iPAQ PDA Jeode JVM performance in key ar-
aggressively cached and hoards local objects. In
eas for our mobile middleware. Preliminary results
addition a thread factory (re)uses data query satis-
suggest that for integer and memory operations the
fying and production components. We will compare
iPAQ runs approximately 10 times slower than a
the message and threading performance of our full
medium range 1GHz PC running unoptimised Java
and Lite DISCWorld daemon systems.
code/JVMs. This is encouraging and since it seems
inevitable that mobile devices will continue to im-
prove in speed with Moore’s Law we may see sim- Java Wireless Communications
ilar capabilities as todays desktops in the not too Our initial experiments have used IEEE 802.11b
distant future. wireless network technology which can support nor-
It is not clear what compromises to make in de- mal LAN IP operations accessible to the Java net-
veloping experimental software infrastructures for work programming stack on devices such as the
mobile systems. In general the complexity of the iPAQ. Recent PDAs such as the iPAQ model 3970
protocols and interaction models amongst mobile come equipped with Bluetooth wireless communi-
users and their proxy applications means that Java cations. The Bluetooth communications system is
is a fairly low risk development platform. It is designed to support personal area communications
likely that communications libraries of greater per- over the range of a few metres. Mobile phones and
formance and richer capabilities will allow services PDAs are already available with appropriate com-
and common applications components to be pushed munications applications allowing users to operate
down into a support middleware structure. The de- a personal area or body area network whereby their
vices and systems available today are certainly ad- mobile devices can all interact. Of great interest to
equate for experimentation in new protocols, dis- us is the potential for Bluetooth PDAs to inter-
tributed algorithms such as consensus agreements act with ground station devices and thus obtaining
and leader elections. very localised spatial information. This additional
contextual information supports many interesting [4] K.A. Hawick, H.A. James, A.J. Silis,
new applications and interactions between the lo- D.A. Grove, K.E. Kerry, J.A. Mathew,
cation aware software agents on the PDA and its P. D. Coddington, C.J. Patten, J.F. Hercus,
environment. and F.A. Vaughan, “DISCWorld: An Environ-
We anticipate that global positioning systems ment for Service-Based Metacomputing,” Fu-
(GPS) will soon become light, cheap and accurate ture Generation Computing Systems (FGCS),
enough that PDAs will have spatial context data 15:623–635, 1999.
available to them. In the meantime Bluetooth com-
munications will allow us to experiment with the [5] K.A. Hawick and H.A. James, “Middleware for
necessary support software infrastructure and the Wireless Sensors and Robots”, Submitted to
sociological usage patterns that we need to under- IEEE Int Conf on Wireless Communications
stand before we can take full advantage of being and Networks (WCNC 2003).
fully connected and location enabled mobile users. [6] K.A. Hawick and H.A. James, “Middleware
Other projects such as Cricket are looking at elec- for Context Sensitive Mobile Applications”,
tronics devices that can provide very localised sig- Submitted to Workshop on Wearable, Invisi-
nals inside buildings [11]. ble, Context-Aware, Ambient, Pervasive, and
The proposed Bluetooth Java API [8] provides Ubiquitous Computing (WICAPUC) - Aus-
some interesting device discovery and interaction tralian Computer Science Week (ACSC 2003).
methods over and above the conventional message .
and streaming communications supported for wire-
less ethernets. We are investigating how a Java [7] K.A. Hawick, H.A. James, J.E. Story and
agent based system can make use of such a model R.G. Shepherd, “An Architecture for Swarm
to establish ad hoc networks of mobile users that Robots”, Submitted to IEEE Int Conf on
need not require a nearby fixed network device. Robotics and Automation (ICRA 2003).
Preliminary finding suggest that performance
[8] Bala Kumar et al., “Java APIs
trends for Java on mobile devices are encourag-
for Bluetooth Wireless Technology”
ing and that there is great scope for a smart agent
(JSR-82), Java Community Process,
based active infrastructure in support of mobile ap-
plications and users.
[9] Doug Lea, “Concurrent Programming in
Java”, Addison-Wesley Longman, 1999.
[10] J.A. Mathew, H.A. James and K.A. Haw-
The Distributed and High Performance Comput- ick, “Development Routes for Message Passing
ing Group is a collaborative venture between the Parallelism in Java,” Proc. ACM 2000 Java
University of Wales, Bangor and the University of Grande Conference, San Francisco, June 2000,
Adelaide in South Australia. pp 54-61.
[11] Nissanka B. Priyantha, Anit Chakraborty,
References Hari Balakrishnan, “The Cricket Location-
Support system”, Proc. 6th ACM MOBICOM,
[1] Compaq. iPAQ Pocket PC. Available from Boston, MA, August 2000.
static/iPAQ/handheld jumppage.asp Last
visited August 2002.

[2] Dallas Semiconductors. “Tiny InterNet Inter-

face” Available from www.ibutton.com/TINI
Last visited September 2002.

[3] Geoffrey Fox, Sung-Hoon Ko, Kangseok Kim,

Sangyoon Oh and Sangmi Lee “Integration of
Hand-Held Devices into Collaborative Envi-
ronments”, Proc. Int. Conf. on Internet Com-
puting (IC-02), June 24-27, Las Vegas.