Presentation is loading. Please wait.

Presentation is loading. Please wait.

ATSN'09, Budapest, 12 May 2009 1 MAPS: A Mobile Agent Platform for WSNs based on Java Sun Spots F. Aiello, Giancarlo Fortino, R. Gravina, A. Guerrieri.

Similar presentations


Presentation on theme: "ATSN'09, Budapest, 12 May 2009 1 MAPS: A Mobile Agent Platform for WSNs based on Java Sun Spots F. Aiello, Giancarlo Fortino, R. Gravina, A. Guerrieri."— Presentation transcript:

1 ATSN'09, Budapest, 12 May 2009 1 MAPS: A Mobile Agent Platform for WSNs based on Java Sun Spots F. Aiello, Giancarlo Fortino, R. Gravina, A. Guerrieri Department of Electronics, Informatics and Systems (DEIS) University of Calabria, Rende (CS), ITALY g.fortino@unical.it

2 ATSN'09, Budapest, 12 May 2009 2 Motivations and Objectives  Wireless Sensor Networks (WSNs) are emerging as powerful platforms for distributed embedded computing supporting a variety of high-impact applications  However programming WSNs is a complex task due to the limited capabilities and energy resources of each sensor node as well as the lack of reliability of the radio channel.  Moreover, WSN programming is usually application-specific (or sometimes domain-specific) and requires tradeoffs in terms of task complexity, resource usage, and communication patterns. Therefore the developed software which usually integrates routing mechanisms, time synchronization, node localization and data aggregation is tightly dependent on the specific application and scarcely reusable. 2

3 ATSN'09, Budapest, 12 May 2009 3 Motivations and Objectives  Thus to support rapid development and deployment of flexible WSN applications, WSN-aware programming paradigms are needed which directly provide proactive and on-demand code deployment at run-time as well as ease software programming at application, middleware and network layer.  Among the programming paradigms proposed for the development of WSN applications, the mobile agent-based paradigm, which has already demonstrated its effectiveness in conventional distributed systems as well as in highly dynamic distributed environments, can effectively deal with the programming issues that WSNs have posed.  We believe that mobile agents can provide more benefits in the context of WSNs than in conventional distributed environments. 3

4 ATSN'09, Budapest, 12 May 2009 4 Motivations and Objectives  The objective of this paper is twofold:  we motivate the use of mobile agents as enabling paradigm and technology for WSNs due to their distinctive features able to effectively and efficiently deal with WSN network dynamism and constrained resources.  we propose the design of a Java-based lightweight mobile agent-based framework for WSNs which provide a flexible and extensible distributed programming environment for WSN applications and services. 4

5 ATSN'09, Budapest, 12 May 2009 5 Outline  Mobile Agents in WSNs: restyling the 7 good reasons  Related Work  A Mobile Agent-based Framework for WSNs: architecture and programming model  A simple programming example  Performance evaluation  Conclusions and on-going work

6 ATSN'09, Budapest, 12 May 2009 6 Mobile Agents in WSNs  Mobile agents are a distributed computing paradigm particularly suitable for supporting the development of distributed applications, services, and protocols in conventional distributed systems as well as in highly dynamic distributed environments.  A mobile agent is a software process able to migrate from one computing node to another by retaining its execution state.  As advertised by Lange and Oshima in their seminal paper, there are at least 7 good reasons ( Network load reduction, Network latency overcoming, Protocol encapsulation, Asynchronous and autonomous execution, Dynamic adaptation, Orientation to heterogeneity, Robustness and fault-tolerance ) to use mobile agents

