Xinfeng Yang, School of Information Technology, Griffith University, QLD 9726 Australia. Email: X.Yang@griffith.edu.au
Anne T-A Nguyen, School of Information Technology, Griffith University, QLD 9726 Australia. Email: A.Nguyen@griffith.edu.au
Most mobile agent systems in e-business to date have been created in an ad hoc fashion. Little work has explored whether design patterns could be used in this specific domain to capture common solutions to recurrent problems, or to avoid the invention and reinvention of similar strategies by different system designers. This paper suggests a group of design patterns specific to the mobile agent-mediated e-business domain. A set of global forces will be identified. Collaboration among various participants in each pattern will be sketched. The advantages and potentials of suggested patterns for agent-based system design will also be discussed.
Keywords: Internet-based e-business, design pattern, mobile agent.
As self-contained entities, mobile agents have been successfully used to enhance the Internet functions of businesses and to reduce the online search costs of customers. A mobile shopping agent might work for its owner to automatically purchase goods from a series of remote e-markets (Dasgupta et al 1998). A mobile selling agent might work for its supplier to market its commodities to a group of potential clients over an open network (Mandry et al 1999). A virtual business operator might maintain a sound market environment, such that trading agents could conduct business activities with their partners (Tsvetovatyy et al 1997).
However, as Deugo and Weiss (1999) noted, most current agent-based systems are established in an ad hoc manner. The many problem-solving strategies behind each concrete system design are not comprehensively surveyed, leading to common solutions being repeatedly invented and reinvented by different system developers to address the same problems. In addition, a higher-level abstraction above the single agent-level implementation is still lacking, hindering the agent technology from being employed to develop large, industrial strength, applications. Design patterns can be used to document solutions to common problems in an agent-based system design, so that this formatted knowledge can be re-used in similar scenarios (Gamma et al 1994).
Object-oriented design patterns are the major candidates for the agent world. The primary reason for this is that most agent system platforms are written in object-oriented languages (White 1994) and an agent itself can be viewed as an active object with a set of agent-specific properties (Lange & Oshima 1998). Based on these observations, Kendall et al (1998) presented a layered agent pattern, where the proposed seven layers include 'Mobility', 'Translation', 'Collaboration', 'Actions', 'Reasoning', 'Beliefs' and 'Sensory'. Each layer is expected to deal with one specific aspect of agency and every neighbouring pair of layers construct a dependency relationship to help the agent performing various tasks in a complex working environment. However, such a layered pattern merely builds a functional agent at structural level. It fails to consider various system-organisation and coordination functionality that might be important to an agent-mediated system design. A set of mobile agent-based design patterns could be found in (Aridor & Lange 1998). Conceptually, the suggested patterns could be divided into three classes: 'Travelling', 'Task' and 'Interaction'. Within the 'Travelling' pattern class, three concrete patterns are included: 'Itinerary', 'Forwarding' and 'Ticket'. Within the 'Task' pattern category, two specific patterns are identified: 'Master-slave' and 'Plan'. And a set of patterns belongs to the 'Interaction' pattern class -- they are 'Meeting', 'Locker', 'Messenger', 'Facilitator' and 'Organised Group'. The primary aim of such classification, as Aridor and Lange (1998) argued, is trying to 'pragmatically fill in the space between high-level agent-specific languages and system-level programming languages and provide a sound foundation for visual agent development environments'. Unfortunately, proposed patterns did not incorporate agent properties with any domain knowledge. Weiss (2001) presented a group of patterns for agent-based e-commerce applications. As Weiss observed, when a virtual business deals with large volumes of data, resources or knowledge distributed over the network, the whole system might be viewed as a society of autonomous entities that collaborate with each other. Therefore, among Weiss' (2001) suggested patterns, the 'Agent Society' pattern is at the top-level, which tries to address the problem of how to organise a group of collaborating agents in a concrete e-business system. The 'Agent-as-Delegate' pattern works for a single user, which is used to assign time-consuming tasks to a software assistant to reduce search costs and balance overloaded information. The 'Agent-as-Mediator' pattern works for a user group, which is used to facilitate inter-agent communication for business transaction. Collections of lower-level patterns are also presented in each general category. However, these agent-based e-business patterns focus on the static agents only, neither the mobile agent-oriented properties nor mobile agent-based system management are taken into consideration, which is regarded as essential to extend agent-based technology to the Internet-supported applications. In fact, many other associated design patterns in (Lyardet et al 1999), (Rossi et al 2000) and (Fernandez et al 2001) etc. meet the similar drawbacks.
In order to overcome the above limitations, this paper tries to suggest a set of patterns specific to the mobile agent-mediated e-business domain. Most mobile agent-related characteristics, such as mobility, communicability and adaptability, will be considered. Most business roles involved in e-business design will be described: a mobile shopping agent and its homeowner, a stationary market-organiser agent and its travelling visitors etc. A collection of global forces that are regarded as the major factors to push and pull a complex problem to different solutions will be investigated. Roughly speaking, they come from two cross-related fields: the mobile agent computing paradigm and the e-business executing environment.
This paper is organised as follows. Section 2 outlines a refined pattern template and associated global forces that are regarded as unique to the mobile agent-based e-business pattern design. A market-organiser pattern, which defines a general way for the mobile buying agents and selling agents to establish local contact in a virtual market, is presented in Section 3. An agent-side comparison-shopping pattern and a server-side comparison-shopping pattern, which are designed to enhance either a mobile shopping agent's self-routing capability or an agent owner's remote-controlling functionality, are proposed in Section 4 and 5. Section 6 suggests an itinerary-balancing pattern which sketches a route-optimisation scheme for a family of mobile agents working for the same task. Finally, a conclusion is presented in Section 7.
In order to record an explored pattern with some basic components, a pattern template needs to be explicitly specified. In fact, there is currently not a uniform template agreed upon in the pattern design society. Differing templates with different components exist in the literature, such as the formats presented by 'Gang of Four' (Gamma et al 1994) and 'Gang of Five' (Buschmann et al 1996), and the re-formatted templates suggested by Lange and Oshima (1998) and Weiss (2001). This paper employs a combined design pattern template, as illustrated in Table 1, which attempts to include both the essential components of general software design as well as optional components that are desirable for the mobile agent-based e-business system design.
|
Component |
Meaning |
|
Intent |
A statement to explain what problem is solved |
|
Applicability |
A description of where the pattern may apply |
|
Forces |
A group of factors that need to be balanced in the pattern design |
|
Participants |
The classes taking part in the explored pattern |
|
Collaboration |
The relationship among all participants in the pattern |
|
Consequences |
The expected results as well as side effects of the suggested pattern |
|
Implementation |
A piece of source code to illustrate how to implement the pattern |
|
Related patterns |
References to patterns that share similar contexts |
Table 1: A pattern template for mobile agent-mediated e-business design patterns
The above pattern template includes a 'forces' component which is expected to be domain-dependent. As Coplien (1996) described, forces reveal the complexity of a problem, and are supposed to impact the proposed patterns in either a positive or a negative way. A good pattern design needs to encapsulate the forces as much as possible, and describes trade-offs that must be made as well. For this reason, some general 'forces' in the study domain need to be investigated before concrete design patterns are explored. In the following part, a number of global forces that are specific to the mobile agent-mediated e-business pattern design will be identified, where some come from mobile agent specification and others come from e-business system maintenance.
One obvious advantage of employing the Internet lies in its openness--artificial boundaries between suppliers and buyers in the physical world become indistinct. Representatives from different locations could negotiate directly and carry out business activities locally. However, with more and more agents gathering at a specific online market, the market management problem appears which may lead to improved quality of services. On the one hand, the market operator is required to provide an open business environment for all the visiting agents to search for their preferred products and services. On the other hand, it is desirable for the market manager to help agents with similar interests to locate each other's business partners for group-trading and negotiation purpose. In other words, the market operator has to serve both the general agent visitors and some specific agent trading groups.
One of the major characteristics of a mobile agent is its capability of searching the Internet and visiting a set of remote hosts, according to a pre-defined itinerary. So it is possible, and desirable, to objectify a mobile agent's itinerary module to facilitate reuse. In a mobile agent-based e-business application, the major work of these shopping delegates is navigating among a number of remote vendors' sites and collecting product information for their owners. Therefore a mobile agent's pre-defined itinerary is always affected by the agent's business activity along the way. Incorporating a mobile agent's self-navigation capability with its business environment en route is a general solution for the mobile agent-based trading system design. The primary aim of such arrangement is to improve a mobile agent's adaptability in complicated market conditions while maintaining the reusability of its modularised navigation plan.
Remote delegation is regarded as an important application of agent technology. A mobile agent might represent either a customer or a vendor to travel around the network performing a pre-defined task. The potential advantages of this application could be summarised as light-weight travelling, goal-oriented driven, disconnected operations. Nevertheless, there is still considerable reluctance to adopt mobile agents for such purposes. One major reason has been the security issues involved in allowing the relevant agent to visit remote hosts. A dishonest agent host may analyse a visiting agent's decision-making policy illegally and/or alter its carried information maliciously. Mobile agent protection against malicious hosts remains an open issue in the agent research community. Before this problem is fully addressed, an agent owner has to enhance its control over its child agent's behaviours remotely. One possible solution is to hide some vulnerable information from remote hosts and withdraw some decision-making functions from the travelling agent site to its home site. Admittedly, performance degradation is the major drawback that of this arrangement.
There are two ways for a user to delegate a task to its agents: single delegation and group delegation. For the single delegation, a single agent represents its user, travelling among a set of remote markets in sequence. Technically, it is a kind of sequential computing. For the group delegation, a group of agents are dispatched to a collection of destination-markets. They are expected to stay there and carry out pre-assigned tasks. Such practice could be viewed as a kind of parallel computing. However, in a mobile agent-based e-business environment there are too many online markets available, dispatching a single agent to visit all of them is extremely time-consuming, whereas generating the same number of mobile agents for all the available markets is not efficient either. A common solution is to combine these two forms of delegation dynamically, where a user sends out a limited number of worker agents and they visit available online markets in parallel. Indeed, such an agent group forms an agent family that belongs to the same user and works on the same task. In that case, inter-group collaboration seems quite desirable. Taking the itinerary as an example, the inter-group collaboration needs to make sure the same destination is visited by one of the group members once only. Itinerary balancing is also necessary in order to improve the overall performance of the whole group.
Items presented above are only part of the forces that are observable in the mobile agent-based e-business domain. They demonstrate the complexity of applying mobile agent technology into the e-business field. A successful pattern design is expected to address these problems in a considerate way with the aim of resolving these forces as much as possible. In the following sections, four associated patterns will be suggested: a market-organiser pattern, two comparison-shopping patterns and an itinerary-balancing pattern. All of them will be described and analysed based on the pattern template illustrated in Table 1.
The market-organiser pattern provides a way to help seller agents and buyer agents with similar interests to establish local contacts on a specific marketplace more conveniently.
This pattern can be employed in the following cases:
Figure 1 shows the structural relationships among the participants of this pattern.

