DYNAMIC JAVA COMPONENTS in PERVASIVE SYSTEMS a Review of the Feasibility of Dynamic Data Processing on Wireless Platforms
Total Page:16
File Type:pdf, Size:1020Kb
DYNAMIC JAVA COMPONENTS IN PERVASIVE SYSTEMS A Review of the Feasibility of Dynamic Data Processing on Wireless Platforms Alexander Dannies, Javier Palafox-Albarrán, Walter Lang and Reiner Jedermann Institute for Microsensors, -actuators and -systems, University of Bremen, Otto-Hahn-Allee NW1, Bremen, Germany Keywords: Java, Data Processing, Wireless Sensors, OSGi, Dynamic Components, Pervasive Computing. Abstract: A wireless sensor network (WSN), which is one type of pervasive system, has the goal of networking heterogeneous systems and communicating through a gateway. However, it is also necessary to provide dynamic features to wireless nodes for updating applications and services during runtime. Dynamic updates can be handled either by the intrinsic features of Java or by advanced frameworks such as MIDP or OSGi. This paper investigates the software background and the feasibility of these three options in the context of WSNs. Java Virtual Machines were tested on sensor nodes and gateways currently available on the market. Two synthetic benchmarks were utilized to compare their performance. In addition, we tested the performance of an exemplary algorithm for a real life application during transportation in food logistics. Our experimental results showed that the performance of the benchmarks varied by a factor of more than 50, depending on the platform. Nevertheless, our chosen example algorithm could be executed on all platforms within an acceptable amount of CPU time. Pre-processing of data can be applied on wireless devices to reduce communication volume and provide conclusions instead of raw data. However the use of advanced frameworks, enabling extended dynamisation, are so far very limited. 1 INTRODUCTION on WSNs with distributed intelligence in which sensor populated scenarios may communicate with The vision of omnipresent information processing in internet-based solutions. everyday environments, for example in logistic Our vision of an intelligent network, in the transport and production processes by a network of project “Intelligent Container” (IMSAS, 2011), pervasive systems, becomes more and more feasible includes the capability to handle dynamic changes in with the decreasing cost and increasing the environment. The network nodes should be able computational power of wireless devices. to interpret and to react to environmental data and Pervasive systems have the aim of networking situations that were unknown at the time of their everyday life by the use of intelligent objects. They installation and initial programming as access to the can utilize different technologies and systems with container is not possible during transport. Therefore different computational capabilities. Wireless sensor it is necessary to provide dynamic features in networks (WSN) are examples where different wireless network nodes to allow updating during hardware types are involved. These devices runtime, not only of one application but also the communicate with the external world through a services provided. For example, the sensor can be gateway which possesses extended communication moved to a new environment, which requires a and processing capabilities. modified network protocol to make the best use of The nodes are placed in an environment in order the available gateways, whereas the remainder of the to sense physical parameters, communicate with the software remains unchanged. Alternatively, the network’s neighbours and determine useful actions. intelligent data processing may consist of multiple One of the most important challenges is to deploy services which are updated at different time applications in which families of hardware devices intervals. interact with each other. As mentioned by Vazquez, The concept of the Open Source Gateway Almeida, Doamo, Laiseca and Orduña (2009), it is initiative (OSGi) enables Java software modules to desirable to implement monitoring solutions based be updated or replaced on a system during runtime, for example remotely over an internet-connection. 58 Dannies A., Palafox-Albarrán J., Lang W. and Jedermann R.. DYNAMIC JAVA COMPONENTS IN PERVASIVE SYSTEMS - A Review of the Feasibility of Dynamic Data Processing on Wireless Platforms. DOI: 10.5220/0003802300580066 In Proceedings of the 2nd International Conference on Pervasive Embedded Computing and Communication Systems (PECCS-2012), pages 58-66 ISBN: 978-989-8565-00-6 Copyright c 2012 SCITEPRESS (Science and Technology Publications, Lda.) DYNAMIC JAVA COMPONENTS IN PERVASIVE SYSTEMS - A Review of the Feasibility of Dynamic Data Processing on Wireless Platforms Research has been carried out including OSGi in conceived for personal computers and is not suitable pervasive systems, but the main focus is telematics for resource constrained devices. Realising this systems (Lee et al., 2006) and mobile agents (Lee et need, Sun Microsystems introduced the Java 2 al., 2010) as its merits make it suitable for these Platform, Micro Edition. The second system, OSGi, purposes. is based on Java with a focus on modular, service- Implementing dynamic features in WSNs is even oriented architecture (SOA) as well as dynamic more complicated. The difference between WSNs installation and updates of bundles. and other pervasive systems is that the main concern is the energy consumption of the application. In 2.1 Java as Dynamic Language Rellermeyer et al., (2008) they go one step further, making the concept of OSGi compatible with Java is the most common language that meets the resource-constrained devices. They propose OSGi- requirement of the ability to extend software with like services in devices with no JVM and with dynamic code segments, because dynamic class limited operating system support. The only full loading is one of its intrinsic features. Some of the OSGi framework exists on the gateway. additional benefits one obtains by choosing Java are The question arises whether it is possible to have a object-oriented programming and automated full OSGi heterogeneous system which is energy memory and heap management (garbage collector). aware and intelligent, or whether pure Java without a Furthermore, using Java as a programming language middleware on top is sufficient at the lower levels. is programming platform-independent. This so The aim of this paper is to investigate the called concept of “write once, run anywhere” feasibility of OSGi and Java implementation in (WORA) becomes possible through the use of a Java several WSN platforms. Verifying this would allow virtual machine (JVM) which is adapted to specific a shift in the paradigm from a centralised WSN – in hardware architecture, e.g. x86 or ARM. The JVM which the majority of sensors are just collecting does not execute a compiled program, but rather a environmental data and transmitting these to one Java bytecode which will be interpreted differently processing unit – to a WSN with sensors which are on each platform. pre-processing data to reduce network traffic and save energy. The requirements for a specific 2.1.1 Limitations of JavaME application can differ from our selected application domain of interest, which is monitoring during It has to be questioned whether JavaME is still transportation in food logistics. The main issues to sufficient for the increasing demands of data be taken into account are the time needed for the processing algorithms. The situation-dependent platforms to perform complex computer operations loading and installation of new software bundles and the limitations of each of them regarding requires flexible class loaders. Storage of recorded resource requirements for enabling a dynamic data and knowledge might require a file system. platform. Most data analysis algorithms require floating or First, in section 2 we will provide an overview of even double precision arithmetic. Java and dynamic components. Section 3 will JavaSE is the standard platform for programming explain the methods used to test the performance in the Java language. It consists of a Java virtual and the configuration, followed by section 4 which machine for executing the compiled class-files (the describes the hardware platforms used in the Java program) and a set of libraries which makes it experiments. In section 5 we discuss the results and possible to access, e.g. the file system, graphical or finally offer conclusions. network interfaces from a Java program. The Java Micro Edition (JavaME) is aimed at embedded systems, e.g. mobile phones with limited 2 STATE OF THE ART resources. A developer programming for a platform using JavaME has to keep in mind that he is restricted to the features of JRE 1.3. Three Java and OSGi are two promising technologies for components belong to the JavaME-stack: the solving the challenge of dynamic software updates. configuration which contains the Java virtual The former is well-known to be portable and machine, the profile, which adds a certain set of independent of platform. Pervasive Java (also called API, and optional packages for additional wireless Java and mobile Java) attempts to bridge functionality in regards to the profile scope. There the gap between different devices and platforms. are two configurations: The Connected Device However, Java Standard Edition (JavaSE) was 59 PECCS 2012 - International Conference on Pervasive and Embedded Computing and Communication Systems Configuration (CDC) includes almost the entire suite and prelinked to each other, which results in a scope of JavaSE except for GUI-related libraries. In reduced size of around one third