7 ATSN'09, Budapest, 12 May 2009 7 Mobile Agents in WSNs: 7 good reasons  Network load reduction Mobile agents can access remote resources (e.g. databases, data repositories, sensors) or communicate with remote mobile/stationary agents or with other software components, by moving to their locations and interacting with them locally so saving network resources such as bandwidth during the interaction phase.  An example: “A sensor node periodically transmits the sensed data to a sink node which, in turn, processes them to extract some aggregated information”. The transmission of the sensed data from the sensor node to the sink node consumes bandwidth in the path from the sensor node to the sink node (this effect is much more remarkable in multi-hop paths than in single-hop paths). A mobile agent incorporating the data processing algorithm can migrate to the sensor node and locally apply this algorithm so reducing bandwidth consumption. Finally, the mobile agent should also transmit the aggregated data to the sink node but, in this case, the consumed bandwidth is much lower than the bandwidth needed for the transmission of raw sensed data.

8 ATSN'09, Budapest, 12 May 2009 8 Mobile Agents in WSNs: 7 good reasons  Asynchronous and autonomous execution Asynchrony and autonomy are distinctive properties of mobile agents. Once injected into the network, mobile agents can autonomously carry out the programmed tasks and support disconnected operations by operating asynchronously with respect to the process or device that has generated them. These properties are very important in dynamic environments where the network topology rapidly changes and connections are not stable so that they can be established only for short time periods.  An example: “Periodically the WSN manager queries all the nodes (or a node subset) of its WSN to have a snapshot of the energy consumption”.  To this purpose, a mobile agent, spawn by the manager, can autonomously travel across the network to gather the requested information “node by node” and, finally, asynchronously report this information to its owner.

9 ATSN'09, Budapest, 12 May 2009 9 Mobile Agents in WSNs: 7 good reasons  Robustness and fault-tolerance As mobile agents possess the ability to react dynamically to unfavorable situations and unexpected events, they can support the construction of robust and fault tolerant distributed systems.  An example: “A sensor node is going to be shut down due to uncharged batteries so the sensing activity should be activated on a neighbor sensor node at run-time”.  All the mobile agents executing on the uncharged sensor node can (autonomously or passively) migrate to another equivalent node (already present or newly introduced) so continuing their activity after migration.

10 ATSN'09, Budapest, 12 May 2009 10 Mobile Agents in WSNs: available MAS  MAS for conventional platforms:  Java-based: Aglets, Ajanta, Voyager, Jade, etc…  Non-Java-based: D’Agents, ARA, etc…  MAS for WSNs:  Agilla (very lightweight, tuple-space, TinyOS)  SensorWare (TCL, iPAQ)  Variants/Extensions of Agilla (message comms)  actorNet (functional language, TinyOS)  Agent Factory Micro Edition (AFME, J2ME for smartphones/PDAs)

11 ATSN'09, Budapest, 12 May 2009 11 MAPS: Requirements  Lightweight agent architecture, so that agents can be efficiently executed and migrated.  Minimal core services to provide agent migration, sensing capability access, agent naming, agent communication, and timing.  Plug-in-based architecture extensions, which allows to define any other service in terms of one or more dynamically installable components (or plug-ins) implemented as single mobile agent or cooperating mobile agents.  Layer-oriented mobile agents, which are natively characterized on the basis of the layer to which they belong: application, middleware and network layer. They must be also able to locally interact to enable cross-layering.  Programming language of the sensor node platform.

12 ATSN'09, Budapest, 12 May 2009 12 MAPS: MAS architecture

13 ATSN'09, Budapest, 12 May 2009 13 MAPS: agent architecture MPSM=Multi-plane State Machine ECAA=Event/Condition/Action Automaton GV=Global Variables GF=Global Functions LV=Local Variables LF=Local Functions ED=Event Dispatcher

14 ATSN'09, Budapest, 12 May 2009 14 MAPS: agent primitives

15 ATSN'09, Budapest, 12 May 2009 15 MAPS framework: Java Sun Spots  The Sun SPOT sensor nodes are based on the Squawk VM which is fully Java compliant and CLDC 1.1-compatible. In particular, the offered features are the following:  Java programming language  NetBeans IDE for software development  Single-hop/multi-hop and reliable/unreliable communications  Easy access to the sensor node devices  Code migration support  Java is used as language for programming events, conditions and actions of the behavior of agents.