Figure 1: Participants in the market-organiser pattern
Collaboration among the participants in this pattern is sketched in Figure 2.

Figure 2: Collaboration in the market-organiser pattern
The market-organiser pattern has the following benefits and drawbacks:
There are four basic classes in the market-organiser pattern. Detailed implementation will be omitted here. A brief summarisation will be given below.
This pattern is inspired by the Meeting pattern defined by Aridor and Lange (1998), where agents could establish local interactions on a specific context. However, the primary aim of the Meeting pattern is to synchronise behaviours of the agents coming from different origins, so the destination ID and partner ID are two principal arguments to help them locating each other. The market-organiser pattern does not assume a visiting agent belongs to any specific group in advance, but provides a uniform interface for all the visiting agents. An incoming trader agent (seller or buyer) may choose a proper group to join in and local communication will be easily established. To some extent, the 'Lookup' listener and the 'marketGuide' object in the market-organiser pattern encapsulate more basic functionality unique to a real virtual market than the meeting manager object suggested in the Meeting pattern. As a known use, this pattern has been successfully employed in a mobile agent-mediated e-shopping system suggested by White (1994). A mobile shopping agent visits different shops in a large e-market to look for its preferred products. Each shop is designed for a specific commodity; all participants in the same shop can exchange information straightforwardly. In the proposed market-organiser pattern, detailed inter-group communication mechanism is ignored, while the trading group organisation functionality is clarified.
The agent-side comparison-shopping pattern defines a mobile agent-mediated e-shopping scheme where a mobile shopping agent is equipped with an objectified itinerary and a simplified self-navigation module.
This pattern can be employed in the following cases:
Free mobility and self-control capability
Figure 3 shows the structural relationships among the participants of this pattern.

