Chapter 5 Application development
5.2 Application component and agent development
In order to enable this framework to be aware of the structures of applications, we define Application Structure and Component Constraints (ASCC), an application profile description. Listing 17 illustrates the ASCC profile of the application ImageGathering.
Listing 17. The ASCC profile to describe structure of ImageGathering
1 <?xml version="1.0"?>
2 <ascc xmlns:ascc=http://dcsw3.cis.nctu.edu.tw/project/CAAS ...>
3 <application id="ImageGathering">
29 <function id="SubOrAdd">
30 <default idref="Add"/>
31 <component id="Add" priority="50%"
32 stateful="No" relative="No" carried=”No”>
33 <component id="Sub" priority="50%"
34 stateful="No" relative="No" carried=”No”>
35 </function>
48 </application>
49</ascc>
As we can see in Listing 17, the <application> element includes five
<function> elements, which can describe the one function. In each <function>, the candidate components can be specified. Lines xxxx, for instance, declare that
<component id=”Add” ...>, and <component id=”Sub” ...> can implement the AddOrSub function. In advance, within a <component> element, the properties, stateful, relative, and carried, can be used to set components stateful/stateless, relative/irrelative, and carried/un-carried respectively.
The priority property concerns the priority of a component, one of which is chosen in each application adaptation. Furthermore, to set a component as a default component for a function, we can use the element <default>. If we want to set a component implementing the function which cannot be replaced with others, we can use the property “unchanging=’Yes’”. Figure 44 exhibits the class diagram of the implementation of the back-end module, which is made up of the classes derived from three original classes. A programmer defines a personal agent class, which is derived from the Agent class, and lets the agent carry the applications whose classes derived from the Application class. Furthermore, the programmer can define various subclasses of the class Component to substantiate and diversify his application. Without loss of generality, we use MyAgent, MyApplication, and MyComponent as the user-defined classes, which are illustrated in Figure 44.
+switchTo(入 compID : java.lang.String)
+invoke (入 params : java.lang.Object[]) : java.lang.Object[]
+...()
Function
+invoke (入 params : java.lang.Object[]) : java.lang.Object[]
+...()
MyComponent
+invoke(入 params : java.lang.Object[]) : java.lang.Object[]
+...()
+invoke()(入 params : java.lang.Object[]) : Object[ ] +...()
Fig. 44 The class diagram of programming agents and back-end modules
Chapter 6 Related work
In our design, remote dynamic invocation acts to complete invocations between the front-end and back-end modules. RMI, a method invocation on remote objects, is a widely used interaction paradigm. However, not all devices support RMI. Java reflection [41] (Section 4.4) lets programmers invoke the appointed method of the object determined dynamically at runtime. The mature RMI and Java reflection techniques enable programmers to develop applications efficiently, but have not been completely supported in mobile execution environments. For example, in the J2ME runtime environment, Sun Microsystems has not defined the RMI mechanism in the J2ME specification. Though Sun Microsystems defined the RMI interfaces on the CDC environment (an optional package of CDC), it did not provide the RMI interfaces on the CLDC environment. As can be seen in Figure 22, the devices being used in the CDC environment are PDA, Palm, Pocket PC, Smart Phone, while the devices with lower computational power only provide the CLDC environment.
Most mobile agent systems [42, 43] provide abundant functions, including agent migration, communication of agents with other agents and with the underlying system, as well as support for security, transactions and controlling agents. For instance, MOLE [44] offers an agent migration infrastructure with all of these functions, such as a protocol for fault-tolerant execution of mobile agents, accounting and billing, and control algorithms for finding agents, terminating agents, and orphan detection.
Though complete functions support the mobile agent, adapting application according to the characteristics of the small and handheld devices has not been provided yet.
Some previous research has focused on the intrinsic structure of mobile agents and mobility behaviors of mobile agents, such as MobileSpaces [40]. MobileSpaces proposes agent hierarchy and inter-agent migration. The former is so that an agent can have several child agents, each of which also has agents as its child agents, and so on.
The latter means that an agent is capable of migrating into another computer or to within an agent. Also, this framework makes agents adaptable. It regards a mobile agent as a component, and can combine a collection of agents into a single agent.
Several agents are organized hierarchically into one agent. Additionally, this compound mobile agent can be adapted to the target environments. Although the hierarchical structure and adaptable concept for the mobile agents are provided in this framework, it does not structure the application and consider the context-aware adaptation for various mobile devices.
m-P@gent [45, 44] provides environment-aware mobile agents capable of running on resource-limited devices and appliances. In addition, it supports the runtime environment with mobile applications on the mobile devices, and contains four subsystems - @Desk for the PC platform, @Palm for the Palm device platform,
@Pocket for the PocketPC platform, and @TINI for the TINI device platform.
Moreover, it divides a mobile agent into two parts: a core and add-on functional modules. Then, it can adapt add-on modules of the agent to a runtime environment via a specific profile for each runtime environment, such as are profile for J2SE and another profile for J2ME. Yet this framework lacks the ability to distribute the computational loading of applications on the small and handheld devices. In other words, capabilities of the applications on this mobile agent system are restricted by the limitations of the devices. Furthermore, to adapt each component of the mobile agent, it is necessary to describe the type and class of a component for each runtime
environment. In our system, only description of component constraints in an ASCC profile is needed for the same purpose.
On the other hand, some researchers [46, 47, 48] have explored the follow-me applications. Harter et al. [48] describe a sensor-driven, or sentient, platform for context-aware computing that enables applications to follow users while they move around a building. Takashio et al. [47] also propose a mobile agent framework f-Desktop for the migration mechanisms of follow-me applications in an ubiquitous computing environment and evaluate its basic performance. Even though the basic functions of migration and adaptation of applications are provided, this framework does not concern the real context profiles of mobile devices for adaptation, and does not help run applications on these mobile and embedded devices.
In context sensing and modeling, Schmidt has explored context acquisition from sensors [49], and aim to model the context information [50, 51]. Gray et al. [50], present a way of analyzing sensed context information formulated to help in the generation, documentation and assessment of the designs of context-aware applications. Furthermore, to use CC/PP as the context information, Indulska et al. [52]
address a context model and a context management system able to offer pervasive systems, and discuss the pros and cons of the CC/PP framework.
For developing context-aware applications, Dey et al. [53] describe a distributed software infrastructure to support context-aware applications in the Aware Home, a prototype smart environment. Their infrastructure is similar to the Situated Computing Service [54]. Both of them discuss polling and notification mechanisms to impart applications information of context changes. Kermarrec et al. [55] focus on a contextual object, a conceptual object model, for developing applications toward adaptation on the continuous changes of the mobile environment. A contextual object
has a context-sensitivity list (similar to component constraints in our framework) for describing the dependencies of an object and the kind of context that it senses. In addition, it has a reference to some real object (e.g. HTML page, Java Class, etc) to represent the value of this object in the current context. A conceptual framework for context-aware applications in current mobile and Internet environments has also been proposed [56]. The framework contains three parts. The first is the context management part capable of sensing and aggregating data, and managing the set of context groups. The second is the service management part that selects the appropriate services with context information from context management part, and returns the services to the adaptive user interface part. The third is the adaptive user interface part, which provides users with the adaptive and web-based user interface with selected services. All of the frameworks can facilitate the development of context-aware applications and a fundamental adaptation infrastructure for the applications on ubiquitous computing environment. Nevertheless, the weakness of their frameworks lies in the decision of the appropriate component or service for application adaptation according to context information.
Some agent systems are explained before. Besides, there are some systems with the same or similar functions. Table 11 briefly shows the related work. In the table, we classify the systems into the several types: Context Awareness (CA) [55][56], Framework Adaptation (FA) [57][58][59], Mobile Agent systems (MA) [43][42][60][61], Context aware agent (CMA) [62], Transformation Engine (TE) [63], Web Server (WS) [64], Context Awareness (CAA) [65]. Also, we list their functions:
Form-based XML programming model, Mobile environment, Mobile Agent, etc. In the table, content adaptation means that content can be adapted by certain algorithms.
An example is picture encoding. G2 does not have this function, but can provide the
adaptation mechanism. In this mechanism, programmers can use some picture encoding algorithms to adapt pictures to different situations.
Tab. 11 the related work
CA FA MA CMA TE WS CAA G2
Form-based XML programming model
V V
Mobile
Environment V V
Mobile
Agent V V V
Web-based V V V
Content
adaptation V V V V
Context
Awareness V V V V
Service
adaptation V V
( V – has this function, e.g. CA is Web-based and has content adaptation function)
Chapter 7 Conclusion and Future Work
In summary, let we take CAAS as an example. We have explained our focus on transmitting agents efficiently and adapting applications to cope with the variability of user devices. By means of the front-end module and the back-end module, the restrictions of developing applications on small and mobile devices can be decreased.
Furthermore, agents can synchronously migrate with their owners or be asynchronously anchored to their resident server. To transmit the agent efficiently, we experiment on agent migration strategies, and use the LAM as the default strategy for the agent migration. Additionally, by structuring applications in ASCC profiles, and leveraging CC/PP and WAP UAProf frameworks, the attribute-based component decision algorithm can choose the components suitable for the context of the user’s devices.
Currently, there are some issues, including the replacement of the stateful and relative components, the conflict of the component property declaration, the consistency between the ASCC profile and the back-end module, and the lack of proper component declaration. Therefore, in the future we will attempt to design a software development kit (SDK) to aid programming and consistency checking. To further enhance this framework, some services related to the integration of this framework will be discussed in the future. Transaction, security, and server scalability handling, as well as load balancing and faulty recovery can be achieved by including services of distributed computing platforms, such as J2EE [73]. The J2EE
environment offers a distributed application model, a unified security model, flexible transaction control, etc. In transaction, several invocations between the front-end module and the back-end module of an application are regarded as an atomic unit.
This transaction can be handled through some particular operations, such as commit or abort, and the two phases commit protocol. Security consists of authentication and authorization, which can be used to protect servers against malicious applications, and vice versa. Because some vendor’s implementations of J2EE have the capability for scalability issue, we can use the J2EE framework to play the infrastructure for our system implementations.
In addition to the methodologies, we will attempt to integrate our framework with some mobile agent systems. IBM Aglet [42] and MOLE [43], for instance, have full-fledged mechanisms of security, transaction, scalability, etc. Furthermore, we intend to exploit the context sensing and modeling technologies to enlarge the use of contextual information toward adaptation in ubiquitous computing environment.
We can conclude our work in a generic model, shown as in Figure 45. The model contains six parts: Profiles, Performers. Sensors, Environment, Decision engine, Applications. In Chapter 4, we realize these functions in three systems. They contain context awareness, adaptation/transformation, agent migration, and application model.
Besides the instances, we can add other techniques, such as Zig-Bee [66] as a sensor component, a rule engine (JESS [67]) as the decision engine in our newly-created system.
Fig. 45 a generic model
Figure 46 displays the overview of G2MR which we are realizing in progress. In G2MR, we use RFID for detecting users’ location information and Java MHP (Multimedia Home Platform) [70] for displaying the result to users. Figure 47 illustrates the system architecture of G2MR. In the system, we want to add Decision Maker, Event Manager, etc.
Fig. 46 an overview of G2MR
b
Fig. 47 the components of G2MR
Table 12 illustrates the work we have implemented and the future work we want to design and implement. As you can see in this table we can see the functions provided by the systems and the revolution of these systems. There are some new emerging technologies: Web 2.0 [69], 3G [70], mobile streaming, DVB-H [71], etc.
We can consider these technologies to enhance our system. For example, there is a technology called architecture of participation [72] in Web 2.0. Its means client device can have the detecting function to be aware of context of a user. There are a great many of applications applying these emerging discovered technologies for ubiquitous computing. We hope we can approach the goal to accelerate convenience for human lives.
Tab. 12 The system we implement and the future work
References
[1] Bill N. Schilit, Norman Adams, Roy Want, “Context-Aware Computing Applications,” Proceedings of IEEE Workshop on Mobile Computing Systems and Applications, Santa Cruz, CA, 1994; 85-90.
[2] Andy Harter, Andy Hopper, Pete Steggles, Andy Ward, Paul Webster, “The Anatomy of a Context-Aware Application,” Mobile Computing and Networking, 1999; 59-68.
[3] Chen, G. & Kotz, D, “A Survey of Context-Aware Mobile Computing Research,”
Technical Report, Dartmouth Computer Science Technical Report TR2000-381, Hanover, New Hampshire, November 2000.
[4] Cheverst, K., Davies, N., Mitchell, K., Friday, A. & Efstratiou, “Developing a Context-Aware Electronic Tourist Guide: Some Issues and Experiences,”
Proceedings of the SIGCHI conference on Human factors in computing systems, 2000; 17-24.
[5] Asthana, A., Cravatts, M. & Krzyanowski, P, “An indoor wireless system for personalized shopping assistance,” Proceeding sof IEEE Workshop on Mobile Computing Systems and Applications, Santa Cruz, California, 69-74. 1994.
[6] Kazunori Takashio, Gakuya Soeda, Hideyuki Tokuda, “A Mobile Agent Framework for Follow-Me Applications in Ubiquitous Computing Environment.,” Proceedings of 21st International Conference on Distributed Computing Systems Workshops (ICDCSW '01), Mesa, Arizona, 2001.
[7] WAP, http://www.wapforum.org/.
[8] Sun Microsystems, “Java 2Platform Micro Edition Technology for Creating Mobile Device,” Sun Microsystems, Inc, 2000.
[9] JSR 118 Expert Group, JSR-000118 Mobile Information Device Profile 2.0 (Final
Release), May, 2002.
http://jcp.org/aboutJava/communityprocess/final/jsr118/index.html.
[10] PersonalJava, http://java.sun.com/products/personaljava/.
[11] Microsoft Mobile Web Forms, http://samples.gotdotnet.com/mobilequickstart/
(mgk4rd2jnyo1zm55tgnot02p)/Default.aspx.
[12] NET Compact Framework, http://samples.gotdotnet.com/quickstart/
compactframework/.
[13] 3GPP, “TS 22.057 V5.4.0. 3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; Mobile Execution Environment (MExE); Service description, Stage 1 (Release 5)” 2002, http://www.3gpp.org.
[14] Tzu-Han Kao, Yung-Yu Chen, Tsung-Han Tsai, Hung-Jen Chou, Wei-Hsuan Lin, Shyan-Ming Yuan, “PUML and PGML: Device-independent UI and Logic Markup Languages on Small and Mobile Appliances”, Lecture Notes in Computer Science (LNCS) of Springer-Verlag, The 2005 IFIP International Conference on Embedded And Ubiquitous Computing (EUC-05), Nagasaki, Japan, 6-9 December 2005. (SCI)
[15] Tzu-Han Kao, Sheng-Po Shen, Shyan-Ming Yuan, and Po-Wen Cheng, “An XML-based Context-Aware Transformation Framework for Mobile Execution Environments,” Lecture Notes in Computer Science (LNCS) of Springer-Verlag (APWeb 2003, Xian, China), Vol. 2642 / 2003, pp. 132 - 143.
[16] Tzu-Han Kao and Shyan-Ming Yuan, “Automatic adaptation of mobile applications to different user devices using modular mobile agents,” Software:
Practice and Experience. Published Online: 27 Jun 2005 (SCI)
[17] Tzu-Han Kao, Yi-Hsiang Chou, Ming-Chun Cheng, Hsin-Ta Chiao, Shyan-Ming Yuan, “The design and Implementation of a Mobile Agent-Based Framework for Context-Aware Computing,” Proceeding of ICS2002. International Computer Symposium (ICS2002). Dec. 18 - 21, 2002, Hualien, Taiwan.
[18] Tzu Han Kao and Shyan-Ming Yuan, Designing an XML-based context-aware transformation framework for mobile execution environments using CC/PP and XSL,” Computer Standard & Interface. Available online 6 November 2003.
(SCI)
[19] Ricardo Devis, “The Object-Oriented Page,” June 1997.
http://www.well.com/user/ritchie/oo.html
[20] WAP Forum, “Wireless Markup Language Specification Version 1.1,” Jun 1999.
http://www.wapforum.org/
[21] Sun Microsystems, “Java 2 Platform, Micro Edition, 1.0a,” December 2000.
[22] J. Gosling, B. Joy, and G. Steele, The Java Language Specification.
Addison-Wesley, September 1996. http://java.sun.com/docs/books/jls.
[23] Hiroshi Maruyama, Kent Tamura, Naohiko Uramoto, Makoto Murata, Andy Clark, et al., XML and Java Second Edition: Developing Web Applications, Addison-Wesley, 2002.
[24] Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, et al., “Extensible Markup Language (XML) 1.0 (Third Edition),” W3C Proposed Edited Recommendation.
October 2003. http://www.w3.org/TR/REC-xml.
[25] David C. Fallside, “XML Schema Part 0: Primer,” W3C Recommendation. May 2001. http://www.w3.org/TR/xmlschema-0/.
[26] Mark H. Butler, “Implementing Content Negotiation using CC/PP and WAP UAProf,” External Technical Report HPL-2001-190, 2001.
http://www.hpl.hp.com /techreports/2001/HPL-2001-190.html.
[27] Hidetaka Ohto, Johan Hjelm, “CC/PP exchange protocol based on HTTP Extension Framework,” W3C Note, June, 1999.
http://www.w3.org/TR/NOTE-CCPPexchange.
[28] Dan Brickley, R.V. Guha, and Brian McBride, “RDF Vocabulary Description Language 1.0: RDF Schema”, W3C Working Draft, January, 2003.
http://www.w3.org/TR/rdf-schema/.
[29] Franklin Reynolds, Johan Hjelm, Spencer Dawkins, and Sandeep Singhal,
“Composite Capability/Preference Profiles(CC/PP): A user side framework for content negotiation,” W3C Note, 1999. http://www.w3.org/TR/NOTE-CCPP/.
[30] Ora Lassila, and Ralph R. Swick, “Resource Description Framework (RDF) Model and Syntax Specification,” W3C Recommendation, February, 1999.
http://www.w3.org/TR/REC-rdf-syntax.
[31] Hiroshi Maruyama, Kent Tamura, Naohiko Uramoto, Makoto Murata, Andy Clark, et al., XML and Java Second Edition: Developing Web Applications.
Addison-Wesley, 2002.
[32] Ann Wollrath and Jim Waldo. “Trail:
RMI, ” http://java.sun.com/docs/books/tutorial/rmi/index.html.
[33] Mark H. Butler. “DELI: A DElivery context LIbrary for CC/PP and UAProf,“ External Technical Report HPL-2001-260, Feb., 2002.
http://www.hpl.hp.com/personal/marbut/DeliUserGuideWEB.htm
[34] Brian McBride, Andy Seaborne, Jeremy Carroll, “Jena Tutorial for Release 1.4.0,” April, 2002. http://www.hpl.hp.com/semweb/.
[36] Held, Gilbert, Data over wireless networks: Bluetooth, WAP, and wireless LANs.
McGraw-Hill, 2001.
[37] Wang, Jiangzhou, Broadband wireless communications: 3G, 4G, and Wireless LAN. Kluwer Academic Publishers, 2001.
[38] Borland JBuilder. http://www.borland.com/us/products/jbuilder/index.html . [39] Microsoft Studio .NET. http://msdn.microsoft.com/vstudio/ .
[40] Ichiro Satoh, “MobileSpaces: A Framework for Building Adaptive Distributed Applications using a Hierachical Mobile Agent System,” Proceedings of the 20th International Conference on Distributed Computing Systems ( ICDCS 2000).
Taipei, Taiwan, 2000.
[41] Dale Green, “Trail: The Reflection API,”
http://java.sun.com/docs/books/tutorial/reflect/index.html.
[42] Danny Lange and Mitsuru Oshima, Programming and Deploying Java Mobile Agents with Aglets, Addison Wesley, 1998.
[43] J. Baumann, F. Hohl, K. Rothermel, M. Strasser and W. Theilmann, “MOLE: A mobile agent system,” Software-Practice and Experience, 2002; 32:575-603.
[44] Kazunori Takashio, Masakazu Mori, Masataka Funayama, and Hideyuki Tokuda,
“Constructing Environment-Aware Mobile Applications Adaptive to Small, Networked Appliances in Ubiquitous Computing Environment, Lecture Notes in Computer Science, vol. 2574. Springer: Berlin, 2002; 230 - 246.
[45] Kazunori Takashio, Masakazu MORI, Hideyuki Tokuda, “m-P@gent: A Framework of Environment-Aware Mobile Applications for Small, Networked Appliances,” Proceedings of 2002 IEEE 4th International Workshop on Networked Appliances. Gaithersburg, MD, USA, 2001.
[46] Phil D. Gray and Daniel Salber, “Modelling and Using Sensed Context
[46] Phil D. Gray and Daniel Salber, “Modelling and Using Sensed Context