terminal capabilities, and system/service management policies, to adapt ... text-aware middlewares for mobile computing, mainly because of the MA ..... ommend the MA technology as a crucial design and implementation choice in the field be-.
Section III: Location-based Services
Mobile Agent Middlewares for Context-aware Applications Paolo Bellavista, Dario Bottazzi, Antonio Corradi, Rebecca Montanari, Silvia Vecchi Dip. Elettronica, Informatica e Sistemistica – University of Bologna Viale Risorgimento, 2 - 40136 Bologna - ITALY Phone: +39-051-2093001; Fax: +39-051-2093073 Email: {pbellavista, dbottazzi, acorradi, rmontanari, svecchi}@deis.unibo.it
Abstract Wireless communications and the Internet are converging towards an integrated scenario where both traditional and novel services should be ubiquitously accessible, independently of the mobility of users, terminals, resources and service components. Mobility-enabled service provisioning introduces several challenging issues to address: from client/server location change at provision time, to wide heterogeneity of access terminals, and to unpredictable modifications in accessible resources. In this complex scenario, two main guidelines are recently emerging: the need for novel middleware solutions to support service development and deployment, and the necessity of full visibility of the context, intended as the logical set of accessible resources depending on client location, access terminal capabilities, and system/service management policies, to adapt service provisioning to specific runtime conditions. The chapter discusses and motivates the suitability of the Mobile Agent (MA) technology to implement novel context-aware middlewares for mobile computing, mainly because of the MA properties of mobility, asynchronicity, decentralization, and location awareness. In addition, the chapter gives an extensive overview of the state-of-the-art research activities about MA-based supports for mobile computing, and especially about context-aware ones, in order to point out, through system/prototype exemplifications, the main lessons learned and the primary directions of the on-going research work.
1
Mobile Computing and Context Awareness
The wide spreading of mobile computing is changing the way to develop, deploy and expect to access Internet services. Nomadic users who disconnect from the network to re-connect to a new point of attachment after a time interval and mobile terminals that continuously roam in the network without suspending the on-going service sessions introduce new challenging issues in service design. Recent advances in wireless networking and the enlarging market of
wireless-enabled portable devices further stimulate the provisioning of services to a wide set of client terminals with very heterogeneous and limited resources. These services should be aware of the client location not only to yield back results to the current user/device position, but also as the basis for service customization. Service tailoring should depend on user position, on device characteristics, and also on the current state of involved resources, either within the client locality or in a wider global scope. In other words, service providers and wired/wireless network operators have to face new challenging and state-of-the-art technical issues, toward both the deployment of novel services for mobile ad-hoc networks and the full seamless integration of mobile clients with the traditional fixed Internet. The first scenario is just moving its first steps by investigating solutions mostly at the network level, e.g., for multi-hop cooperative routing [1]. However, it is attracting more and more research interest for its potential of leveraging peer-to-peer interactions between mobile clients. At the opposite, the second scenario already starts to exhibit research and commercial network-level solutions for mobile connectivity [2, 3], even if the most challenging service-level issues, such as supporting service continuity while roaming and re-qualifying resource bindings depending on local resource availability, still have to be addressed. We claim that, in both scenarios, mobile computing motivates re-thinking traditional support solutions for distributed systems to achieve the necessary level of visibility of mobility-related properties; these properties are required to drive the runtime decisions about service adaptation to the provisioning environment. Since the beginning of the research in mobile computing, location has been recognized as a crucial property to be aware of in order to organize effective and efficient mobile applications. Location awareness calls for mechanisms and tools to obtain the information about the physical position of all potentially mobile entities involved in mobile computing applications,
2
i.e., users, access devices, resources, and service components. Let us observe that support solutions in traditional distributed systems tend to hide the location information from service developers to simplify application design and implementation. On the contrary, the mobile computing scenario requires performing service management operations at provision time, such as re-binding to local resources and transcoding data depending on locally available bandwidth, which are sensibly influenced by the current client location and typically application-specific [4]. For these reasons, it is necessary that location awareness is propagated up to application-level components or, at least, to the middleware facilities that can handle the complexity of location processing/management and can provide a simplified and more usable location abstraction to mobile applications. Location visibility is not the only crucial property that applications should be aware of in mobile computing environments. We claim that mobile computing emphasizes the need for novel methodologies to support and simplify the development of innovative classes of applications where service results and characteristics depend on the provisioning context, i.e., the logical set of resources that a client can access due to runtime properties of the provisioning environment, such as client location, security permissions, access device capabilities, user preferences and trust level, resource state, and mutual relationships with currently local users, terminals, resources and service components [5]. A notable example of context is the set of resources/services that a user can access depending on her personal preference profile and independently of her current point of attachment (Virtual Home Environment [6]). Let us note that, given the above definition of context, location is only a specific case (maybe the most important one in mobile computing) of the different kinds of information that affect the context determination.
3
To exemplify the relevance of having mobile applications with full context awareness, consider the case of an ubiquitously accessible stock trading service that is willing to enable its mobile users to operate on the market via laptops connected to Wi-Fi hotspots, via PDAs connected to Bluetooth Local Infotainment Points [7], via Wireless Application Protocol (WAP) phones [8], and via GSM phones receiving simple SMS-based communication in case of abrupt changes of quotations of interest. The interface and the information content of the trading service should be adapted to the access terminal and the connectivity technology, but also to the resource availability in the wireless access locality: in case of local network overload, the service should give priority to gold-user transactions while it could exclude the access to bronze users not to aggravate the congestion situation. A flexible way of designing such a service is to determine the up-to-date contexts of any user currently involved in an active service session, and to adapt the service behavior accordingly. For instance, if the access terminal is a GSM phone, the context should only consist of a gateway component, running on a host of the fixed network infrastructure, that is capable of downscaling HTML pages to text-only summaries and of delivering them as SMS messages. In the case of such a context, stock trading servers should be automatically and dynamically bounded to that gateway, with no need to hardcode this binding behavior within the service logic. As another example, in the case of congestion, the context of a stock trading bronze user should be voided to prevent any access. In other words, high heterogeneity, dynamicity and resource shortage/discontinuities typical of mobile computing environments stress the relevance of context-dependent services. However, the design, implementation and deployment of context-dependent mobile applications is significantly more complex than the development of traditional distributed services, thus risking to slow down this emergent service market. Therefore, we claim the need for
4
highly flexible and innovative middleware solutions, with full context awareness, to facilitate the development and runtime support of context-dependent mobile services [5]. Several recent research efforts are paving the way to the realization of such novel middlewares, and their presentation, analysis and comparison are the main scope of this chapter. In the following, we analyze the research work done in the last years in the area of mobile computing middlewares with the aim of putting side by side the different solutions emerged and of extracting the primary lessons learned. In this overview we adopt a specific perspective, i.e., to focus on the innovative middleware solutions that choose the Mobile Agent (MA) programming paradigm for their design and implementation. In particular, Section 2 discusses and motivates why the MA technology is to be considered particularly suitable and effective for mobile computing middlewares. Section 3 provides an overview of the existing MA-based supports for mobile computing, while Section 4 specifically concentrates on the MA-based middlewares supporting differentiated forms of context awareness. Finally, Section 5 tries to summarize the lessons learned and to sketch a possible road map for the medium-term research in the field.
2
Mobile Agents and Mobile Computing
It is increasingly recognized that the design and implementation of a mobility middleware can significantly take advantage of the adoption of innovative programming paradigms based on code mobility and, in particular, of the MA technology [9, 10, 11]. The appearance of the MA concept can be found in the TeleScript technology developed by General Magic in 1994 [12]. Scripting languages, such as the Tool Command Language (TCL) and its derivative SafeTCL, were gaining much interest because they enabled rapid prototyping and the generation of portable code [13]. The concept of smart messaging, based on the encapsulation of SafeTCL scripts within emails, made possible new kinds of distrib-
5
uted applications with some degrees of dynamic programmability [14]. At the same time, mobile computing, intended as the possibility of supporting user/terminal mobility without suspending service provisioning, was spreading and further stimulated the research on mobile code technologies [15]. Last but not least, the same years witnessed the beginning of the Java age, whose portable Java bytecode is the basis for the largest part of current MA systems. MAs are considered the most expressive among the programming paradigms based on code mobility [16]. In the traditional client/server paradigm, clients invoke functions made available by usually remote computational entities, called servers. Servers execute locally the invoked services and deliver the results back to the requesting clients. Servers provide both the knowledge of how to handle client requests and the required execution resources. Code mobility can improve the traditional client/server paradigm along two different and orthogonal lines, by allowing the dynamic decision of where the service know-how is located and of which host provides the needed computational resources. Three different paradigms based on the possibility of dynamic code migration have been identified [16]: Remote Evaluation (REV), Code on Demand (CoD), and Mobile Agents. The paradigms differ in the distribution of know-how, processor, and resources among nodes NA and NB (see Table 1). In the REV paradigm [17], a component A on node NA sends instructions specifying how a component B on node NB should perform a service. The component B then executes the received code on its local resources. Elastic servers are a notable example of REV [18]. In the CoD paradigm, instead, component A has resources located in its execution environment but does not know how to access and process these resources: it should obtain the needed code from component B. Java applets follow this paradigm. The MA paradigm is an extension of REV. Whereas the latter primarily focuses on the transfer of code, the MA paradigm involves the mobility of an entire computational entity that
6
carries its code and its reached execution state. In other words, the MA-based component A has the know-how capabilities and the processor, but it lacks the resources to operate with. It can migrate autonomously to a different computing node NB that can offer the required resources. In addition, A is capable of resuming its execution seamlessly, because it preserves its execution state after migration. About the execution state, when an MA is capable of migrating together with its whole state (not only application-level data, but also kernel-level associated information such as program counter and register values), its mobility is called strong mobility. More often, MA platforms support only the migration of application-level execution state and simply allow MA developers to decide from which points of their code MAs have to resume their execution after migration (weak mobility). For instance, Java-based MA systems generally enable MAs to migrate together with all the serializable Java objects in their state, but do not support strong mobility, impossible to achieve without modifying the standard Java Virtual Machine (JVM) [19]. Paradigm
Before NA
After
Client/Server
A
Remote Evaluation
Know-how A
NB Know-how Resource B Resource B
NA
Code on Demand
Resource A
Know-how B
Resource Know-how A
B
Mobile Agent
Know-how A
Resource
---
Know-how Resource A
A
A
NB Know-how Resource B Know-how Resource B
Table 1. The taxonomy of programming paradigms based on code mobility [16].
The MA paradigm is important for network-centric systems because it represents an alternate, or at least complementary, solution to the usual client/server model of interaction. In the last few years, several research activities have investigated the MA technology for distributed system management and encouraged its utilization, by showing some significant deriving benefits. The most explored and recognized advantages span from the overall reduction of network
7
traffic by exploiting resource co-locality, to the flexibility of distributing software components at runtime, from the full decentralization of the monitoring, control and management of networks, systems and services, to the increased robustness stemming from decoupling tasks into distributed autonomous activities that can overcome temporary network/resource unavailability [20]. By focusing specifically on mobile computing, MAs are considered a primary enabling technology to implement novel and effective middlewares. Recent research projects have proposed MA-based solutions that concentrate on different aspects related to different forms of nomadic/roaming mobility, by involving users, access terminals, and even needed resources and service components, as detailed in the following two sections. All these researches recommend the MA technology as a crucial design and implementation choice in the field because many MA requirements coincide with mobile computing ones [9, 10, 11]. First of all, mobility stresses the requirement of dynamicity, intended as the possibility of modifying and extending the support infrastructure, where and when needed, with new components and protocols depending on client mobility patterns and on evolving service/user requirements. Dynamic distribution/modification of code and dynamic resource binding are very similar in case of both MAs and mobile users/terminals. Differently from other mobile code technologies, MAs benefit from the additional flexibility of moving code together with the state modified during the already performed computation. In addition, mobile computing can greatly benefit from the possibility of asynchronicity between user/terminal requests of operations and their execution. For instance, wireless connections impose strict constraints on available bandwidth and on communication reliability, and force to minimize the connection time of the wireless client device. The MA paradigm does not need continuous network connectivity because connections are required only for the
8
time needed to inject MAs from mobile terminals to the fixed network infrastructure, for instance through the current wireless point of attachment. MAs are autonomous and can carry on services even when launching users/terminals are disconnected, by delivering service results back at their reconnection. Moreover, middleware solutions for mobile computing should give application designers full location visibility to perform application-specific optimizations and to adapt to local resource availability. For instance, a mobile service should both accommodate mobile users changing location during service provisioning and dynamically tailor its results depending on the properties of the current network location. The property of location awareness, typical of the MA programming paradigm, significantly helps in propagating allocation visibility up to the application level [10, 11]. In addition, the MA autonomy from clients simplifies dynamic personalization. For instance, MAs can act as mobile proxies working over the fixed network on the behalf of the wireless client, and can follow user movements to stay co-located in the same network locality and to tailor service results depending on personal preferences and access device profiles [21]. The MA technology has also some drawbacks, often identified in the associated security and interoperability issues. However, these potential weaknesses have challenged MA researchers, since the beginning, to investigate and provide rich mechanisms, tools and strategies for security and interoperability, directly embedded in several state-of-the-art MA platforms. These MA platform-embedded solutions become building blocks to employ also when dealing with the security and interoperability issues associated with mobile computing supports. For instance, as detailed in the second chapter in Section IX, many MA systems integrate with Public Key Infrastructures for securing MA communications and resource access, and this security infrastructure significantly simplifies the authentication of mobile us-
9
ers/terminals, too. Analogously, the MA research has promoted interoperable and standard interfaces to interact with resources and service components available in statically unknown hosting environments (compliance with CORBA and MA-specific standards such as OMG MASIF and FIPA [22, 23]); these interoperability features can help in supporting the interworking of mobile users/terminals with previously unknown local resources.
3
An Overview of MA–based Supports for Mobile Computing
As already stated, MA-based middlewares are particularly suitable for supporting development deployment of mobile applications. Here, we provide an overview of the most relevant research work in the field, with the aim of exemplifying, through actual experiences of middleware design and implementation, which are the primary approaches emerging to address the different forms of mobility, i.e., user mobility, terminal mobility, and mobile access to resources. User mobility refers to the ability of a user to seamlessly switch between different access terminals, by maintaining her personal preferences and her session state independently of terminal characteristics [4]. This requires a support infrastructure capable of keeping user session information and of organizing the user working environment accordingly. MAs represent a valuable technology in implementing such a middleware support because they can maintain user profiles and active service session data within their states, preserving that information even after migration. For instance, a personal MA can be associated to a user to manage her terminal switching; in particular, whenever the user changes the used access terminal, the middleware transparently reconnects her with the associated MA (just migrated to the new access device) that is in charge of carrying on her service session. The Secure and Open Mobile Agents (SOMA) middleware is specifically targeted to the support of adaptive service provisioning in pervasive environments [4, 24]. The SOMA sup-
10
port for user mobility provides each mobile user with an MA acting as her care-of entity, which encapsulates the user profile expressed according to the XML-based Composite Capabilities/Preference Profiles (CC/PP) standard representation format [25]. The SOMA agent retrieves the user profile at the beginning of her service session and makes it available in the visited network access localities. Profile data rule service provisioning adaptation: for instance, in a museum guide service, the SOMA agent tailors the artwork description on the basis of the user age, interests, and language. Analogous profiles, and the same CC/PP format, also express the characteristics of the currently used access device. The Adaptation Agents for Nomadic Users (Monads) project focuses on how to extend existing MA platforms with flexible and portable features to support user mobility [26, 27]. In Monads, mobile users exploit smart cards to store MAs and user profiles. When a user connects at a new access device, her MA jumps from the smart card to the terminal by carrying the associated user profile. Then, the Monads MA negotiates service provisioning parameters with local service agents based on the user preferences included in the profile. MAs are proving their effectiveness also in supporting terminal mobility. A crucial advantage of MAs for this kind of mobility is that they can operate on the terminal behalf even when it is off-line, by preserving its session state. Two different types of terminal mobility are identified in the literature: nomadic mobility and roaming mobility. Nomadic mobility assumes a scenario where typically non-limited access terminals, such as fully equipped laptops, can disconnect/reconnect from/to different network localities. The earliest MA platforms were targeted to support nomadic mobility, and, also for this reason, most of them provide facilities for MA execution suspension and persistency. The ultimate goal of D'Agents (Dartmouth Agents) is the support of applications for distributed information retrieval in heterogeneous networks [10, 28]. The D’Agents middleware implements no-
11
madic mobility by means of its Docking System: on-line docking hosts, paired with mobile terminals, are permanently available in the different network localities. When an MA is unable to migrate towards a mobile terminal, it is transparently forced to wait at the associated docking node. When the nomadic terminal reconnects, the docking host is notified of the new network address of the associated terminal, and forwards all waiting agents to it. Similarly, each SOMA network locality transparently “freezes” MAs attempting to migrate to a temporarily disconnected mobile terminal. The SOMA discovery service detects the entering and connection of a new mobile terminal to a network locality, and triggers a corresponding event notification that produces the execution restart of the interested freezed MAs. The Advanced Mobile Application Support Environment (AMASE) concentrates on supporting mobile applications over a wide range of heterogeneous access terminals [9, 29]. AMASE implements a Kindergarten Service that hosts suspended MAs in a locally available database and registers them in a globally visible LDAP server. Suspended agents can be retrieved and awaken by exploiting this directory naming solution. Roaming mobility identifies a service scenario where wireless access points to the fixed Internet infrastructure offer continuous connectivity to mobile terminals that roam between different wired-wireless network localities. As depicted in Figure 1, we can distinguish two main MA-based middleware approaches to roaming mobility, differing in positions that support MA execution: on the wireless device (on-board), or close to it over a wired node in the same network locality (on-the-dock). Examples of systems adopting the on-board solution are JADE/LEAP and AMASE. The Java Agent DEvelopment Framework (JADE) is a widely adopted support for multi-agent systems, and has recently been integrated with the results of the Lightweight Extensible Agent Platform (LEAP) project, to obtain a FIPA-compliant agent platform with reduced footprint
12
[30, 31]. JADE/LEAP and AMASE provide lightweight instances of their MA middleware, respectively for the Java 2 Micro Edition and Personal Java, to be installed on resourcelimited access devices. These systems support the development of MA-based mobile applications, by allowing the MA execution directly on the roaming terminals. On-Board Mobile Agents
MA
Wireless locality
Terminal/MA mobility
MA-Device Binding
On-the-Dock Mobile Agents
MA-Resource Binding
Previous location
Current location
Figure 1. Mobile agents at work on-board and on-the-dock.
Other MA-based middlewares, e.g., Grasshopper/Enago and SOMA, opt for the on-the-dock approach, and provide a decentralized infrastructure of proxies working over the fixed network on the behalf of wireless access devices. Each proxy is implemented by one MA that follows device movements during service provisioning by maintaining the session state. The proxy can also smooth the problems due to intermittent device connections and resource limits, and can exploit user/terminal profiles with personal preferences and device characteristics to customize the service provisioning session. Grasshopper is an MA platform providing interoperability with the most popular standards in the field (CORBA, MASIF, and FIPA), and is mainly targeted to network management applications, especially for 3G mobile communication systems. The Enago project supports roaming mobility by extending Grasshopper with a flexible support for a large spectrum of heterogeneous wireless devices [32, 33]. Grasshop-
13
per/Enago provides proxy components in charge of mediating between legacy distributed systems and portable devices, by exploiting a multi-protocol communication service. These proxies also implement transcoding functionality to tailor service results to the specific characteristics of the client device. Analogously, adaptation is a primary feature of the SOMA shadow proxies, which provide both filtering and transcoding operations [21, 24]. Filtering permits to recognize and discard parts of service responses whenever the client device cannot support their visualization, while transcoding performs even complex transformations on service data flows, such as HTML-to-WML conversion and multimedia format transcoding. The support of mobile applications also calls for addressing the relevant issue of mobile access to resources, i.e., how to discover resources and service components, and how to obtain/maintain/re-qualify resource bindings while moving [4]. MA platforms are particularly suitable to this scope: they have traditionally treated similar problems because agent mobility forces to provide support solutions to connect/reconnect to the needed resources after the MA migration to unknown execution environments. A first challenging aspect of mobile access to resources rises from the impossibility to assume any a-priori knowledge about the set of available resources and service components. This requires the adoption of articulated mobility-enabled naming solutions to maintain the information about resource availability and allocation. Several MA systems exploit either standard discovery solutions, such as Jini, SLP, and Salutation, or directory solutions, such as LDAP. For instance, in AMASE, local LDAP replicas provide MAs with information about locally/globally available services and about the MA location. A second issue relates to the dynamic creation and reconfiguration of bindings between MAs and their resources during a service session. In AMASE, the MA migration is conditional to the availability of the needed resources in the destination locality. To this purpose,
14
AMASE supports resource negotiation and reservation between MAs and the nodes where they intend to move to. In addition, once migrated, the MA is prevented from using more resources than reserved. Other very recent approaches start to investigate how to support different resource binding strategies, dynamically decided depending on the runtime evaluation of the provisioning environment conditions [5]. Resource binding re-arrangement after MA migration may involve voiding bindings, re-establishing new ones, or even migrating (replicas of) resources to the new network locality along with the migrating MAs. For instance, SOMA supports the dynamic reconfiguration of resource bindings according to four different strategies (resource movement, copy movement, remote reference, and rebinding). The choice of the binding strategy to apply is cleanly separated from the service application logic to increase flexibility and to favor reusability and rapid development. In particular, SOMA provides a Binder Manager middleware component that mediates between MAs and their referred resources and is also in charge of re-arranging bindings after the MA migration without imposing any modification in the service logic implementation [5, 24].
4
MA-based Middlewares with Context Awareness: State-of-the-Art and Emerging Research Directions
A promising and hot direction of research is the extension of MA-based mobile computing middlewares to provide full context awareness. The common idea behind all different approaches – to be overviewed in this section - is that developing and deploying adaptive mobile applications requires middleware solutions capable of providing mechanisms, tools and strategies to manage dynamically the service provisioning context. These novel middlewares should be in charge of sensing, processing, controlling, and managing context-related information and of providing mobile applications with an up-to-date context view, thus significantly simplifying the design and implementation of context-dependent mobile services. In
15
other words, the support of such middlewares is required to allow service developers to concentrate only on the application logic, on how to tailor service behavior depending on the context value at negotiation time, and on how to adapt service provisioning in response to context modifications at runtime [5]. Even if still in its infancy, the composite research area of context-aware MA-based middlewares for mobile computing tends to exhibit some common guidelines for the integration of MAs and context-specific functions. Figure 2 depicts the emerging middleware architecture. State-of-the-art MA platforms assume a default standard JVM (or a limited K-version of it [34]) to achieve maximum portability. However, middleware context facilities sometimes need to bypass the platform-dependence transparency of the JVM to obtain full visibility of context-related information, such as network monitoring data and operating system-dependent resource state. This requires providing several context-oriented implementation mechanisms to choose dynamically among when deploying the middleware over open and heterogeneous systems, as discussed in the following.
Context-dependent Mobile Applications
Contextoriented Facilities
Mobile Agent Middlewares Java Virtual Machine
Heterogeneous Distributed Systems Figure 2. The emerging architecture of MA-based mobile computing middlewares with context awareness.
16
We identify four main aspects that context-aware MA-based middlewares have to face: •
how to achieve visibility and extract context-related information from heterogeneous execution environments;
•
how to process and aggregate the above information to determine the context of mobile clients during their service sessions;
•
how to exploit context awareness flexibly to drive decisions about service adaptation;
•
and, finally, how to use full context visibility to manage Quality of Service (QoS) aspects.
Context-related information is intrinsically very heterogeneous, spanning from data associated with the execution environment (network connectivity, communication bandwidth, current workload, and locally available resources), to user-specific information (user preference profile, location, and presence of nearby users), and to physical environment conditions (noise level, and temperature). MA systems tend to achieve visibility of the above information by exploiting the portable Java environment when possible, and by integrating it with different platform-specific versions of heterogeneous sensing techniques (multi-channel sensing). In this way, middlewares can choose dynamically the most suitable monitoring mechanisms to exploit depending on the underlying operating system installed over the nodes of deployment [35]. For instance, by focusing on location, which is the most relevant context-related information in mobile environments, AMASE and MONADS obtain terminal locations by integrating with an external Global Positioning System (GPS) [27, 29]. However, GPS does not suit well metropolitan area deployment scenarios because of shadowing problems and is often not usable with portable devices because of their strict power limitations. In addition, the GPS location precision is excessive for several application domains where a coarse-grained position es-
17
timation is enough to enable context-dependent service provisioning, e.g., location-based tourist guide assistants. For the above reasons, some middlewares dealing with wired-wireless integrated networks decide to exploit the device association with a wireless cell as the location information. For instance, the SOMA location service provides the on-line visibility of cell-based positioning by exploiting roaming-specific SNMP traps generated by SNMP agents activated on any WiFi/Bluetooth access point. SOMA also provides an articulated monitoring support, capable of collecting both kernel-level data, e.g., CPU usage, memory allocation, and network traffic, and application-level data, e.g., Java object instantiations and method invocations. SOMA monitoring adopts multi-channel implementation of sensing mechanisms by exploiting both the Java Native Interface and the JVM Profiler Interface [35]. Another interesting approach to achieve position visibility is the HP Cooltown project [36, 37], where CoolAgents adopt location sensing mechanisms based on RFID Badge Readers [38]. The Cooltown RFID Reader is a Java-based wrapper that handles the sensing heterogeneity, by encapsulating the RFID hardware device and redirecting the location information to a Web presence manager. Due to the heterogeneity of the context-related information and to the multiplicity of needed sensing mechanisms, context-aware middlewares are required to provide also processing and aggregation functions to simplify the extraction of the interesting context data and to facilitate the determination of the service session context. These middleware functions aim at decoupling low-level monitoring mechanisms from high-level context-aware MAs, thus facilitating the MA development and potentially increasing component reusability. For instance, CoolAgents adopt the Georgia Tech Context Toolkit to simplify the handling and usage of context information [36, 39]. The Context Toolkit provides widget components to acquire heterogeneous context information from the execution environment and to make it uniformly available, independently of the specific sensing mechanism exploited. In addition,
18
available, independently of the specific sensing mechanism exploited. In addition, Context Toolkit aggregators can process/distill data from widgets and can provide their outputs to interpreters, responsible of performing management operations in response to context variations. A very similar goal is addressed by the Solar middleware, which provides support for context data aggregation and distribution on top of the D’Agents framework [40, 41]. Solar permits context aggregation via a set of modular and re-usable middleware operators: any operator processes and subscribes to one or more input event streams, and produces one output event stream. Solar-based mobile applications can use a tree of possibly recursive connected operators (represented by an operator graph) to specify how to produce the needed aggregated context. About the third aspect, that is how to decide and perform service management operations depending on the current context, recent research efforts are pointing out two main solution guidelines: policy-based and reflection-based service management. Policy-based MA middlewares support the flexible and dynamic specification of (some aspects of) MA behavior in terms of policies, i.e., declarative rules determining the actions that subjects can/must operate upon resources when specified conditions apply. Policies are maintained completely separated from system implementation details and are generally expressed at a high-level of abstraction to simplify their specification by system administrators, service managers, and even final users. In particular, it is possible to define MA security/mobility/binding behavior in terms of access control and obligation policies, completely separated from the MA code, thus improving the re-utilization and the rapid prototyping of MA-based components. For instance, SOMA integrates with a distributed infrastructure for the enforcement of policies expressed in the Ponder language [24, 42]. SOMA policies permit to specify which resources are accessible and belong to a service provisioning context de-
19
pending on dynamically evaluated conditions (access control policies) and the actions MAs must perform when certain context-triggered events occur (obligation policies). Conditions and events, in their turn, may depend on the values/changes of context-related information. Another emerging research direction is the exploitation of policies to control the coordination and the interaction among MAs. For instance, context-related information in CoolAgents is expressed by XML-based RDF specifications, and is automatically translated in Prolog rules that are dynamically interpreted to customize the behavior of MA-based applications [35]. Reflection-based MA middlewares exploit reflection mechanisms for context visibility/processing and meta-objects for context-dependent service adaptation. Middlewares that follow this approach suggest a service design methodology decomposing the contextdependent service logic in two different levels: a base-level including the primary MA logic, and a meta-level in charge of transparently re-adjusting the MA behavior depending on the current context. For instance, Tanter and Piquer’s middleware defines customizable resource binding strategies which are implemented as basic reusable meta-objects attached to any mobile application component [43]. In general, reflection represents an interesting design guideline to achieve context awareness in middleware solutions, but it is difficult to integrate with legacy systems typically implemented by non-reflective programming languages. On the contrary, policy-based approaches require the availability of monitoring and event middleware facilities to trigger the policy enforcement anytime relevant context changes occur, but can apply also to legacy services, independently of their implementation language. Finally, context awareness is also essential to enable service management operations to monitor, control, tailor and adapt the QoS levels provided during service sessions. This is particularly crucial when operating either over best-effort networks or with frequent client mobility (and frequent resulting modifications of the client points of attachment to the network),
20
where it is hard to guarantee the provided QoS via resource reservation at negotiation time. In these scenarios, managing QoS means operating promptly to try to maintain the agreed upon QoS levels, independently of the changes in available resources occurring in the provisioning environment. In other words, context-aware middlewares with QoS management goals should provide the on-line monitoring of the context information of interest for the supported QoSsensitive applications, and should react promptly to context modifications with proper service management operations, e.g., by transcoding on-the-fly a high-resolution MJPEG video stream to a low-resolution MPEG2 version of it when the locally available bandwidth falls. For instance, the SOMA QoS support is centered on the dynamic adaptation of provided QoS over best-effort networks. SOMA includes a rich monitoring infrastructure to achieve full context visibility [35]. Context variations related to changes in network-, system- and application-level resource state simply trigger corrective QoS management operations. These operations are performed by SOMA agents that compose a dynamically deploying applicationspecific overlay network. While SOMA focus is on QoS monitoring and control, MONADS exemplifies an alternate interesting approach based on context prediction [27]. MONADS provides a QoS prediction facility that, on the basis of the previous context values and of its evolution history, models QoS as a function of location and time, and supplies estimates about future QoS levels based on this model. Context estimates are exploited in MONADS for scheduling, data pre-fetching, and connection management decisions.
5
Lessons Learned and Open Issues
As discussed above, in the last five years several research activities have addressed different aspects of MA-based supports for mobility and have shown the suitability and the effectiveness of adopting the MA programming paradigm in this scenario. Even if these researches are still looking for a single agreed upon MA-based killer application, they have already shown
21
that, at least for mobile computing middlewares, where MAs work as proxies of possibly disconnected users/devices, “while none of the individual advantages of MAs is overwhelmingly strong, we believe that the aggregate advantages of MAs are overwhelmingly strong” [44]. The enlarging market of wireless portable devices is further motivating this claim, since limited wireless terminals stress both the need to manage discontinuities in resource availability during service provisioning and the relevance of mobile middleware intermediaries dynamically deploying over the wired infrastructure, when and where needed. The research work done has pointed out several lessons learned, which have become common guidelines of solution for MA platforms in general, and for MA-based middlewares in the specific case of mobile computing support. On the one hand, it is reasonable that MA platforms work on the standard JVM to achieve portability over open distributed systems. Therefore, service developers should expect weak mobility to be the typical type of MA mobility supported: it is not accidental that all Java-based MA approaches sketched in Sections 3 and 4 provide weak mobility. On the other hand, it is crucial that MA platforms give the full visibility of location information to MA programmers, because it is fundamental, in mobile computing especially, to have location information modeled as a first class programming concept. Moreover, MA-based frameworks for mobile computing should provide a modular mobility support to accommodate differentiated forms of mobility (both nomadic and roaming), from user/terminal mobility to dynamic resource binding re-arrangement, also in case of the dynamic re-allocation of resources and service components. The other two main guidelines emerged in the state-of-the-art research in the field are the adoption of proxy-based architectures and the necessity of full context awareness. On the one hand, MA-based mobile proxies can assist locally mobile clients during their whole service sessions, e.g., by tailoring and adapting service contents to the specific user preferences and
22
access device characteristics. On the other hand, in the mobile computing scenario, the design and implementation of applications should achieve high service adaptability, in order to fit the very differentiated and heterogeneous provisioning conditions. This calls for middleware mechanisms and tools to properly manage context and its frequent runtime modifications. The promising results obtained in MA-based middlewares for mobile computing are encouraging further activities and are likely to attract several research efforts in the next months. A very relevant open issue is how to express resource binding/mobility strategies at the proper level of abstraction, by maintaining a clear separation between the currently enforced strategy and the service logic implementation, in order to achieve the requested level of dynamicity, flexibility and reusability of both middleware and service components. Policy-based and reflective-based approaches presented in Section 4 well exemplify this trend. Novel middleware solutions should integrate with different types of high-level metadata to provide the needed management configurability while hiding low-level mechanisms and implementation details from service developers and system administrators [5]. Another central open issue is the support of dynamic and open service composition, crucial to fast prototype and tailor service provisioning in very heterogeneous mobile environments. Dynamic service composition require accepted models and representation formats to describe the interface, the invocation syntax and the semantics associated with available service components. The recent standardization efforts accomplished in Web services, with their XML-based formats for registration/discovery, service description, and service access, respectively UDDI, WSDL, and SOAP, certainly represent an interesting first step towards open service composition, which MA supports for mobile computing are expected to integrate within their frameworks soon [45]. As a side effect, this will also extend the possibility for
23
MA-based supports to integrate with existing systems and services, thus leveraging the diffusion of MA technologies in commercial and industrial applications.
Acknowledgements Work supported by the Italian Ministero dell'Istruzione, dell'Università e della Ricerca (MIUR) in the framework of the FIRB WEB-MINDS Project "Wide-scale Broadband Middleware for Network Distributed Services" and by the Italian Consiglio Nazionale delle Ricerche (CNR) in the framework of the Strategic IS-MANET Project "Middleware Support for Mobile Ad-hoc Networks and their Application".
References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
L. Blazevic, L. Buttyan, S. Capkun, S. Giordano, J.-P. Hubaux, J.-Y. Le Boudec, “Self Organization in Mobile Ad Hoc Networks: the Approach of Terminodes”, IEEE Communications, Vol. 39, No. 6, June 2001. C. Perkins (ed.), Special Section on “Autoconfiguration”, IEEE Internet Computing, Vol. 3, No. 4, July 1999. L. Bos, S. Leroy, “Toward an All-IP-based UMTS System Architecture”, IEEE Network, Vol. 15, No. 1, Jan.-Feb. 2001. P. Bellavista, A. Corradi, C. Stefanelli, "Mobile Agent Middleware for Mobile Computing", IEEE Computer, Vol. 34, No. 3, Mar. 2001. P. Bellavista, A. Corradi, R. Montanari, C.Stefanelli, “Dynamic Binding in Mobile Applications”, IEEE Internet Computing, Vol. 7, No. 2, Mar.-Apr. 2003. J.A. Moura, J.M. Oliveira, E. Carrapatoso, R. Roque, “Service Provision and Resource Discovery in the VESPER VHE”, IEEE Int. Conf. on Communications (ICC’02), IEEE Computer Society Press, USA, Apr. 2002. Teleca AB - Bluetooth Local Infotainment Point (BLIP), http://www.teleca.com V. Kumar, S. Parimi, D.P. Agrawal, “WAP: Present and Future”, IEEE Pervasive Computing, Vol. 2, No. 1, Jan.-Mar. 2003. E. Kovacs, K. Rohrle, M. Reich, “Integrating Mobile Agents into the Mobile Middleware”, Proc. Mobile Agents Int. Workshop (MA'98), Berlin, Germany, 1998. D. Kotz, R. Gray, S. Nog, D. Rus, S. Chawla, G. Cybenko, “Agent TCL: Targeting the Needs of Mobile Computers”, IEEE Internet Computing, Vol. 1, No. 4, July-Aug. 1997. S. Lipperts, A. Park, “An Agent-based Middleware: a Solution for Terminal and User Mobility,” Computer Networks, Vol. 31, Sep. 1999. J.E. White, “Telescript Technology: the Foundation for the Electronic Marketplace”, General Magic White Paper, http://www.genmagic.com, 1994. N.S. Borenstein, “E-Mail with a Mind of its Own: The Safe-Tcl Language for Enabled Mail”, IFIP Transactions C (Communication Systems), Vol. C-25, 1994. V. Kisielius, “Applying Intelligence Makes E-commerce Pay Off”, Electronic Commerce World, Vol. 7, No. 12, Dec. 1997. D. Chess, B. Grosof, C. Harrison, D. Levine, C. Parris, G. Tsudik, “Itinerant Agents for Mobile Computing”, IEEE Personal Communications, Vol. 2, No. 5, May 1995. A. Fuggetta, G.P. Picco, G. Vigna, “Understanding Code Mobility”, IEEE Transactions on Software Engineering, Vol. 24, No. 5, May 1998. J.W. Stamos, D.K. Grifford, “Implementing Remote Evaluation”, IEEE Transactions on Software Engineering, Vol. 16, No. 7, July 1990.
24
[18] G. Goldszmidt, “Distributed System Management via Elastic Servers”, IEEE Int. Workshop on Systems Management (SMW’93), IEEE Computer Society Press, USA, Apr. 1993. [19] N.M. Karnik, A.R. Tripathi, “Design Issues in Mobile Agent Programming Systems”, IEEE Concurrency, Vol. 6, No. 3, July-Sep. 1998. [20] D. Chess, C.G. Harrison, A. Kershenbaum, “Mobile Agents: Are They a Good Idea?”, in G. Vigna (ed.), Mobile Agents and Security, LNCS 1419, Springer Verlag, 1998. [21] P. Bellavista, A. Corradi, C. Stefanelli, “The Ubiquitous Provisioning of Internet Services to Portable Devices”, IEEE Pervasive Computing, Vol. 1, No. 3, July-Sep. 2002. [22] Object Management Group, Mobile Agent System Interoperability Facility (MASIF) specification, http://www.fokus.fraunhofer.de/research/cc/ecco/masif [23] Foundation for Intelligent Physical Agents (FIPA), http://www.fipa.org [24] Dept. Electronics Computer Science and Systems (DEIS) - University of Bologna, Secure and Open Mobile Agents (SOMA), http://lia.deis.unibo.it/research/SOMA [25] W3 Consortium, Composite Capability/Preference Profiles (CC/PP), http://w3.org/Mobile [26] S. Campadello, H. Helin, O. Koskimies, P. Misikangas, M. Mäkelä, K.Raatikainen, “Using Mobile and Intelligent Agents to Support Nomadic Users”, 6th Int. Conf. Intelligence in Networks (ICIN2000), France, Jan. 2000. [27] Dept. Computer Science - University of Helsinki, Adaptation Agents for Nomadic Users (Monads), http://www.cs.helsinki.fi/research/monads [28] Dept. Computer Science – Dartmouth College, Dartmouth Agents (D’Agents), http://agent.cs.dartmouth.edu [29] B. Schiemann, E. Kovacs, K. Röhrle, “Adaptive Mobile Access to Context-Aware Services”, 3rd Int. Workshop Mobile Agents (MA’99), IEEE Computer Society Press, USA, Oct. 1999. [30] F. Bellifemine, A. Poggi, G. Rimassa, “JADE – A FIPA-compliant Agent Framework", 4th Int. Conf. Practical Application of Intelligent Agents and Multi-Agent Technology (PAAM’99), Great Britain, 1999. [31] Telecom Italia Lab, The Java Agent DEvelopment Framework (JADE), http://sharon.cselt.it/ projects/jade/ [32] M. Breugst, T. Magedanz, “Mobile Agents - Enabling Technology for Active Intelligent Network Implementation”, IEEE Network, Vol. 12, No. 3, Aug. 1998. [33] IKV++, Grasshopper 2, http://www.grasshopper.de [34] Sun Community Source Licensing – K Virtual Machine (KVM), http://wwws.sun.com/software/ communitysource/j2me/cldc/ [35] P. Bellavista, A. Corradi, C. Stefanelli, “Java for On-line Distributed Monitoring of Heterogeneous Systems and Services”, The Computer Journal, Vol. 45, No. 6, Nov. 2002. [36] H. Chen, S. Tolia, “Steps Towards Creating a Context-Aware Software Agent System”, HP Technical Report HPL-2001-231, Sep. 2001. [37] Hewlett Packard, Cooltown, http://cooltown.hp.com/cooltownhome [38] V. Stanford, “Pervasive Computing Goes the Last Hundred Feet with RFID Systems”, IEEE Pervasive Computing, Vol. 2, No. 2, Apr.-June 2003. [39] A.K. Dey, D. Salber, G.D. Abowd, “A Conceptual Framework and a Toolkit for Supporting the Rapid Prototyping of Context-Aware Applications”, Human-Computer Interaction (HCI) Journal, Vol. 16, 2001. [40] G. Chen, D. Kotz, “Context-Sensitive Resource Discovery”, First Int. Conf. Pervasive Computing and Communications (PERCOM’03), IEEE Computer Society Press, USA, Mar. 2003. [41] Dept. Computer Science – Dartmouth College, Solar, http://www.cs.dartmouth.edu/~solar [42] R. Montanari, C. Stefanelli, N. Dulay, “Flexible Security Policies for Mobile Agent Systems”, Microprocessors and Microsystems, Elsevier Science, Vol. 25, No. 2, May 2001.
25
[43] E. Tanter, J. Piquer, “Managing References upon Object Migration: Applying Separation of Concerns”, 21st Int. Conf. Chilean Computer Science Society (SCCC'01), IEEE Computer Society Press, Chile, 2001. [44] R.H. Glitho, “Emerging Alternatives to Today's Advanced Service Architectures for Internet Telephony: IN and Beyond”, Computer Networks, Vol. 35, No. 5, 2001. [45] F. Curbera, M. Duftler, R. Khalaf, W. Nagy, N. Mukhi, S. Weerawarana, “Unraveling the Web Services: an Introduction to SOAP, WSDL, and UDDI”, IEEE Internet Computing, Vol. 6, No. 2, Mar.-Apr. 2002.
26