Figure 3: Participants in the agent-side comparison-shopping pattern
Collaboration among the participants in this pattern is sketched in Figure 4.

Figure 4: Collaboration in the agent-side comparison-shopping pattern
This pattern has the following benefits and drawbacks:
There are three basic classes in the agent-side comparison-shopping pattern. Detailed implementation will be omitted here.
This pattern is inspired by the Itinerary pattern defined by Lange and Oshima (1998), where an objectified agent itinerary is used to help a mobile agent travelling among a set of destinations. However, as a static itinerary module without any routing functionality is seldom useful, extending this general pattern with certain self-navigation characteristic seems essential to enhance its operability. In the mobile agent-mediated e-business system design, comparison-shopping function with self-routing capability can be found in many existing systems such as in (Dasgupta et al 1999), (Mandry et al 1999) and (Nguyen et al 2001). In these applications, a mobile agent travels around the Internet, collecting associated information about its preferred products, and then continuing its journey to the next available marketplace. It has been viewed as a classic prototype to demonstrate the applicability of employing mobile agent technology into the e-business field. The suggested agent-side comparison-shopping pattern tries to capture a common solution to this recurrent scenario. A comparison-shopping function and a conditioned-routing function are designed separately but retain some linkage, which improves its feasibility and reusability.
The server-side comparison-shopping pattern defines another mobile agent-shopping scheme where a home shopper assigns the information-collection task to an itinerant agent but controls its travelling plan from home.
This pattern can be employed in the following cases:
Remote delegation and effective management
Figure 5 shows the structural relationships among the participants of this pattern.

