Finally, the “reactive tuples” [1] of tuple space can support event-driven coordina-tion among agents by triggering the reactions associated with such tuples.. 9.2.1 Basics of a Tuple Sp
Trang 1190 B Yang and J Liu
fitness value an agent has, the more pheromone it will release When agents move
to a crossroad, they will preferentially select the path with a denser concentration
of pheromone A group of mobile agents will solve the DOPS collectively through
a positive feedback mechanism: agents that can find optimal solutions will have a higher fitness value; their routes will have denser pheromone levels, attractingmore agents to choose them; and bad agents with a lower fitness value will adjust their direction of travel (or other behaviors) by following the good agents Eventu-ally, after a period of evolution controlled by positive feedback, the entire system will reach an equilibrium state corresponding to the desired optimal solution
In this model, changes to agents’ fitness value embody their self-adaptive iors as single entities, while the positive feedback system embodies the self-organized behaviors of multiple agents
behav-8.5 Security
With code migration, the mobile agent paradigm brings increased performance and flexibility to distributed systems On the other hand, the ability to move initself brings significant security threats, to both agents and hosts Only a perfect solution to these serious security problems would enable the mobile agent para-digm to become the mainstream software technique for constructing large-scale distributed commercial applications
8.5.1 Issues and Countermeasures
Two main types of threat need to be addressed: agent-to-system and agent attacks Jansen et al [27] present a good survey of the threats faced by the mobile agent paradigm and the corresponding countermeasures
system-to-The agent-to-system category includes the kind of threats in which agents ploit security weaknesses to attack an agent system This group mainly comprises masquerading, denial of service, and unauthorized access Conversely, the system-to-agent category includes threats in which systems attack agents that are situated within them Again, masquerading and denial of service form part of this group, asadditionally do eavesdropping and alteration
ex-Many conventional security techniques used in traditional distributed tions such as identity authentication, encryption, integrity verification, authoriza-tion, access control, and so on are also useful as countermeasures within themobile agent paradigm There are also several extensions to these conventionaltechniques and new methods devised specifically to control mobile agent security Jansen et al [27] survey some recently developed security techniques Counter-measures aimed at platform protection include software-based fault isolation, safe code interpretation, signed code, authorization, and attribute certificates, state ap-praisal, path histories, and proof carrying code Countermeasures for agent protec-tion include partial result encapsulation, mutual itinerary recording, itinerary
Trang 2applica-8 Mobile Agents: The State of the Art 191recording with replication and voting, execution tracing, environmental key gen-eration, computing with encrypted functions, and obfuscated code
8.5.2 Facility
In this section we present a concrete mobile agent security facility (MASF), which
we have ourselves developed, in order to illustrate some of the threats and coun-ftermeasures discussed earlier from a more practical and implementation-oriented point of view [28]
Issues
The security threats that may occur over the whole lifecycle of a mobile agent come from both malicious agents and the hosts to which agents migrate Malicious mobile agents may access and modify data to which they should not have access
or attempt to interfere with the execution of their hosts The potential threats, from both the agent and host points of view, can be:
• Before migration Threat A: During mobile agent storage, the repository
might be invaded and the code or class for the mobile agent changed beforeinitiation
• During migration Threat B1: When a mobile agent migrates across
net-works are not controlled by sender or receiver, while in possession of dential data, disclosure of this information could be fatal Threat B2: Theexecution logic of the mobile agent might also be changed by the interrupter, which might cause damage to the destination host
confi-• After migration Threat C1: the supposed “destination” might in fact be a
counterfeit, created by a business rival to steal important information being carried by the mobile agent Threat C2: even if the destination is correct, the agent may still be deceived by a malicious host For example, it might not receive the contracted services or resources, or might even be maliciously changed before going for another hop Threat C3: At the same time, the land-aaing host of the mobile agent should also be sure that the incomer is from the correct service contractor and will not cause it any damage Threat C4: even
if the mobile agent does come from the correct peer, the host still needs tokeep itself informed about its behavior in case the agent does something thatgoes beyond its contract or its rights on the system
Countermeasures
To address such threats, a MASF must provide the following features:
• Authentication This involves checking whether or not an agent comes from
a trustworthy source This can involve asking for the authentication details to
be sent from the site where the mobile agent was launched or from which itlast migrated At the same time, authentication also enables the mobile agent
to be aware of the real identity of the receiver, which should be the proper
Trang 3192 B Yang and J Liu
service level agreement (SLA) contractor Authentication is mainly used tosolve threats C1 and C3 as described earlier It can also be used to check onusers who want to access the mobile agent repository, which also involvesthreat A
• Confidentiality When a mobile agent transports confidential data, the
transmitted agent must be encrypted while in transit This makes it useless to any host, which does not know how to decrypt it (which should only be the designated server) Confidentiality, implemented by encryption/decryption,mcan cope with the potential data disclosure of threat B1, and can prevent therepository from attack (threat A)
• Integrity On reception, the mobile agent must be checked against any
modification or corruption due to network transmission errors or intentional invasion If the integrity check fails, the receiver can ask the client to repeat the transmission This can protect the mobile agent from the code modifica-tion attack outlined in threat B2
• Authorization This determines the mobile agent’s access permissions to
host resources It is intended to protect those resources from unauthorized or overused access It indicates, for example, how many times a resource can beaccessed or how much it can be used, and what type of access the agent can perform For instance, one agent on behalf of a network administrator may
be able to read, write, and modify a given resource and have unlimited access
to it, whilst another agent representing a normal user may only be able toread the resource and access it a limited number of times Authorization mainly deals with the runtime actions of the mobile agenf t Usually this isachieved through an access control policy that grants access to systemresources based upon different levels of trust Authorization, empowered byaccess control, can defeat threat C4
• Logging This is a mechanism to keep track of any events relevant to
secu-rity, such as an agent trying to access system resources or the system itself,
as well as authentication failures These events should be logged to a file for later analysis Logging can, to some degree, detect and therefore prevent amobile agent being deceived by the host, as described in threat C2
Architecture
The implementation of these features, for the protection of both mobile agent and host, is achieved in the MASF, the architecture of which is illustrated as Fig 8.6.MASF architecture is functionally divided into two layers, the higher being afunction layer and the lower a base service layer The components or services in the latter are common functionalities used by the former
Obviously, many services of the function layer depenf d on cryptographic tions based on either symmetric or asymmetric keys to encrypt/decrypt and sign data Therefore, MASF has a cryptography library integrated in its base service layer
func-data integrity and authentication services, using digital signatures The The key management service enables users to administer their own public/private key pairs and associated certificates for use in self-authentication or
Trang 4authentica-8 Mobile Agents: The State of the Art 193tion information includes both a sequence (chain) of X.509 certificates, and an associated private key, which is usually referenced as “alias”.
To achieve security, the MASF framework supports flexible security policies togovern the interactions of agents with each other and with the available resources
in the execution sites This function is implemented by the policy management service in the base service layer The definition and enforcement of appropriatesecurity policies can only proceed after a precise identification of the principals(i.e., the roles that can be authenticated)
Security logging service fulfils the logging requirement mentioned earlier.Although not specific to MASF, the location service is sometimes used by MASF
to identify the user
Workflow of the MASF
All the mobile agents’ classes or codes are stored in digitally signed archive files Whenever an administrator, or the software on his or her behalf, wants to fulfill some tasks using mobile agents, the appropriate signature must firstly be verified before access can be granted to these agents, which are stored in a protectedrepository The administrator then signs the agent to show the initiator, for in-stance, the first agent system He or she can also supply the agent with the neces-sary rights
If a mobile agent system receives an agent from the communication network via agent transport protocol (ATP), it decrypts it and tests the integrity of the datareceived by checking the signature that the sender has appended After success-fully passing the integrity check, the next step is authentication The mobile agent system verifies the signature and certificates attached to this mobile agent and obtains further information such as who wrote it and who sent it (either originally
or from the intermediate locations) The information can be further used for zation and access control This step will involve the security database
authori-Once authenticated, MASF authorizes the agent, which means that it attachesrights to it or determines rights based on security policies, which have been defined
in advance, probably via a SLA
Fig 8.6 Architecture of mobile agent security facility
Trang 5194 B Yang and J Liu
The mobile agent can then be executed with care of access control to ment its assigned task When the mobile agent has finished its work and wants to migrate to another location, the system stops the agent’s execution and packs it with its current state, as normal Depending on the agent’s task, the rights’ adjust-ing module may be called at this moment to adjust its current rights, for example,
imple-to increase those imple-to be granted at its next location
Next, the signer/encryptor module is called by agency to sign the mobile agent
to confirm the execution or any change of agent Encryption may also be applied
by this module
Finally, agency opens a communication channel to the target mobile agent tem and sends the agent The channel can be a secure one enhanced by secure socket layer (SSL)
sys-8.6 Summary
In this chapter we have briefly introduced the concept of mobile agents and dis-fcussed some of its advantages and applications We have also discussed someimportant technologies required for the detailed implementation of such a system Although this paradigm could ease the developing, testing, and deployment of distributed applications, and could also simplify the understanding and sustaining
of such systems, there are still many open issues that need to be resolved perfectly before this can become an industrial software standard ready for commercial applications in the same way as OOP and CORBA
Besides issues such as planning, communication, performance, and security, as discussed earlier, there is the important question of standardization OMG MASIF(mobile agent system interoperability facility) [29] and OMG MAFS (mobileagent facility specification) [11] are good initial efforts to address this issue How-ever, the mobile agent community must take further steps to develop an industrialstandard for this paradigm, just like the one in use in the field of distributed objects
Furthermore, technologies and theories of artificial intelligence fields should be integrated into the mobile agent paradigm so as to enable mobile agents to become smarter and more competent in highly complex tasks such as distributed optimiza-tion problems in truly distributed, large-scale, open, and dynamic environments such as the Internet
Fortunately, more and more new techniques are now being explored, and current work is promising enough that, within 10 years or even sooner, the mobile-agent paradigm will be widely used in many distributed and intelligent applications, espe-cially in the ubiquitous computing environment
Ubiquitous computing is said to be the third generation of computation after the mainframe and personal computer (PC) eras In this, the user is surrounded by lots
of invisible small computers or sensors, connected by ad r hoc or wireless networks.Ubiquitous computing mainly aims at developing new models and technologies to construct the ubiquitous society (U-society), which can offer anywhere and anytime
Trang 68 Mobile Agents: The State of the Art 195services, delivered through any devices, as required to support an individual’s daily life In order to adapt to the dynamic requirements of different people, the U-society requires personal information such as profiles, preferences, likes, and habits Since people often move around, such personal information has to be sent
to the current location Bagci et al [30] present two possible approaches: either the user carries the relevant information on devices with him or her, or the ubiqui-tous system takes care of storing and sending it Obviously, the latter situation, inwhich a mobile user is always accompanied by a ubiquitous agent, which serves as
a virtual reflection of the user and can provide the services, is preferred
Existing mobile agent systems for Internet applications such as Aglet, More,Grasshoppers, and D’Agent are very heavyweight and are not suitable for ubiqui-tous computing Bagci et al [30] discuss the requirements for the ubiquitous agent paradigm: ubiquitous agents could use both wired and wireless media for commu-nication and migration; the system should be platform independent, since softwareand hardware are heterogeneous in the U-society; agents should be lightweight so that they work not only on powerful PCs but also on battery-operated and mem-ory-restricted PDAs, wearable computers, or tiny sensors; agents could use dif-ferent access mechanisms and protocols for accessing information provided by heterogeneous ubiquitous devices; agents should be context sensitive; and secu-rity, such as privacy protection, is also an important requirement
Multiagent teamwork has been widely studied in the fields of distributed cial intelligence With the emergence of ubiquitous computing, ubiquitous agent teamwork becomes a new challenge The ubiquitous agent community (UAC) is ampromising approach to the organization of agents into a jointly functioning team.The significant aspect of such a community is that it will always have one goalthat will motivate and drive its members to fulfill their individual tasks and func-tions UACs with different structures have different functions, and these structureswill evolve autonomously according to the collective interactions of their mem-bers Liu et al [31] present one community structure, called the ubiquitous agent community for rational competition and cooperation in the U-society
artifi-A Uartifi-AC is essentially an intelligent infrastructure that enables agents to look ahead to plan and deliver what a user wants It works just like a personal agency For instance, it can help a user to effectively manage tedious daily routine activi-ties such as processing emails, placing orders, making meeting arrangements, downloading news, and so on A UAC can interact with users in various ways For instance, as a person uses a smart hand-held device to enter a subway station on the way to work, a UAC can seamlessly upload list of things to be done to that device Along with each of the things listed, the information provided by the UACcan also include the corresponding tasks required Thus, inside the moving sub-way train, the user will be able to go through each of the recommended task itemsand further verify and delegate certain jobs, such as forwarding a report or making
a meeting appointment, to a community agent within the UAC Besides planningand executing the items on a calendar, the user can also receive other personalized services based on his or her profile, which may include sports news, urgent emails,aaand specific documents prepared for the day’s meetings Figure 8.7 gives an
Trang 7196 B Yang and J Liu
illustrative example of personal services that can be provided by a community of competing and cooperating agents
Fig 8.7 Schematic illustration of an UAC [31]
A UAC contains two types of agents: c-agents and s-agents The former makes task plans as well as contracting decisions on what and where some tasks will be carried out, whereas the latter performs the delegated tasks A c-agent carries out such functions as task planning, task delegation, and result evaluation, while ans-agent is responsible for task execution, competition, and cooperation In theillustrative example in Fig 8.7, suppose a user writes a few words on his or her PDA regarding what he or she plans to do A c-agent in the distributed UAC will recognize the user’s intention and find similar service cases from its case base Thereafter, it will execute task planning based on the similarity between the tasks
at hand and the previous tasks Once the c-agent completes this process, a cluster
of s-agents will be called upon to distribute and carry out the planned subtasks.Each s-agent will have distinct role(s) and will coordinate its actions with those of other s-agents in a UAC For instance, a mail agent will be responsible for manag-ing emails, involving three distinct roles: editing, sending, and receiving As themail agent works, it will also take into consideration the work status of related s-agents In other words, it will decide, after communicating with other s-agents, when to receive or send emails and what content to include
Because many ubiquitous agents have been devised for different services and functions in the U-society, a solution for clustering them is necessary in order tosummon these heterogeneous agents roaming across the entire U-society and quickly aggregate them into a seamless community, such as the UAC, which willcomplete user-specified tasks However, this is a nontrivial challenge, requiring as
it does an automatic, decentralized, and incremental UAC clustering algorithm rather than one which is manual, centralized, and offline
Trang 88 Mobile Agents: The State of the Art 197
4 ObjectSpace Inc ObjectSpace voyager core package technical overview,
1997, http://www.objectspace.com/voyager/whitepapers
5 C Bäumer, T Magedanz Grasshopper – A mobile agent platform for active telecommunication In Proceedings of the Third International Workshop onIntelligent Agents for Telecommunication Applications, LNCS1699, 1999, 19–32
6 J.E White Telescript Technology: The Foundation for the Electronic ketplace White Paper, General Magic, Inc., 1994
mar-7 R.S Gray, G Cybenko, D Kotz et al D’Agents: Applications and ance of a mobile agent system Software Practice and Experience, 2002, 32(6): 543–573
perform-8 H Peine, T Stolpmann The architecture of the Ara platform for mobileagents In K Rothermel and R Zeletin, editors, Mobile Agents: First Inter-national Workshop MA’97, LNCS 1219, 1997, 50–61
9 L.F Bic, M Fukuda, M Dillencourt Distributed computing using mous objects IEEE Computer, 1996, 29(8): 55–61
autono-10 D Johansen, R.V Renesse, F Schneider An introduction to the TACOMAdistributed system Technical Report 95–23, University of Tromso, 1995
11 Object Management Group, Inc The Mobile Agent Facility Specification,
Emer-16 A.L Murphy, G.P Picco Reliable communication for highly mobile agents
In P Spring and D Milojicic, editors, Proceedings of the First International Symposium on Agent Systems and Applications New York: IEEE Computer Society, 1999, 141–150
17 J Baumann et al Communication concepts for mobile agent systems In K Rothermel and R Zeletin, editors, Mobile Agents: First International Work-shop MA’97, LNCS 1219, Berlin Heidelberg New York: Springer, 1997,123–135
Trang 9198 B Yang and J Liu
18 M Straßer, M Schwehm A performance model for mobile agent systems
In Proceeding of the International Conference on Parallel and Distributed Processing Techniques and Applications, 1997, 2: 1132–1140
19 J Liu, X.L Jin, K.C Tsui Autonomy Oriented Computing Dordrecht:Kluwer, 2005
20 J Liu, X Jin, K.C Tsui Autonomy oriented computing (AOC): Formulat-ying computational systems with autonomous components IEEE Transac-tions on System, Man and Cybernetics Part A:System and Humans (in press)
21 J Liu, J Han, Y.Y Tang Multi-agent oriented constraint satisfaction ficial Intelligence, 2002, 136(1): 101–144
Arti-22 J Liu, Y.Y Tang Adaptive segmentation with distributed behavior based agents IEEE Transactions on Pattern Analysis and Machine Intelligence,
1999, 21(6): 544–551
23 G Cabri, L Leonardi, F Zambonelli How to coordinate Internet applicationsbased on mobile agents Proceedings of the 1998 seventh IEEE International Workshop on Enabling Technologies: Infrastructure for Collaborative Enterprises, WET ICE, IEEE Computer Social Press, 1998, 104–109
24 H Casanova, J Hayes, Y Yang Algorithm and software to schedule and deploy independent tasks in grid environments In Proceedings of the Work-shop on Distributed Computing, Meta-computing, and Resource Globaliza-tion, Aussois, France, 2002
30 F Bagci, J Petzold, W Trumler Ubiquitous mobile agent system in a Network UbiSys-Workshop at the Fifth Annual Conference on UbiquitousComputing, Seattle, 2003
P2P-31 J Liu, C Yao Rational competition and cooperation in d ubiquitous agent communities Knowledge-Based System, 2004, 17: 189–200
K.S Teng, M Maheswaran Limited scope probing: A distributed approachfor QoS-based routing In IEEE International Symposium on NetworkComputing and Applications (NCA’01), Cambridge: Massachusetts, 2001,350–354
Trang 109 Multiagent Communication for e-Business using
Tuple Spaces
H.F Li, T Radhakrishnan, and Y Zhang
Department of Computer Science and Software Engineering
Concordia University, Montreal, Canada H3G 1M8
9.1 Introduction
9.1.1 Motivation
The growth in Web-based applications, distributed computing, and agent-based software technologies has created abundant interest in various aspects of aae-business One such application supported by these technologies is e-commerce
in which online transactions between a buyer and a seller are supported in variousstages of their trading (Gutman et al., 1998) E-commerce application systemshave to deal with a large number of interacting autonomous tasks using heteroge-neous information sources These interactions have a need to be well coordinated and coordination requires efficient communication among the entities The dynamicand complex nature of e-commerce requires a flexible technological infrastructure
to support business processes more easily and effectively
Agent-based software technology has become the subject of much research in a wide range of fields, especially in distributed system design Multiagent systemsare often used in a dynamic environment with autonomous problem solving enti-ties cooperating and coordinating with each other A typical software agent has the characteristics of autonomy, reactivity, proactivity and sociality, or structured interactions with other software agents This makes the multiagent systems a natu-ral candidate choice for implementing e-commerce applications
Business processes in e-commerce may be considered as a kind of coordinated multiagent system in which the software agents perform various market activities under dynamic partnerships With the increasing complexity of these applications,
we need programming models to deal with the coordination of a large number of concurrently active entities Thus, an infrastructure for coordination is needed tomeet the complex and dynamic requirements Tuple space that supports inter-agents coordination is an attractive solution
For this purpose, our research focuses on tuple space-based agent tion and tuple space-based agent programming framework (TSAF) that effec-tively supports building agent applications in e-commerce In the rest of this chapter, we discuss multiagent interactions through tuple space, presenting how tuple space facilitates the dynamic couplings among agents We also present an
Trang 11coordina-200
agent programming model called TSAF, which provides not only agent ture in abstraction, but also an easy-to-use programming environment for imple-menting the resulting design The incorporation of role models derived fromobject-oriented methodologies into the design of agent behaviors supports theanalysis and design of multiagent systems from the perspective of agent-oriented software engineering In the implementation level, TSAF also supports tuple space-based agent coupling mechanism The benefits of this framework are illustrated through a case study in e-commerce
architec-9.1.2 Agent Coordination in Multiagent System
Agents in a multiagent system have a general need to communicate amongst themselves, coordinate their activities, and negotiate once they find themselves inconflict Coordination models for multiagent systems can be broadly classified into direct coordination model and indirect coordination model Direct coordina-tion means that agents explicitly initiate a communication via message passingand explicitly name the involved partners in their messages In indirect coordina-tion, agents interact via a shared space, like blackboard, where messages are posted and retrieved A blackboard approach uncouples agent-to-agent interac-tions in time and space This suits many application scenarios where agents do not know or care about the address of the collaborators The tuple space-based coordi-nation model promotes dynamic information sharing, so that information is avail-able to any intended agent and every authorized agent can modify the information
on the tuple space The tuple spaces free the designer from the burden of keeping track of explicit or at least implicit addressing knowledge in agent couplings Finally, the “reactive tuples” [1] of tuple space can support event-driven coordina-tion among agents by triggering the reactions associated with such tuples Thesereactions are normally defined based on the different roles that an agent plays In addition, reactions can adapt the semantics of the interactions to the specific agent environment, thus simplifying the agent programming
9.2 Computation and Tuple Spaces
A typical approach in designing multiagent systems is the use of “role models” (Bauer, 2001) [2] that capture the different functionalities in the underlying appli-cation The roles are assigned to different agents An agent can be assigned multi-ple roles so that it can cooperate with other agents to complete different missionssimultaneously or at different times in its lifeline Cooperation requires interac-tions The traditional form of interaction is through message communication An agent sends mission-specific messages to other agents involved in the same mis-sion at “opportune times” in order to complete the common mission properly.When viewed globally, a mission involving multiple agents can be represented by the set of interaction protocols executed by these agents together Generic agent H.F Li et al
Trang 12201communication language (ACL) protocols can be found in the FIPA library [3],which support the agent application designs
Message communication is one of the mechanisms for supporting agent tions Agents can exchange and share information by sending messages to each other This form of interaction usually inherits two basic restrictions (1) thereceiver must be known to the sender and (2) the information obtained by the receiver reflects only the knowledge of the sender at the time when the message was sent The first restriction often leads to more static designs For example,the group of agents involved in the mission may not change dynamically in the mid-dle of an occurrence of the mission The second restriction leads to the knowledge
interac-of an agent to be space-time restricted An agent causally acquires its knowledge
of the world by receiving messages from other agents Such knowledge may not
be up to date and may indeed lead to inconsistent views among cooperatingagents, if the interaction protocols do not take care of synchronization properly.The former restriction affects the flexibility of the application design The latter restriction affects the ease with which a correct design can be constructed and eventually implemented
9.2.1 Basics of a Tuple Space
Abstractly, a tuple space stores an arbitrary set of entities (tuples) that are shared
by a community of agents Each entity is identified by a tag (template) Conflicts
in tags are allowed The pioneering ideas were developed in Linda [4] Three essential access primitives are associated with a typical Linda-based tuple space Insertion of a tuple can be achieved using out (tuple_tag) Removal of a tuple can
be achieved using in (tuple_tag), and nondestructive read out of a tuple can be formed using read (tuple_tag) Figure 9.1 demonstrates this use in a tuple spacethat stores items on sale in an electronic market shared by multiple merchants
per-Fig 9.1 Tuple space with animated items
9 Multiagent Communication for e-Business Using Tuple Spaces
Trang 13202
In Fig 9.1, the tuple space window contains two TVs, two or three computers, and two cameras, each entity can be made distinct with brand name and otherattributes (such as merchant, price)
A tuple space represents a globally consistent space shared by all agents taneously at all times The correctness semantics of a tuple space is the same asother forms of shared memory, i.e., sequential consistency [5] Stated simply, the state of the tuple space at any time must be as if the accesses from the agents are served in some interleaved (total) order consistent with the local order of the accesses from each agent As a result, as each agent progresses in its lifeline and changes its knowledge about the tuples in the tuple space, the global changes inthe tuple space are kept consistent with the instantaneous knowledge of each agent
instan-at all times Hence all relevant knowledge needed by an agent to advance is up todate when a tuple space is used By accessing the tuple space, an agent can acquire globally consistent information in a single access
A tuple space differs from conventional shared memory in two important aspects (1) It is an associative memory Tagging provides flexibility of access by association rather than by location address Tolerance of tag conflicts providesflexibility in storing a set of arbitrary size rather than a singleton at all times.Hence a set of entities fitting the same description (tag) can be presented in a tuple space (2) It allows destructive readout Hence agent coordination can be madeeasy when producer–consumer or mutual exclusion synchronization is required among cooperating agents Since these are the common forms of relationshipbetween functions performed by agents, tuple space is a natural medium for coordinating multiagent activities
Extensions of Tuple Primitives and Reactive Tuples
In addition to the basic primitives, several extensions have been reported [6–8] Collectively, these extensions provide additional flexibilities in tuple accesses A
“bulk” read [9] enables the retrieval of all tuples with a matching tag Hence onecan retrieve a whole set rather than one (arbitrary) element of the set This pro-vides flexibility to gather all necessary information without going for it in multiple rounds To maximize flexibility in coordination, WCL [7] introduces an additional type of input called nonblocking (asynchronous) tuple access, represented as “inp(tuple_tag)” In the nonblocking case, in the absence of a matching tuple, the agent f
is freed to continue with its future access without waiting for the “eventual” return
of a matching tuple that is inserted into the tuple space later This mimics blocking message passing and may be used for the purpose of enhancing the per-formance But, it requires a proper synchronization in the use of the “future” return of the access yet to be completed Another notable extension of tuple spaceprimitives is the use of logic operators An “and” or “or” operator can be used to conjunctively or disjunctively access multiple tuple spaces for matching tuples Inthe “and” case, each tuple space must contribute a matching tuple, while in the
non-“or” case, at least one tuple space must return a matching tuple to the access Thisprovides flexibility in using multiple tuple spaces for separate purposes (such asH.F Li et al
Trang 14203different markets), rather than a single tuple space with a possible degradation in performance.
Reactivity of a tuple space is considered in MARS [6] by introducing the notion
of reactive tuples An agent can program the tuple space to react to an event lus, such as the retrieval of some tuple Upon occurrence of the event, a reaction is triggered, leading to a change of the tuple space, such as insertion or modification
stimu-of a tuple The reaction is atomic with respect to the stimulus Hence, it is possible for the read to return a tuple that is modified by the reaction Similarly in out (tuple), if it triggers a reaction, then the outcome may be a modified tuple that is inserted into the tuple space In a slightly different manner, JavaSpace provides reactivity by incorporating a notify primitive so that an agent may be notified by the tuple space when some specific event has occurred The notification is asynchronous As a result, it is possible upon reaction; the agent may not find thecause (such as the tuple) that triggers the reaction in the tuple space any more
9.2.3 Implications in Using Tuple Space
Tuples provide a higher-level abstraction that is more powerful and convenient to use than point-to-point message communication In cooperative problem solving,
a tuple space acts like a global bulletin board that can be flexibly searched and updated by all participants without resorting to message exchanges that are moreprivate and local What must be consistently shared can be maintained by the
“runtime system” automatically without explicit programming effort on the side of the application developer The tuple space abstraction is easier to work with inapplication design For example, when the behavior of an agent depends on some global condition of the entire system, the dependency can be resolved and the agent advances forward by examining the shared tuple space In turn, if the action
of an agent may affect the progress of some other agents, it may simply modifythe shared tuple space to reflect the consequence of its action already performed.The agent does not have to ask around about the condition in the first case in order
to advance its behavior, nor does it have to tell everyone of its action This avoidsredundant push or pull of information among the agents and what must be done isdone via the rather strict forward tuple access primitives In general, the program-mability (ease of program development) of the platform based on tuple spaces is improved with the support of this shared medium Further demonstration of this will be provided in the following sections
There is also a price to be paid with the use of tuple spaces The consistency requirement of a tuple space has certain performance implication in its runtime system To maintain consistency, it is difficult to exploit locality by replicatingtuple spaces in a distributed system But with a single tuple space serving the entire system, a bottleneck effect may arise Hence tuple space does come with a price at runtime In other words, to support tuple-based interactions efficiently at runtime, the design of the tuple space requires an efficient underlying protocol that can promote concurrency in accesses by distributing tuples across the physicalnetwork and manage them correctly, with or without selective replications of
9 Multiagent Communication for e-Business Using Tuple Spaces
Trang 15204
tuples Otherwise, a tuple space can form a central bottleneck in the progress of the agents attempting to access it simultaneously
9.3 Examples of Agent Coordination in e-Commerce
This section describes a few scenarios of agent coordination in e-commerce that is facilitated with the use of tuple spaces It should be noted that since tuple space is
a higher level abstraction and is actually implemented via message communicationtt
in the runtime system, the significant return in using tuples in agent coordination lies on its ease of use in both the application design and program development It
is also envisioned that tuple space provides global information sharing that oftenleads to better results in applications as consistent and instantaneous knowledgecan be acquired directly among the sharing agents
9.3.1 Dynamic Public Auction
Existing auction protocols such as the standard FIPA protocols for English and Dutch auction [10] involve a fixed set of participating agents A dynamic auction
in real life may involve a dynamically changing set of participants Participantscan join and leave an auction any time in the auction period, provided outstandingobligations remain committed Such an auction can be easily implemented usingtuple space, as depicted in Fig 9.2a, b
Fig 9.2
Figure 9.2a shows an animated auction involving a tuple space that holds ananimated tuple consisting of a painting and the current highest bid price announced
by the auctioneer, and a few newly submitted bids (tuples) from participants A, B,
C Figure 9.2b shows a future round with updated tuples and participants A, D, and E Obviously, participants have changed B and C give up in the auction,H.F Li et al
Trang 16205while D and E are newcomers beating the current highest bid price ($420), whichmay be the bid price of A
As can be observed in Fig 9.2, part of the tuple space has served as the cal auction medium for conducting the auction The fact that this medium is glob-ally consistent and up to date with respect to all participants makes it easy andextremely user friendly in application design Note that reactive tuples such asthose supported by MARS can make these even simpler by allowing new bids toupdate the highest bid atomically and conveniently in a single tuple access
physi-Shopping in Multiple Markets
A single electronic market can be visualized to be supported by a tuple space Topromote market efficiency, different tuple spaces can be formed to support differ-ent markets As a result, it is possible that the tuple space servers can operate con-currently without creating a server bottleneck This follows the principles of concurrency and locality of interaction in managing system performance How-ever, it is also conceivable that a client agent may be interested to shop acrossmultiple markets at the same time and decide its purchases simultaneously Whenimplemented using message passing, this client agent will have to communicate tovarious market agents, conduct negotiations through separate protocols, and even-tually decide on its purchases Meanwhile, consistency and persistence of avail-ability and pricing information must be maintained in the participants, and theoverall coordination involving multiple parties and multiple sites of purchasesmay lead to complications in synchronization that ultimately affect the market performance
Fig 9.3 Logical template
When supported by tuple spaces, a simple extension of tuple access involvinglogical tags will significantly simplify the interactions required and potentiallyimprove the market efficiency This extension is implemented in our experimental framework detailed in Sect 9.4 Conceptually, the client agtt ent can issue a
9 Multiagent Communication for e-Business Using Tuple Spaces
Trang 17206
logic_template_in() access This access will enable him to retrieve, in a singlestep, multiple sets of tuples from one or more markets In other words, he maychoose to retrieve TVs and refrigerators that satisfy certain criteria from one or all
of the markets (tuple spaces) specified in his access operation Figure 9.3 trates such a use scenario It is obvious that programming effort required to do
illus-so is significantly reduced while global consistent information in collected orconsumed
In Fig 9.3, there are two markets (tuple spaces: tsId1 and tsId2), each of whichcontains few different types of TVs and refrigerators A buyer agent wants to retrieve product information from the two markets From market1, he is interested
in the TV product with the fields of “TV,” “Sony,” and “FlatScreen” in a search tuple; from market2, he wants to know the information of refrigerators with thefields of “Refrig,” “Haier,” and “18.8Cu” in another search tuple First, it con-structs a search tuple with search requirements Then it constructs two search tem-plates (template1 and template2) for searching the product from each of the tuplespaces A logic template combining the two templates is created using logic opera-tor “and.” Finally, a bulk synchronous access operation is used to perform the actual search The returned future object contains a set of tuples.b
//constructs different search templates for different tuple spaces
Template template1 = new Template (tsId1, search_tuple);
Template template2 = new Template (tsId2, search_tuple);
//constructs a logic template
LogicTemplate sLogicTemplate = new LogicTemplate();
sLogicTemplate.and (template1, template2);
//searches the logic tuples through bulk primitive
MultipleTupleSet multiTSet = myAgent.bulkReadWithoutWait plate);
sLogicTem-9.3.3 Advertised Sales/Purchases
A conventional tuple space lacks responsiveness provided by direct message communication In other words, unless a consumer is already waiting for the pro-duction of some needed data (tuple), it may not become aware of its existenceuntil much later Constantly sampling the tuple space using nondestructive readout affects performance because of the potential waste of time To remedy this, reac-tive tuple space has become a necessary extension Reactive tuples have been implemented also as in MARS and JavaSpace In our experimental frameworkdetailed in Sect 9.4, a slightly different reactive tuple is implemented Unlike MARS, the reaction in our case is a sub-behavior of the agent that registers itself uwith the tuple space Upon the occurrence of the stimulus, atomically or non-atomically, the reactive behavior of the agent will be triggered and performed bythe agent This can be put to use in advertised sales or purchases In an advertised sale, a “shopping agent” may register itself with the market (tuple space) so that when a corresponding tuple is inserted into the tuple space by a “seller agent,” theshopping agent can immediately react and respond to the state change
H.F Li et al
Trang 189.4 A Tuple Space-Based Framework for Agent Communication
9.4.1 Reactive Tuple Space
This section presents some details of our experimental reactive tuple space [11]implemented on the JADE platform Java agent development framework (JADE)
is a framework that facilitates the development of multiagent systems It defines
an agent model from which a software developer can extend to include specific business logic We further extended JADE [8, 12] to reactive tuple space for thettsupport of agent interactions Figure 9.4 shows the overall architecture of theJADE platform
Fig 9.4 JADE architecture
The JADE platform is composed of several containers Every container runs on
a Java virtual machine and can host zero or more agents The platform can beactually distributed across several hosts, and an agent will not have to know the existence of the underlying network as JADE provides the high-level abstraction called ‘container’ to hide the complexity of distribution In JADE, there are twokinds of interfaces to an agent The first kind is called “internal interface,” which
is defined by the container to provide system services of life cycle management, message service, mobility support, and resource allocation An agent accesses the system services through its container The container then delegates these servicerequests to the corresponding manager The second kind is known as the “callback interface.” This interface includes hooks that will be implemented by an agentdeveloper and called back by the container at runtime The callback interfaces can
be further classified into two subcategories: system oriented vs application ented The system-oriented interfaces allow an agent to customize the system service, while the application-oriented interfaces help an agent to program itsbusiness logic The application-oriented interfaces are captured by the agent behavior model in JADE, which illustrated in Sect 9.4.2
ori-An agent is an active object and follows “a thread-per-agent concurrencymodel.” It means that there is a single Java thread per agent to execute all its tasksconcurrently JADE also provides an “agent behavior model” in the form of abstract classes to support concurrent execution of agent behaviors An agent may havemultiple behaviors to model the underlying tasks At runtime, the embedded
9 Multiagent Communication for e-Business Using Tuple Spaces
Trang 19208
scheduler inside each agent will schedule and execute the various behaviors in a round-robin manner JADE provides message passing to support agent interac-tions It supports FIPA ACL specification to create messages
Fig 9.5 Reactive tuple space architecture
Figure 9.5 is the reactive tuple space architecture viewed in a high-level tion The tuple space is designed to be part of the JADE services There are twolayers in this abstract architecture: the “tuple space shell” and the “tuple spacekernel.” Multiple tuple spaces are distributed over the network environment The communication between the shell and the kernel is a local method call The ker-nels located inside different JADE containers communicate with each other through RMI The shell is in the agent level and supplies stable interfaces for agents In addition, there is a connector in the shell The connector performs the exchange and transformation of data between an application agent and the kernellevel The kernel processes tuple accesses from the shell locally or remotely, and returns appropriate responses If the required tuple space is located in a remotecontainer, the kernel forwards the request to the (tuple) kernel in the remote con-tainer The kernel also includes a framework to support agent reactive behaviors This framework provides the reactive programmable interface called IReactive for agents and will trigger (execute) these reactive behaviors when the specified events occur The kernel uses replication to make the system efficient
abstrac-Our design follows the principle of minimal change to the JADE source code.The first change is to extend the interfaces of the JADE Agent class so that an agent can access tuple spaces The second is to handle agent mobility so that when an agent migrates from one container to another container, reactitt ve behavior registra-tion information can be updated by the reaction manager Thus, it can keep locationtransparency for agent reactions Finally, the initialization and termination handling
of JADE are modified so that tuple space services can start and stop properly
9.4.2 Tuple Space-Based Agent Interaction Primitives
Some of the tuple primitives are already highlighted in earlier sections In this tion, we present the full taxonomy of primitives that are incorporated in our design H.F Li et al