[ieee 2007 innovations in information technologies (iit) - dubai, united arab emirates...

5
Pattern-Based Design for Intelligent Mobile Agents Ananta Charan Ojha ICFAI School of IT, ICFAI University, Hyderabad, INDIA acojha2002@yahoo. co. in Sateesh Kumar Pradhan Dept. of Computer Science, Utkal University, Bhubaneswar, INDIA sateeshind@yahoo. com Manas Ranjan Patra Dept. of Computer Science, Berhampur University, Berhampur, INDIA manasrpbu@yahoo. com Abstract Mobile agent paradigm is an excellent proposition for distributed computing. More often mobile agents need to be intelligent in distributed and open multi- agent systems to carry out the assigned tasks efficiently. However, factors like network traffic, bandwidth and wireless communication may pose hindrances to the mobility of these agents over the Internet. The problem can be alleviated through a modular, reliable and robust design for the agents. Towards this end, the paper proposes a Behaviour Helper design pattern and pattern-based design for intelligent mobile agents for dynamic, on-demand behaviour while achieving efficient mobility. Keywords: Agent Design Pattern, Intelligent Mobile Agent, Agent-Based E-Commerce, Multi-agent System, Software Design 1. Introduction Multi-agent system (MAS) is very appealing for building open and distributed applications [1]. Mobile agents provide a novel and useful paradigm for an open and distributed M\AS [2, 3, 4]. These mobile agents need to posses varied degree of intelligence in order to interact with other agents to meet their assigned goals. The degree of intelligence increases with diversity of knowledge and capability of the agent. They move from host to host and display intelligent behaviour that is dynamic and location based. For example, electronic commerce that has been recognized as a very promising application area for software agents is perceived as open, distributed and complex. In agent- based e-commerce the intelligent mobile agents representing human buyers and sellers need to visit different marketplaces on the Internet. They need to carry out successful multi-agent interactions while displaying adaptive intelligent behaviour based on market dynamics to deal with e-commerce negotiations. As their capability to deal with different types of markets and market mechanisms increases, these agents necessarily become fatty with rich intelligent behaviour. Consequently, their mobility is hindered by network factors like heavy traffic and low bandwidth. The problem can be addressed with a modular, robust and reliable design for the agents. As software design patterns have been proved to be very useful within the object-oriented paradigm for engineering better software, agent research community is investigating agent design patterns to capitalize and diffuse design experience on multi-agent systems. Effective use of design patterns in multi-agent systems can cut down the development time and cost for these systems leveraging reuse. On this backdrop, we propose a Behaviour Helper design pattern for intelligent mobile agents and evaluate its performance in a prototype system for agent-based e-marketplace. The rest of the paper is structured as follows. Section 2 provides a brief overview of research and developments on design patterns for agent-based systems found in literature. The proposed Behaviour Helper pattern is described in section 3. Section 4 briefs on the implementation of the pattern in a prototype system and presents the simulation results. Finally, the paper concludes in section 5. 2. Design Patterns for Agent-Based Systems A software design pattern describes a reoccurring design problem and provides a solution for it in a context. Design patterns have been very successful in 978-1-4244-1841-1/08/$25.00 ©D 2008 IEEE 501

Upload: manas-ranjan

Post on 13-Mar-2017

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: [IEEE 2007 Innovations in Information Technologies (IIT) - Dubai, United Arab Emirates (2007.11.18-2007.11.20)] 2007 Innovations in Information Technologies (IIT) - Pattern-Based Design

Pattern-Based Design for Intelligent Mobile Agents

Ananta Charan OjhaICFAI School ofIT,ICFAI University,Hyderabad, INDIA

acojha2002@yahoo. co. in

Sateesh Kumar PradhanDept. ofComputer Science,

Utkal University,Bhubaneswar, INDIAsateeshind@yahoo. com

Manas Ranjan PatraDept. ofComputer Science,Berhampur University,Berhampur, INDIA

manasrpbu@yahoo. com

Abstract

Mobile agent paradigm is an excellent propositionfor distributed computing. More often mobile agentsneed to be intelligent in distributed and open multi-agent systems to carry out the assigned tasksefficiently. However, factors like network traffic,bandwidth and wireless communication may posehindrances to the mobility of these agents over theInternet. The problem can be alleviated through amodular, reliable and robust design for the agents.Towards this end, the paper proposes a BehaviourHelper design pattern and pattern-based design forintelligent mobile agents for dynamic, on-demandbehaviour while achieving efficient mobility.

Keywords: Agent Design Pattern, Intelligent MobileAgent, Agent-Based E-Commerce, Multi-agentSystem, Software Design

1. Introduction

Multi-agent system (MAS) is very appealing forbuilding open and distributed applications [1]. Mobileagents provide a novel and useful paradigm for an openand distributed M\AS [2, 3, 4]. These mobile agentsneed to posses varied degree of intelligence in order tointeract with other agents to meet their assigned goals.The degree of intelligence increases with diversity ofknowledge and capability of the agent. They movefrom host to host and display intelligent behaviour thatis dynamic and location based. For example, electroniccommerce that has been recognized as a verypromising application area for software agents isperceived as open, distributed and complex. In agent-based e-commerce the intelligent mobile agentsrepresenting human buyers and sellers need to visitdifferent marketplaces on the Internet. They need tocarry out successful multi-agent interactions while

displaying adaptive intelligent behaviour based onmarket dynamics to deal with e-commercenegotiations. As their capability to deal with differenttypes of markets and market mechanisms increases,these agents necessarily become fatty with richintelligent behaviour. Consequently, their mobility ishindered by network factors like heavy traffic and lowbandwidth.

The problem can be addressed with a modular,robust and reliable design for the agents. As softwaredesign patterns have been proved to be very usefulwithin the object-oriented paradigm for engineeringbetter software, agent research community isinvestigating agent design patterns to capitalize anddiffuse design experience on multi-agent systems.Effective use of design patterns in multi-agent systemscan cut down the development time and cost for thesesystems leveraging reuse. On this backdrop, wepropose a Behaviour Helper design pattern forintelligent mobile agents and evaluate its performancein a prototype system for agent-based e-marketplace.

The rest of the paper is structured as follows.Section 2 provides a brief overview of research anddevelopments on design patterns for agent-basedsystems found in literature. The proposed BehaviourHelper pattern is described in section 3. Section 4briefs on the implementation of the pattern in aprototype system and presents the simulation results.Finally, the paper concludes in section 5.

2. Design Patterns for Agent-BasedSystems

A software design pattern describes a reoccurringdesign problem and provides a solution for it in acontext. Design patterns have been very successful in

978-1-4244-1841-1/08/$25.00 ©D 2008 IEEE501

Page 2: [IEEE 2007 Innovations in Information Technologies (IIT) - Dubai, United Arab Emirates (2007.11.18-2007.11.20)] 2007 Innovations in Information Technologies (IIT) - Pattern-Based Design

object-oriented system development [5, 6]. As agentsprovide better abstraction, they allow easieridentification of reusable parts in an agent-basedsystem. Thus, patterns can be extremely successful inM\AS and provide a strong software engineeringfoundation for MAS development.

Several proposals on design patterns for agents andmulti-agent systems have been found in literatureduring the past decade [7, 8, 9, 10, 11, 12]. In [7], Y.Aridor and D.B. Lange have discovered useful patternsfor mobile agent applications and conceptually dividedinto three classes: traveling, task, and interaction.Traveling patterns such as Itinerary, Forwarding andTicket encapsulate mobility management of an agentfor one or more destinations. Task patterns such asMaster-Slave and Plan are concerned with the break-down of task and how these tasks are delegated to oneor more agents. Interaction patterns such as Meeting,Locker, Messenger, Facilitator, and Organized Groupare concerned with locating agents and facilitating theirinteractions.

The proposal in [8] presents several patterns ofintelligent and mobile agents based on a layeredarchitecture conceived by the authors for the agentbehaviour. However, these patterns consider mobilityand intelligence separately. In [9], the author hasproposed eleven agent-oriented patterns and appliedthem to analyze, design and implement a runningmulti-agent system. All the patterns are based onstationery agents only. Social patterns based on socialand intentional characteristics of an agent are proposedin [10]. These patterns focus on social interactionsfrom organizational perspective and ignore mobility aswell as intelligence. In [ 1], the authors discusspatterns specific to coordination task in a M\AS. Thepresented patterns do not consider mobility of theagents. A set of seven patterns related to agentcommunication mechanisms are discussed in [12].While these patterns consider agent mobility, they donot take into account the intelligence and mobilitytogether.

To improve the understanding and usage of agent-oriented design patterns, it is necessary to classify thepatterns, agree upon a comprehensive patterndescription language and disseminate the experiencegained from the use of patterns. In [13], attempts havebeen made to classify the patterns. The authors in [14,15, 16] have discussed for a comprehensive patterndescription language. Attempts to integrate the patternsin agent-oriented methodologies and developmentframeworks are shown in [17, 18]. Also, there havebeen patterns for domain specific applications like e-commerce [19, 20].

Our work is different from the above in a way that itconsiders intelligence and mobility together. Wepropose a design pattern that balances domain forceslike efficient mobility and behaviour adaptability for anintelligent mobile agent in a distributed and openmulti-agent system.

3. Behaviour Helper Pattern

A pattern language is very important to describe anddocument design patterns for agents. It helps agentdesign patterns to be positioned properly within thespace of existing patterns and used successfully bysoftware engineers. We describe the proposed patternas follows:

3.1 IntentTo provide dynamic, on-demand behaviour to a

mobile agent with adequate degree of intelligencewhile making it lightweight.

3.2 ApplicabilityThe pattern is used:

* When mobile agent requires intelligentbehaviour, which may be loaded at runtimebased on dynamics of the multi-agentenvironment where it has migrated.

* When an intelligent mobile agent needs to bedispatched to an environment efficiently.

* When the user of the agent wishes to controlthe behaviour of an intelligent mobile agentin multi-agent environments.

3.3 ForcesThe following are the domain forces that a design

needs to consider.

* Adaptability: The agent design has to considerthe openness and dynamics of the distributedmulti-agent system where agents displayadaptive behaviours that follow protocols.These behaviours are temporal and locationbased.

* Mobility: Efficient mobility of the agent is akey factor in the system.

* Task: The agent needs to perform differenttasks rich in intelligence.

* Control: There is a need to control thebehaviour of the mobile agent

502

Page 3: [IEEE 2007 Innovations in Information Technologies (IIT) - Dubai, United Arab Emirates (2007.11.18-2007.11.20)] 2007 Innovations in Information Technologies (IIT) - Pattern-Based Design

3.4 ParticipantsThe agents and objects participating in this pattern

are described as follows:

* A generic Agent specifies an interface forcreating different types of agents.

* A Helper implements generic Agent'sinterface. It is situated at the user's locationand keeps track of the behaviour objects.

* A Traveler implements generic Agent'sinterface and moves from host to host in anetwork like the Internet. Based on the multi-agent interaction requirements in differenthosts, it loads behaviour objects dynamically,which it receives from the Helper agent fromtime to time.

* The generic Behaviour provides an interfacefor creating specific type of behaviour objects.

* The Concrete Behaviour is a temporalbehaviour, which the Traveler agent exhibitsduring the multi-agent interaction required bya network host.

A class diagram representing the structuralrelationship of the participants in the Behaviour Helperpattern is shown in Figure 1. Since an agent is differentfrom an object in many aspects, we take an agentstereotype to represent agents. An agent performs tasksencapsulated in behaviours which have separatethreads of execution within the agent. So, a behaviourstereotype is also suggested in the class diagram.

Figure 1: Class Diagram for Behaviour Helper Pattern

3.5 CollaborationThe collaboration among the agents is shown in an

agent interaction diagram (Figure 2) following [21].This diagram depicts sequences of messages used bythem for sending and receiving behaviours. Themessages are specified using FIPA-ACL (AgentCommunication Language) [22].

* When the Traveler agent arrives at a host, itchecks with the environment as to what typeofbehaviour is required for interaction.

* It then sends a request message to the Helperagent to send that behaviour.

* On receiving the request, the Helper sends thebehaviour object using an inform message andrefuses ifnot available.

* The Traveler extracts the behaviour objectfrom the message and loads the behaviour.

* After successful extraction and loading, theTraveler sends a confirm message to theHelper, otherwise a failure message whichtriggers the Helper to resend the behaviourobject.

Heer eleer

cuiifirm

Figure 2: Agent Interaction Diagram

3.6 ConsequencesBehaviour Helper pattern may have the following

consequences:

1. The pattern enables protocol adaptability. Itallows the mobile agent to use differentprotocols as desired by the host environmentsfor interaction with other agents residing in it.

2. It enables strategy adaptability. Multi-agentinteractions require different intelligentstrategies, which may be specific to aninteraction. The mobile agent uses thesestrategies dynamically to exhibit intelligentbehaviour.

3. The pattem decouples agent behaviour fromthe agent, thus making the mobile agentlightweight. This ensures efficient mobility ofthe intelligent agent in case of adversenetwork conditions like low bandwidth andheavy traffic.

4. The human user of the agent can control thebehaviours of the mobile agent through thehelper agent.

503

Page 4: [IEEE 2007 Innovations in Information Technologies (IIT) - Dubai, United Arab Emirates (2007.11.18-2007.11.20)] 2007 Innovations in Information Technologies (IIT) - Pattern-Based Design

5. The pattern may introduce somecommunication overheads due to remoteinteractions among agents and humaninterference. Thus it may increase the overalltime taken by the mobile agent to completethe task delegated to it.

6. Since the mobile agent depends on the helperagent for behaviour loading, the computerhosting the helper agent must stay connectedto the remote computer where mobile agenthas migrated until the required behaviour isdispatched successfully.

4. Implementation

We have implemented this pattern in an e-marketplace prototype, using JADE (Java AgentDEvelopment) framework [23] and simulated a simpleauction process using Contract Net Interaction Protocol[24].

4.1 System OverviewThe prototype is a distributed system having three

subsystems namely buyer subsystem, seller subsystemand marketplace located in different network nodes.The buyer subsystem and the seller subsystemrepresent the human buyer and seller in an e-commerce. The proposed pattern is used to designthese two subsystems. However, the marketplacesubsystem has all agents which are stationary and thusvoid of this design pattern.

The buyer subsystem runs in the computer of ahuman buyer. It has two agents: Buyer Interface Agentand Mobile Buyer Agent. The human buyer interactswith the Buyer Interface Agent to control the mobilebuyer behaviour and submits his preferences. TheBuyer Interface Agent is responsible for creating theMobile Buyer Agent and sends it to the marketplace.The Mobile Buyer Agent on reaching the marketplacetakes part in the e-commerce process on behalf of thehuman buyer. The Buyer Interface Agent remainsstationary and receives communications from themobile agent to send the required behaviour objectsencapsulating in an ACL message as and whenrequired. We have used Java API for dynamic loadingof agent behaviour during run-time.

The seller subsystem runs in the computer of ahuman seller. Similar to buyer subsystem, it has alsotwo agents: Seller Interface Agent and Mobile SellerAgent. They function in the same way as BuyerInterface Agent and Mobile Buyer Agent.

The market subsystem runs in the market server onthe network. It contains two primary agents: Registrarand Matchmaker. Registrar performs authenticationand allows entry of the incoming mobile buyer andseller agents at the market server. It maintains aregistry of products and services to be transacted by themobile agents. The Matchmaker matches buyers withsuitable sellers and initiates negotiation process. Itutilizes the registry maintained by the Registrar for thepurpose.

4.2 Simulation ResultWe simulated the prototype in a local-area network

with a population of around 220 computers spread overa 5-storied college building. The market agents such asRegistrar and Matchmaker were created in a computerrepresenting the marketplace. The computer had aconfiguration of Pentium-4 CPU with 2.40 GHz and,512 MB RAM running Microsoft Windows XPoperating system. Buyer and seller agents were createdin different other computers and dispatched to themarketplace. We run the prototype to evaluate therelative performance of the design pattern in terms ofagent migration time. The simulation was repeated for10 times during different traffic conditions and themean migration time (MMT) of the agent wascomputed with respect to its file size (FS). Thesimulation result is presented in Table 1. It shows thatthe mobility time is less in case of agentsimplementing the design pattern.

Table 1: Mobility Performance

Mobile Buyer Mobile SellerAgent Agent

Agents MMT FS MMT FS(ms) (kb) (ms) (kb)

Without 7.26 6.15 9.76 8.24Pattern

With Pattern 5.31 4.19 7.11 6.57

5. Conclusion

In this paper, we have proposed a design pattern forintelligent mobile agents. It helps in efficient mobilityof these agents, which are more often fatty. It enablesdynamic on-demand behaviour specific to a networkhost environment. We have described the pattern usinga suitable pattern template and reported the results ofits implementation in a prototype multi-agent systemfor e-commerce domain. We are confident that the

504

Page 5: [IEEE 2007 Innovations in Information Technologies (IIT) - Dubai, United Arab Emirates (2007.11.18-2007.11.20)] 2007 Innovations in Information Technologies (IIT) - Pattern-Based Design

results of our experience can be generalized into apattern-driven design for intelligent mobile agents inother relevant domains. We also believe that mobileagent-based systems will benefit from this pattern.

References

[1] N.R. Jennings, "An Agent-Based Approach forBuilding Complex Software Systems",Communications of the ACM, 44(4), April 2001,pp.35-41.

[2] Danny B. Lange and M. Oshima, "Seven GoodReasons for Mobile Agents", Communications ofthe ACM, 42(3), March 1999, pp. 88-89.

[3] Rahul Jha and Sridhar lyar, "PerformanceEvaluation of Mobile Agents for E-CommerceApplications", In Proc. Of the 8th Int. Conf: onHigh Performance Computing (HiPC 2001),LNCS, vol-2228, 2001, pp. 331-340.

[4] S.R. Mangalwade, K.K Tangod, U.P. Kulkarni andA.R. Yardi, "Effectiveness and Suitability ofMobile Agents for Distributed ComputingApplications", In Proc. Of the 2nd Int. Conf: onAutonomous Robots and Agents, Dec 13-15, NewZealand, 2004.

[5] Erich Gamma, Richard Helm, Ralph Johnson andJohn Vlissides, Design Patterns: Elements ofReusable Object-Oriented Software, PearsonEducation Inc, 2006.

[6] Depak Alur, John Crupi and Dan Malks, CoreJ2EE Design Patterns: Best Practices and DesignStrategies, Pearson Education Inc, 2006.

[7] Yariv Aridor, Danny B. Lange, "Agent DesignPattern: Elements of Agent Application Design" InProc. of the 2nd Int. Conf: on Autonomous Agents,ACM Press USA, 1998, pp. 108 - 115.

[8] Elizabeth A. Kendall et al., "Patterns of Intelligentand Mobile Agents", In Proc. of the 2nd Int. Conf:on Autonomous Agents, ACM Press USA, 1998,pp. 92 - 99.

[9] Sylvain Sauvage, "Design Patterns for MultiagentSystem Design", In Proc. of 3rd Mexican Int. Conf:on Artificial Intelligence (MICAI 2004), MexicoCity, LNCS, Springer Berlin, 2004, pp.352-361.

[10] T. T. Do, M. Kolp and A. Pirotte. "Social Patternsfor Designing Multi-Agent Systems", In Proc. ofthe 15th Int. Conf: on Software Eng. andKnowledge Eng. (SEKE 2003), USA, July 2003.

[11] Deugo D., Weiss M., and Kendall E., "ReusablePatterns for Agent Coordination", Coordination ofInternet Agents: Models, Technologies, andApplications, Springer-Verlag, 2001, pp. 347-368.

[12] Nuno Meira, Ivo Conde e Silva, and Alberto Silva,"A Set of Agent Patterns for a More Expressive

Approach", In Proc. of the 5th European Conf: onPattern Languages of Programs(EuroPLoP2000),2000.

[13] Cossentino M., Burrafato P., Lombardo S. andSabatucci L., "Introducing Pattern Reuse in theDesign of Multi-Agent Systems", In Proc. ofAITA'02 workshop at NODe '02, October 8-9, 2002,Germany, LNCS, Springer Berlin, 2003, pp. 107-120.

[14] R.M. Malyankar, "A Pattern Template forIntelligent Agent Systems", In Proc. of theWorkshop on Agent-Based Decision Support forManaging the Internet-Enabled Supply Chain,(Agents'99), Seattle, WA, 1999.

[15] Weiss M., "A Pattern Language for Motivating theUse of Agents", Agent-Oriented InformationSystems (AOIS), Revised Selected Papers, LNAI3030, Springer, 2004, pp.142-157.

[16] Carla Silva, Jaelson Castro, Patricia Tedesco andIsmenia Silva, Describing Agent-Oriented DesignPatterns in Tropos, In Proc. of 19th BrazilianSymposium on Software Engineering, October 3-7,2005.

[17] T. T. Do, M. Kolp, T. T. Hang Hoang and A.Pirotte, "A Framework for Design Patterns forTropos", In Proc. of the 17th Brazilian Symposiumon Software Engineering (SBES 2003), Maunas,Brazil, October 2003.

[18] E. F. de Arauijo Lima, P. D. de Lima Machado, J.C. A. de Figueiredo, and F. R. Sampaio,"Implementing Mobile Agent Design Patterns inJADE Framework", EXP in Search of Innovation,Vol.-3, No.-3, September 2003.

[19] Xinfeng Yang, Anne T-A Nguyen, "DesignPatterns for Mobile Agent-Mediated E-Business",In Proc. of the Tenth Australian World Wide WebConference (AusWebO4), July 3-7, 2004.

[20] M. Weiss, "Patterns for e-commerce AgentArchitectures: Using Agents as Delegates", InProc. of the 8th Int. Conf on Pattern Languages ofPrograms (PloP 2001), September 11-15, 2001.

[21] B. Bauer, J. P Muller and J. Odell, "Agent UML: AFormalism for Specifying Multi-agent Interaction",In Proc. of the 1st Int. Workshop on Agent-OrientedSoftware Engineering (AOSE'00), Limerick,Ireland, 2001.

[22] Foundation for Intelligent Physical Agents (FIPA):Communicative Act Library Specification,Standard SC00037J, 2002, http:llwww.fipa.org.

[23] JADE(Java Agent Development) Framework,http://jade.tilab.com

[24] FIPA Contract Net Interaction ProtocolSpecification, Standard SC00029H, http://www.fipa.org.

505