Figure 5: Participants in the server-side comparison-shopping pattern
Collaboration among the participants in this pattern is depicted in Figure 6.

Figure 6: Collaboration in the server-side comparison-shopping pattern
This pattern has the following benefits and drawbacks:
There are three basic classes in the server-side comparison-shopping pattern. Detailed implementation will be omitted here.
This pattern is inspired by the Master-Slave pattern defined by Lange and Oshima (1998), where a master agent can delegate a task to a slave agent and control its life cycle. However, when applying this master-slave pattern in the mobile agent-mediated e-business environment, a serious security concern arises because a travelling slave agent carries too much sensitive information in its memory. Among these pieces of information, the mobile agent's pre-defined itinerary and its decision-making policy are two major targets of a dishonest agent host or a malicious third party over the network. The proposed server-side comparison-shopping pattern successfully hides the vulnerable information from the possible attackers. A collector agent follows the command from its owner step by step. The information collected en route will be sent back home immediately and used to compute its next destination. Therefore most attacks launched by a malicious entity become invalid. A known use for this pattern can be found in a mobile agent shopping system suggested by Mandry et al (1999) where private decision-making strategy is suggested to be carried out at home site to satisfy the security requirement. Another obvious advantage of such arrangement is that the proposed mobile collector agent becomes lighter and simpler after these pieces of information taken out of its memory.
The itinerary-balancing pattern defines a route-optimisation scheme for a family of mobile agents belonging to the same user and working for the same task.
This pattern can be used in the following cases:
Group delegation and inter-group collaboration
Figure 7 shows the structural relationships among the participants of this pattern.

Figure 7: Participants in the itinerary-balancing pattern
Collaboration among the participants in this pattern is depicted in Figure 8.