16 ATSN'09, Budapest, 12 May 2009 16 MAPS framework: class diagram

17 ATSN'09, Budapest, 12 May 2009 17 A Simple MA-based Application: a programming example  The mobile agent application is composed of three agents:  DataCollector, which collects data sensed from the temperature, light and accelerometer sensors of the SunSPOT node;  DataMessenger, which is launched by the DataCollector and carries collected sensed data from the sensing node to the base station;  DataViewer, which displays the received collected data.

18 ATSN'09, Budapest, 12 May 2009 18 The Data Collector

19 ATSN'09, Budapest, 12 May 2009 19 The Data Collector

20 ATSN'09, Budapest, 12 May 2009 20 Performance Evaluation  The used testbed for testing and evaluation consists of a SunSPOT kit (two sensor nodes and one base station) with the SDK 3.0 version (purple).  The MAPS framework has a memory occupation (without any running agent) of about 70 Kbyte in central memory, keeping free a space of 378 Kbyte. (ping-pong agent memory = 22KB)  Such space can be exploited for agent execution.  The space occupied by the jar of MAPS on the flash memory is 92 Kbyte out of the 4 MB available.

21 ATSN'09, Budapest, 12 May 2009 21 Performance Evaluation  To evaluate the performance of MAPS three micro- kernel benchmarks have been defined for the following mechanisms:  Agent communication  Agent creation  Agent migration

22 ATSN'09, Budapest, 12 May 2009 22 Performance Evaluation Agent communication: request/reply time. Agent creation time. Agent migration: ping-pong time. The obtained migration times are high due to the slowness of the SquawkVM operations supporting the migration process. In particular, serialization is a very costly operation: serialization of the ping-pong agent averagely takes 4.5s. Moreover, radiostream connections are very slow to guarantee reliability.

23 ATSN'09, Budapest, 12 May 2009 23 Conclusions  This paper has proposed mobile agents as an enabling technology for programming WSNs. We believe that, due to their specific characteristics, mobile agents can provide more benefits in the context of WSNs than in conventional distributed environments.  To actually experiment with mobile agents in WSNs a mobile agent framework, named MAPS, has been defined which provides an event-driven component-based architecture for supporting agent execution, communication and migration.  Mobile agents are programmed according to a hybrid yet effective programming language which integrates three major WSN programming paradigms (event-driven, state-based and mobile agent- based programming) along with the emerging role-based programming.  A programming example of mobile agents at middleware layer (data collection) has been also presented and discussed to exemplify the proposed framework.  The framework is currently developed by using the innovative Sun SPOT technology which allows for an easy programming of the sensor nodes in Java. In particular, both the agent server and the mobile agents are implemented as Isolates (applications represented as isolated threaded objects) which can be easily paused, migrated to a different sensor node and restarted.  However, performance penalties do exist due to Java Sun Spot basic mechanisms (hibernation, serialization, and reliable communications)

24 ATSN'09, Budapest, 12 May 2009 24 On-going Work  More detailed performance evaluation by using the last version (Blue) of the SunSPOT SDK  Test Applications  Object tracking  Rumor routing  Data collection  Agent-based version of SPINE – Signal Processing In-Node Environment (spine.tilab.com)  Activity monitoring of assisted livings by using MAPS-based SPINE  Porting on Sentilla sensor platform

25 ATSN'09, Budapest, 12 May 2009 25 MAPS – Mobile Agent Platform for Java SunSPOTS http://maps.deis.unical.it Any questions ???


Download ppt "ATSN'09, Budapest, 12 May 2009 1 MAPS: A Mobile Agent Platform for WSNs based on Java Sun Spots F. Aiello, Giancarlo Fortino, R. Gravina, A. Guerrieri."

Similar presentations


Ads by Google