Bond Extensions

The following extensions were made to apply the Bond agents to the development of the networked systems. In those systems, the agents are responsible for the monitoring and control of the components of the systems. The list of the extensions are as follows

The integration of the Java Expert System Shell (JESS) inference engine

The integration of IBM TSpaces

The synchronization of the agents

The barrier is used to synchronize a set of agents that involve in a task. The barrier originates as a logical point in parallel programs at which all participating processors are synchronized to start and end their executions.

A master--worker barrier synchronization through a shared space was implemented. The barrier is implemented as a tuple in a tuplespace.
The barriers have names that identify and distinguish themselves from other barriers. In the beginning, a master agent creates a barrier to the shared space. The barrier has an associated goal number, the number of tokens that this barrier must collect before notifying the master agent of the completion of all worker agents. Then, the master agent signals a set of worker agents to proceed by sending messages, which also include the barrier name. Upon completion of their tasks, the worker agents post tokens to the barrier, which in turn increase the barrier's internal variable, current token number, incrementally.

The example agent-based system to use the barrier is an agent-based Web benchmarking system.
 

The remote strategy loading

The agent factory, which assembles agents as directed by the blueprint, can download strategies that are required to assemble the agents from remote places, e.g., strategy repository. The agent factory searches for the strategies from the three places in the following order: first, local disk, a specified strategy repository, and finally a default strategy repository. The request for agent creation can contain the parameter that specifies the strategy repository from which required strategies can be downloaded.

The implementation can be found in bondLoader.  A part of bondLoader that is related to remote strategy loading is as follows:

 public Class loadClass(String name, Vector searchpaths) {
      String completename;

       /*
            search for strategies in local disk
       */

       for(int i=0; i!=searchpaths.size(); i++) {
        try {
           Class cl = Class.forName(makeName(name, (String)searchpaths.elementAt(i)));
           /*
               if a required strategy is found, return.
           */
           return cl;
        } catch(ClassNotFoundException cnfe) {
        } catch(Exception ex) {
          Log.Debug("Some exception:");
          ex.printStackTrace();
        }
      }

      /*
          If the execution flow reaches this point, the strategy is not available locally.
          Load classes remotely
       */

      if (cloader == null) {
        /*
             the location of the strategy repository specified in the agent creation request message.
         */
        String c_repository = System.getProperty("bond.current.strategy.repository");
        /*
             the location of the default strategy repository
         */
        String repository = System.getProperty("bond.strategy.repository");
        if (c_repository != null && repository != null) {
        try {
             URL urlList[] = {new URL(c_repository), new URL(repository)};
            cloader = new URLClassLoader(urlList);
        }
        catch (MalformedURLException e) {
            e.printStackTrace();
        }
        }
       else if (repository != null) {
       try {
          URL urlList[] = {new URL (repository)};
          cloader = new URLClassLoader(urlList);
        }
        catch (MalformedURLException e) {
          e.printStackTrace();
        }
      }
 

Distributed and adaptive algorithms for fault detection and fault information dissemination

The Bond agents form a federation, which refer to a set of agents that collaborate a task, and monitor the fault of other agents in distributed way and allows new/repaired agents to join the federation any time. The agents should monitor only one agent and be monitored by only one agent, thus the agents in a federation form a ring monitoring topology if the monitoring relations among the agents are represented as directed graph. The agents detects either the fault of the agent or the join of new/repaired agent. Once such information is detected, the agent starts to disseminate the information to other agents. The agents involving in disseminating the information form a binary tree.
The detail about the algorithms can be found in the paper.
The algorithms were implemented by the following classes that are availabe in Bond/bond/agent/FaultDetection:


The execution of the algorithm is controlled by whether the agent control message "start-agent" contains a parameter ":alias" or not. If the parameter ":alias" is provided and a configuration parameter, bond.faultDetection, as true in the file, properties of which location is Bond/bond/core/, the agents are configured to embed the implementation of the above algorithms. The following is a part of sphAgentControl() method of bondAgent.java.

if (m.content.equals("start-agent")) {
       String als = (String)m.getParameter(":alias");
      if (als != null) {
         dir.addAlias(als, this);
         initFaultDetection();
      }
      start();
      return;
    }

where String als should be non-null and has an agent ID in order to run the algorithms by calling the method initFaultDetection(), which in turn,

  public void initFaultDetection() {
    String tmp;
    if ( (tmp = System.getProperty("bond.faultDetection")) != null && tmp.equals("true")) {
      fs = new bondFaultStatus(dir.getAlias(this)+"+"+com.localaddress+":"+com.localport);
      fs.startFaultDetectionMessageHandler();
      // load system graph
      fs.initStatusTable(System.getProperty("default.monitoring.agent"));
      // start searching
      fs.startMonitorSearcher(true);
    }
  }

where it first create a fault status table and start to run the algorithms. The agent ID that is given as the value of the parameter ":alias" should be non-negative integer. It should be cautious not to assign the same ID to multiple agents.