Figure 8: Collaboration in the itinerary-balancing pattern
The itinerary-balancing pattern has the following benefits and drawbacks:
There are three basic classes in the itinerary-balancing pattern. Detailed implementation will be omitted here.
This pattern is inspired by the Blackboard pattern presented by Deugo et al (2001), where a 'blackboard' component is provided for a collection of agents to monitor each other's behaviours and mutual progresses. However, a blackboard's function is limited to message notification, which seems rather passive. Additionally, implementing a blackboard pattern in a distributed environment is not an easy task because it lacks a proper management mechanism. In a mobile agent-mediated e-business situation, a group of mobile agents needs a more functional arrangement to coordinate each other's visiting plan. On the one side, a free-travelling agent may encounter many copies of advertising agents at different hosts that may guide the agent to visit the same origin. On the other side, the number of candidate destinations retrieved at each visited site is naturally unbalanced. Therefore the 'itineraryLog' is just designed as a centralised coordinator to perform both the redundant-itinerary filtering and the overall-plan balancing work.
This paper presents a collection of mobile agent-mediated e-business design patterns. To overcome the limitations of most current approaches which simply apply object-oriented techniques for the agent-based e-business pattern design, we suggest viewing the mobile agent-mediated e-business domain as an organic whole. A set of global forces that is unique to this area is identified. Four design patterns are proposed which are related to virtual market management, agent-based shopping and agent-to-agent collaboration respectively. The consequent analysis and some known uses demonstrate the benefits and drawbacks of suggested patterns in concrete system design. This pattern list might be continually extended as the requirements and trade-offs involved in this area are better understood in the future.
Aridor, Y. and Lange, D. B. (1998), ‘Agent Design Patterns: Elements of Agent Application Design’, Proceedings of the 2nd International Conference on Autonomous Agents (Agents '98), St Paul, USA, pp. 108-115.
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P. and Stal, M. (1996), Pattern-Oriented Software Architecture: A System of Patterns, John Wiley & Sons, Chichester.
Coplien, J. O. (1996), Software Patterns, SIGS Books & Multimedia, New York.
Dasgupta, P., Narasimhan, N., Moser, L. E. and Melliar-Smith, P. M. (1998), ‘A Supplier-Driven Electronic Marketplace using Mobile Agents’, Proceedings of the 1st International Conference on Telecommunications and Electronic Commerce, Nashville, USA, pp. 42-50.
Dasgupta, P., Narasimhan, N., Moser, L. E. and Melliar-Smith, P. M. (1999), ‘MAgNET: Mobile Agents for Electronic Trading’, IEEE Transactions on Knowledge and Data Engineering, Special Issue on Web Technology, Vol. 11, No. 4, pp. 509-525.
Deugo, D. and Weiss, M. (1999), ‘A Case for Mobile Agent Patterns’, Proceedings of the Workshop on Mobile Agents in the Context of Competition and Cooperation (MAC3) at the 3rd International Conference on Autonomous Agents (AA'99), Mineapolis, USA, pp. 9-22.
Deugo, D., Weiss, M. and Kendall, E. (2001), ‘Reusable Patterns for Agent Coordination, in Coordination of Internet Agents: Models, Technologies, and Applications, eds A. Omicini, F. Zambonelli, M. Klusch and R. Tolksdorf, Springer-Verlag, Berlin, pp. 347-368.
Fernandez, E. B., Liu, Y. and Pan R. Y. (2001), ‘Patterns for Internet Shops’, Proceedings of the 8th Conference on Pattern Languages of Programming (PLoP'01), Monticello, USA, Available Online: [HREF1] [2004 Feb. 24].
Gamma, E., Helm, R., Johnson, R. and Vlissides, J. (1994), Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, Reading.
Hohl, F. (1998), ‘A Model of Attacks of Malicious Hosts against Mobile Agents’, Proceedings of the 4th Workshop on Mobile Object Systems: Secure Internet Mobile Computations, Brussels, Belgium, pp.105-120.
Kendall, E. A., Murali-Krishna, P. V., Pathak, C. V. and Suresh, C. B. (1998), ‘Patterns of Intelligent and Mobile Agents’, Proceedings of the 2nd International Conference on Autonomous Agents, St. Paul, USA, pp. 92-99.
Lange, D. B. and Oshima, M. (1998), Programming and Deploying Java Mobile Agents with Aglets, Addison-Wesley, Reading.
Lyardet, F., Rossi, G. and Schwabe, D. (1999), ‘Patterns for Adding Search Capabilities to Web Information Systems’, Proceedings of the 4th European Conference on Pattern Languages of Programming and Computing (EuroPLoP'99), Irsee, Germany, Available Online: [HREF2] [2004 Jan. 25].
Mandry, T., Pernul, G. and Rohm, W. A. (1999), ‘Mobile Agents on Electronic Markets Opportunities, Risks and Agent Protection’, Proceedings of the 12th International Bled Electronic Commerce Conference, Bled, Slovenia, pp.1-13.
Nguyen, A., Stewart, I. and Yang, X. (2001), ‘A Mobile Agent Model: Applications for E-Commerce’, Proceedings of the 7th Australian World Wide Web Conference, Coffs Harbour, Australia, pp. 247-258.
Rossi, G., Lyardet, F. and Scheabe, D. (2000), ‘Patterns for E-commerce Applications’, Proceedings of the 5th European Conference on Pattern Languages of Programs (EuroPLoP'00), Irsee, Germany, Available Online: [HREF3] [2004 Jan. 17].
Tsvetovatyy, M., Gini, M., Mobasher, B. and Wieckowski, Z. (1997), ‘MAGMA: An Agent-Based Virtual Market for Electronic Commerce’, Journal of Applied Artificial Intelligence, Vol. 11, No. 6, pp. 501-524.
Weiss, M. (2001), ‘Patterns for E-Commerce Agent Architectures: Using Agents as Delegates’, Proceedings of the 8th Conference on Pattern Languages of Programming (PLoP'01), Monticello, USA, Available Online: [HREF4] [2004 Feb. 29].
White, J. E. (1994), ‘Telescript Technology: The Foundation of the Electronic Marketplace’, General Magic White Paper 1994, General Magic, Inc., USA.
Hypertext References