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