A Grid-Based Mobile Agent Collaborative Virtual Environment

Embed Size (px)

Citation preview

  • 8/3/2019 A Grid-Based Mobile Agent Collaborative Virtual Environment

    1/5

    A Grid-Based Mobile Agent Collaborative Virtual Environment

    Hoon Kang Neo1

    , QingPing Lin2

    and Kim Meow Liew1

    1School of Mechanical & Aerospace Engineering

    2Information Communication Institute of Singapore, School of Electrical & Electronic Engineering

    Nanyang Technological University

    50 Nanyang Avenue, Singapore 639798.

    Emails: [email protected], [email protected], [email protected]

    Abstract

    This paper describes a large-scale collaborative virtual

    environment architecture that has the capability of scaling

    across multiple geographically dispersed resources. The

    architecture consists of distributed mobile agents working

    cooperatively in supporting and managing the virtual envi-

    ronments. The mobile agents tasks include managing per-

    sistency and consistency of the virtual worlds, maintaining

    reliability and efficiency of user interactions, ensuring secu-

    rity and integrity of data and systems, and so on. The mo-

    bile agents are autonomous and has the ability of migrating

    among hosts to maximize resource utilizations.

    Grid technologies and concepts are introduced into the

    architecture. These improvements allow the mobile agents

    to execute and communicate securely in multiple adminis-

    trative domains. Grid-based scheduling components and

    polices are integrated to provide intelligent resource op-

    timizations. Furthermore, a better load-balancing can be

    achieved by utilizing additional or more accurate informa-

    tion like data-user proximity and hosts workload invari-

    ance etc. The result will be a more scalable and robust mo-

    bile agent architecture.

    1. Introduction

    Collaborative Virtual Environment technology is used

    in numerous application domains for users to experience

    shared sense of space and presence. It provides additional

    dimensions of communications [13], offering users the abil-

    ity to interact with each other in a common context [10].

    The changes and information propagated are experienced

    or received simultaneously. However, in most practical

    implementations of Large-scale Collaborative Virtual En-

    vironments (LCVE), this feat requires tremendous amount

    of network capacity and computational power. Most LCVE

    systems are distributed in order to overcome the limited re-

    sources of a single hosting entity. However, when a LCVE

    system is implemented in distributed fashion, scalability is

    one of the primary problems. Large amount of communi-

    cations are required between the distributed components in

    order to coordinate and share data. The amount of commu-

    nication can increase exponentially as the number of users

    or size of virtual world grow. Although widely researched,

    scalability has always remained as one of the main chal-

    lenges in LCVE systems.

    Over the years, various approaches and techniques have

    been researched and developed. They can be vaguely

    grouped into two classes: interest management and com-

    munication architecture. In interest management, the spatial

    division of virtual space and introduction of entity auras are

    among some of the popular methods. They are aimed at re-

    ducing the message exchanges without harming the shared

    context and interactive performance [8]. On the other hand,

    the communication architecture approach adopts different

    network topologies and protocols in dealing with scalabil-

    ity issues. Peer-to-peer, federated peer-to-peer [12], client-server, and multicasting [6] are among some of the popular

    methods. In peer-to-peer architectures, databases are usu-

    ally duplicated entirely on all participating hosts to prevent

    workload and communication bottlenecks [10]. In client-

    server architectures, workload are distributed among multi-

    ple servers.

    The work in [10] has highlighted a need for flexible ap-

    proach to the scalability problem. Mobile agent paradigm

    Proceedings of the 2005 International Conference on Cyberworlds (CW05)

    0-7695-2378-1/05 $20.00 2005IEEE

  • 8/3/2019 A Grid-Based Mobile Agent Collaborative Virtual Environment

    2/5

    has been identified as the possible solution. It is based on

    the idea of mobile codes or processes that can migrate from

    one host to another, continuing its executions after the mi-

    grations [3]. These codes have the ability of migrating to

    hosts with the desired resources and services, which signif-

    icantly increases the overall performance, parallelism and

    resilience of the system. The network traffic is reduced,and the components are less coupled and more robust [1].

    Using a mobile agent oriented approach, the LCVE can be

    constructed using flexible and agile agents. These agents

    are assigned with different and overlapping tasks like user

    interactions, system maintenances, and resource manage-

    ments etc. They work cooperatively to maintain the virtual

    worlds and the system. The mobile agent approach also of-

    fers robustness through duplication of tasks and data, and

    increased responsiveness through strategic assignments of

    user interaction agents. A Mobile Agent based Collabora-

    tive Virtual Environment (MACVE) has been proposed in

    [10].

    While Mobile Agent systems are flexible and agile, theGrid will be able to provide additional reliability and scala-

    bility needed [2]. Grid tools and concepts have been intro-

    duced into the MACVE architecture in view the following

    practical needs:

    The ability to scale across multiple administrative do-

    mains as the workload surpasses capacity of a single

    hosting domain.

    To guarantee a reasonable and well-balanced level of

    service to users who are geographically dispersed.

    To have a reliable distributed resource discovery mech-

    anism in the heterogeneous environment.

    The need for a uniform resource referencing or naming

    system in the heterogeneous environment.

    To have a reliable and standardized security where au-

    thorizations, authentications and policies enforcement

    can take place easily in multiple administrative do-

    mains.

    A common communication infrastructure and protocol

    between the components.

    The need for an appropriate Grid-based scheduling

    framework and algorithms.

    2. Grid-based MACVE Architecture

    The Grid-based MACVE has the capability of scaling

    and adapting in a Grid environment. The mobile agents

    will be able to migrate among resources that are located

    in different administrative domains. The agents tasks in-

    cludes LCVE supporting roles like maintaining database

    consistencies, user interactions, scenes updating, and graph-

    ics rendering etc. Moreover, the agents are also tasked with

    resource discovery, scheduling, and monitoring roles. In

    this paper, we will take a brief look at five main areas of the

    Grid-based MACVE architecture:

    1. Mobile agent lookup services.

    2. Grid-based mobile agent environment.

    3. Resource discovery and monitoring.

    4. Resource scheduling and load balancing.

    5. Security.

    2.1. Mobile Agent Lookup

    One of the primary issues in large-scale mobile agent

    systems is determining the locations of agents. The sys-

    tem needs to have accurate and up-to-date knowledge of thelocations in order to manage and operate efficiently. This in-

    formation is needed for tasks like message deliveries and re-

    source scheduling. However, due the mobility of the agents

    and the dynamic nature of the Grid resources, keeping track

    of the agents locations can be difficult. There is no fixed

    collection of hosts in the Grid-based MACVE environment.

    Hosts can join or leave the resource pool any time due to

    reasons like system crashes, network lost, system mainte-

    nances, and user quitting etc. Moreover, slow information

    propagation in the geographically dispersed and adminis-

    tratively diversified environment will contributed to incom-

    patible views. As a result, contradicting decisions might be

    made by components of the system.The proposed solution is a distributed mobile agent

    lookup service. A distributed directory service will main-

    tain and provide up-to-date information about the location

    of all the mobile agents in the Grid-based MACVE. Uti-

    lizing scalable and robust Peer-to-Peer distributed hash ta-

    bles (DHTs), information are stored in different locations

    or nodes within the Grid-based MACVE environment. The

    node that stores the targeted data item can be located ef-

    ficiently using the mobile agents ID and one of the many

    DHT lookup or routing algorithms.

    Chord [15] is among the many P2P DHT algorithms ex-

    plored in this work. In the Chord algorithm, the information

    nodes are virtually arranged in a ring geometry. The algo-rithm is based on a variant of consistent hashing [9], which

    allows Chord to adapt efficiently as nodes leaves or join

    the network. Minimum rearrangement of data item is re-

    quired when this happens. As pointed out in [15], with high

    probability, O(log2 N) messages are needed to re-establishthe necessary information when a node joins or leaves. On

    the other hand, consistent hashing also allows the Chord

    to load-balance efficiently, with each node responsible for

    Proceedings of the 2005 International Conference on Cyberworlds (CW05)

    0-7695-2378-1/05 $20.00 2005IEEE

  • 8/3/2019 A Grid-Based Mobile Agent Collaborative Virtual Environment

    3/5

    (1 + )K/N keys where is proven to be ofO(log N)[15]. On top of scalability, graceful degrading and load-

    balancing capability, the protocol is also characterized by

    its efficient lookup. Assuming a N-node Chord network, a

    query will be routed through a sequence of O(log N) nodes

    before its destination [15].

    2.2. Grid-based Mobile Agent Environment

    The mobile agent environments (MAEs) are essentially

    agent servers residing in all participating nodes in the

    MACVE Grid. They are holistic environments where the

    mobile agents can execute securely in. Besides providing

    execution management services, the environments also en-

    ables the mobile agents to do things like accessing local re-

    sources, migrating to other MAEs and sending messages

    etc. The following is a list of the services the MAEs pro-

    vide:

    Resource access and control based on agents creden-tials and ownerships.

    Mobile agent management services which can be in-

    voked by mobile agents on themselves or others.

    Mobile agent migration handling, where the mobile

    agents can do a sender-initiated and secured transfer

    to desired destinations.

    Two types of communication channel between the

    agents. One for data streaming and the other for mes-

    sage passing.

    Monitoring of agents execution, where informationabout individual agents and their resource usage can

    be provided.

    In the Grid-based MACVE, MAEs exists in the forms of

    WSRF (Web Service Resource Framework) Grid services.

    There will be MAE daemons running on every participat-

    ing hosts. The MAE services and functions are exposed to

    the mobile agents and peer MAEs via the WSRF. Two main

    services are identified: the Message Service and Agent Ser-

    vice. An overview of the Grid-based MAE services can be

    found in figure 1.

    In the Grid-based MACVE environment, communica-

    tion is a critical part of the system. The mobile agents needan efficient, reliable and secured communication infrastruc-

    ture for purposes like maintaining the virtual worlds, man-

    aging resources and co-ordinations. This infrastructure has

    to support data streaming and messaging. A guaranteed

    level of service is needed where time-critical data is con-

    cerned.

    Figure 2 shows a simple messaging service in the Grid-

    based MACVE environment. The service is implemented

    Figure 1. Overview of MAE Services.

    in the form of WSRF Grid service. There are two main el-

    ements: the Message Manager and Message Service. The

    Message Manager is part of the MAE daemon, listening to

    and servicing requests from the stateless instances of Mes-

    sage Service. The Message Manager can located by a ser-

    vice instance during its creation, using the MAE Resource

    Home. A new instance of Message Service is created each

    time the service interface is invoked. Mobile agents willpost messages to the local Message Manager. The message

    will be delivered straight to the receiver agent if it resides in

    the same host. Otherwise, the Message Manager will try to

    locate the destination using the mobile agent lookup service

    described in section 2.1.

    Figure 2. Messaging Service.

    On the other hand, agent management tasks are covered

    by the Agent Service and Agent Manager components. The

    main tasks include:

    Send an agents code segment or class to remote desti-

    nation.

    Receive an agents code segment or class.

    Launch or instantiate an agent locally.

    Pause a running agent.

    Resume a paused agent.

    Kill a running agent.

    Proceedings of the 2005 International Conference on Cyberworlds (CW05)

    0-7695-2378-1/05 $20.00 2005IEEE

  • 8/3/2019 A Grid-Based Mobile Agent Collaborative Virtual Environment

    4/5

    The agent management portion of the architecture has

    an identical design with the messaging service. It is shown

    in figure 3. There are two elements: the Agent Manager

    and Agent Service. The Agent Service instances are state-

    less and reside in the service container. A new instance

    of the Agent Service is created at every invocation of the

    service interface. The new instance will locate the AgentManager using the Resource Home. In figure 1, the re-

    turn of the retrieve() result is done by another service call

    from the service provider (Host A) to the consumer (Host

    B). This scheme allows the process to avoid session time-

    out before the transaction completes. The amount of time it

    takes for searching and transferring agents depends on fac-

    tors like size of agent database, network latency, and the

    size of agent class etc. Therefore we are unable to deter-

    mine whether the Web Service session will timeout before

    the transaction finishes.

    Figure 3. Agent Management.

    2.3. Resource Discovery and Monitoring

    Resource discovery, in MACVEs context, means the de-

    tection of new nodes and services. On the other hand, re-

    source monitoring also involves keeping watch on the sta-

    tus of the services, mobile agents, and the nodes. In the

    Grid-based MACVE, these information can come from a

    few sources: the Grid infrastructures Information Services,

    monitoring tools like Network Weather Service (NWS) [11]

    or Ganglia [4], and the mobile agents.

    In the Globus Toolkit 4.0 (GT4) [5] implementation, the

    main discovery and monitoring component of the toolkit

    is called the Monitoring & Discovery System 4 (MDS4).

    Index Services implemented within the MDS4 allows the

    discovery and monitoring of Grid services. To utilize thisframework, an agent (the Group Manager Agent) is tasked

    to find out and monitor the individual nodes resources con-

    ditions from the Index Services, as shown in figure below.

    In every Virtual Organization (VO), there will be a rep-

    resentative Index Service where the Group Manager will be

    subscribed to. When new services or resources are avail-

    able, it is the Group Manager Agents job to seek and find

    out more about the resource. If the need arises, the Group

    Figure 4. Information Services and ResourceDiscovery.

    Manager Agent will seek resource information from itspeers residing on other VOs. Historical data are also stored

    in the Group Manager Agents, which can be used for more

    efficient and intelligence resource management. On the

    other hand, additional non-static information are gathered

    from distributed systems monitoring tools like the NWS and

    Ganglia. Information such as the predicted resource para-

    meters from the NWS can be utilized in the scheduling and

    load balancing algorithms.

    3. Resource Scheduling & Load Balancing

    The problem of scheduling and load balancing in theGrid-based MACVE can be viewed as a simple case of

    trying to assign n number of mobile agents with different

    workloads, to m number of hosts with different capacities.

    Optimization schemes and algorithms can be utilized to do

    this. However, in the real world, things are much more com-

    plicated than this.

    It is obvious that the effectiveness of the scheduling and

    load balancing algorithms will depend on the accuracy of

    the capacities and workloads calculations. In the Grid en-

    vironment, it is relatively easy to capture, through informa-

    tion services, a hosts static information such as CPU fre-

    quency, memory size, network bandwidth, disk space etc.

    However, these information cannot realistically representa grid resources capacity because it is a shared environ-

    ment. Moreover, the measurement of the workload of the

    individual agent will be a complex task. It might not be a

    worthwhile effort after all. The closest we can get to real

    measurements are through historical data from similar mo-

    bile agents. Similar method has been used in [16] and [14],

    where the predicted execution time of a task is the average

    execution time of previous similar tasks in the past.

    Proceedings of the 2005 International Conference on Cyberworlds (CW05)

    0-7695-2378-1/05 $20.00 2005IEEE

  • 8/3/2019 A Grid-Based Mobile Agent Collaborative Virtual Environment

    5/5

    Characterized by high migration cost of the Grid, we

    wanted to make sure that the performance gains would over-

    shadow the migration penalties in any situation. Therefore,

    we are looking at adopting a scheduling strategy that gain

    maximum performance and at the same time minimizes the

    mobile agents movements. Load balancing via spread min-

    imization, proposed by Kleinberg and Leighton in [7], isexplored. The consistent load balancing used in [7] is moti-

    vated by the idea of consistent hashing [9] which minimize

    the changes to the environment during every adjustment.

    Furthermore, the dependencies between the mobile agents

    must be correctly captured to ensure the effectiveness of the

    scheduling and load balancing.

    4. Security

    Transparent authentication, authorization and local pol-

    icy enforcement is important when the MACVE scales

    across heterogeneous systems in multiple administrative do-mains. The ultimate goal of the system is to enable the

    agents to migrate freely among all the hosts they have per-

    missions to.

    The Grid Security Infrastructure (GSI) from GT4 sup-

    ports authentication, authorization and delegation using

    X.509 certificates and public keys. Authorization policy is

    configured both on the service and client side. Therefore,

    the services (Agent Service and Message Service) provided

    by all the participating nodes are implemented in the form

    of secured services. On the other hand, the consumer com-

    ponents (in Agent Manager, Message Manager, and Agent

    Service) will either have authorization mechanisms or use

    security descriptors. The messages exchanged between theservices will be secured using GT4s transport-level secu-

    rity. The transport-level security utilizing X.509 proxy cer-

    tificates is based on the modified HTTP over SSL protocol

    (HTTPs).

    One of the many security threats identified in the Grid-

    based MACVE environment is the hacking or stealing of

    the agent codes through methods like code reverse engi-

    neering and code modification. Code level protection can

    be enforced with code obfuscators like Bolands Crema and

    Jschrink by Eastrifge Technology. These obfuscators work

    mainly by removing unused code and data, and obfuscating

    symbolic names, replacing them with non-intuitive alterna-

    tives. The obfuscating process makes the code resilience to

    decompilations.

    5. Conclusion

    In this paper, we have introduced a Grid-based collabora-

    tive virtual environment architecture that has the capability

    of scaling reliably across multiple geographically dispersed

    resources. This architecture is designed to be flexible, au-

    tonomous and scalable. The development work for this ar-

    chitecture is still underway during the writing of this paper.

    References

    [1] W. R. Cockayne and M. Zyda. Mobile Agents. Manning

    Publications Co, 1997.

    [2] I. Foster, N. R. Jennings, and C. Kesselman. Brain meets

    brawn: Why grid and agents need each other. In Third Inter-

    national Joint Conference on Autonomous Agents and Mul-

    tiagent Systems, volume 1, pages 815, 2004.

    [3] I. E. Foukarakis, A. I. Kostaridis, C. G. Biniaris, D. I. Kak-

    lamani, and I. S. Venieris. Implementation of a mobile agent

    platform based on web services. In MATA, pages 190199,

    2003.

    [4] Ganglia. Ganglia. http://ganglia.sourceforge.net/.

    [5] GT4. Globus toolkit 4.0. http://www-

    unix.globus.org/toolkit/docs/development/4.0-

    drafts/GT4Facts/index.html.

    [6] C. Joslin, T. D. Giacomo, and N. Magnenat-Thalmann. Col-laborative virtual enivronments: From birth to standardiza-

    tion. IEEE Communication Magazine, Special Issue on Net-

    worked Virtual Environments, 42(4):6574, Apr 2004.

    [7] R. Kleinberg and T. Leighton. Consistent load balancing

    via spread minimization. In STOC 03: Proceedings of the

    thirty-fifth annual ACM symposium on Theory of computing,

    pages 565574. ACM Press, 2003.

    [8] D. Lee, M. Lim, and S. Han. Atlas a scalable network

    framework for distributed virtual environments. In Proceed-

    ing of the 4th International Conference on Collaborative

    Virtual Environments, pages 4754, 2002.

    [9] D. M. Lewin. Consistent hashing and random trees: Algo-

    rithms for caching in distributed networks., 1998. Available

    at http://thesis.mit.edu/.[10] Z. Liang, L. Qingping, and C. T. Fook. Mobile agent-based

    architecture for large-scale cve. In CW, pages 6977, 2003.

    [11] NWS. Network weather service. http://nws.cs.ucsb.edu/.

    [12] S. Rooney, D. Bauer, and R. Deydier. A federated peer-

    to-peer network game architecture. IEEE Communications

    Magazine, 42(5):11422, 2004.

    [13] S. Singhal and M. Zyda. Networked Virtual Environments -

    Design and Implementation. Addison-Wesley, 1999.

    [14] W. Smith, I. T. Foster, and V. E. Taylor. Predicting applica-

    tion run times using historical information. In JSSPP, pages

    122142, 1998.

    [15] I. Stoica, R. Morris, D. Liben-Nowell, D. R. Karger, M. F.

    Kaashoek, F. Dabek, and H. Balakrishnan. Chord: a scal-

    able peer-to-peer lookup protocol for internet applications.IEEE/ACM Trans. Netw., 11(1):1732, 2003.

    [16] L. Yang, J. M. Schopf, and I. Foster. Conservative schedul-

    ing: Using predicted variance to improve scheduling deci-

    sions in dynamic environments. In Supercomputing 2003,

    Nov 2003.

    Proceedings of the 2005 International Conference on Cyberworlds (CW05)

    0-7695-2378-1/05 $20.00 2005IEEE