Agent Name Server
User Guide


Index | Overview | Requirements | Querying an ANS
Starting an ANS | ANS for Windows | Javadocs | Bug Report


Starting an ANS (Option 2)

If there are no Agent Name Servers running on your network, you will need to start one.

An Agent Name Server can be launched on your machine manually at the Unix command prompt or via the ANS Graphical User Interface (ANSGUI). Two complete sets of instruction are available, one set for each startup method. Each set is independent of the other, so feel free to jump directly to the method you prefer. The GUI method is below, the manual method is on the previous page.

Starting ANS with the GUI | Starting ANS at the command prompt


Starting ANS with the GUI

  1. Check your CLASSPATH at the command prompt by typing "echo $CLASSPATH" followed by a carriage return <CR>. You should see the following CLASSPATH setting on your screen: /afs/cs.cmu.edu/project/pleiades/java/pleiade_classes/java
  2. Verifying CLASSPATH Example
    echo $CLASSPATH <CR>
    /afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java

    If your CLASSPATH is not set properly, please follow the directions for setting your CLASSPATH on the System and Other Requirements Page.


  3. Start the ANSGUI program. The basic command is:

    java EDU.cmu.softagents.misc.ANS.GUI.AgentNameServerGUI

    Starting ANSGUI Example
    java EDU.cmu.softagents.misc.ANS.GUI.AgentNameServerGUI <CR>

    After a few seconds, the graphical interface should appear on your screen.


  4. Enter data into the required fields. The ANSGUI is divided into four sections: ANS, Database, External Servers, and Log.
  5. ANS screenshot

    On startup, the "Database" and "External Servers" sections are unavailable until selected in the "ANS" section.

    1. The "ANS" Section consists of the following required and optional fields:

      Name The logical name for your Agent Name Server
      Host The hostname for your ANS server
      Port The reserved port ID on which your ANS will run. We typically use port 6677, but you are free to choose your own port number
      Use Backup This checkbox, when selected, directs the ANS to log the agents registered with your ANS. You must specify the directory in the "Log" section of the GUI. If your ANS crashes but the agents registered with it are still running, the Use Backup function will remember their addresses during ANS restart
      Use Database This checkbox, when selected, directs the ANS to use a Mini SQL database to store a list of registered agents. This option will not work if you do not have a Mini SQL server running on the host and port specified in the Database section
      Use Externals This check box, when selected, enables the ANS to connect to other ANS servers. Don't check this box if you are not planning to start more than one ANS

      The "name," "host," and "port" fields are required. The "Use Backup," "Use Database," and "Use Externals" boxes are optional. (The accompanying "Database," "External Servers," and "Log" sections of the ANSGUI are therefore also optional.)

      ANS screenshot

      In this example, an ANS called "ANSmidea" has been created to run on host machine "midea" at port "6677." Because "Use Backup" has been selected, we will need to specify a backup directory. (See below under "Log" Section.)


    2. The "Database" Section consists of the following optional fields. You must be running a version of Mini SQL Database on your network.

      Host The host on which your Mini SQL database is running.
      Port The port number the Mini SQL database will use to connect to your ANS

      To use a Mini SQL Database to store agent names, make sure you have selected "Use Database" in the ANS Section above. Please note that the Database Section is buggy.

      ANS screenshot


    3. The "External Servers" Section consists of the following optional fields:

      File The available options for creating, locating, and/or editing your ANSlistFile.
      Name The full path where your ANSlistFile is located
      Edit The window for writing or revising your ANSlistFile.

      To make use of Agent Name Servers on other host machines, make sure you have selected "Use Externals" in the ANS Section above. Create a file called "ANSlistFile" that contains the names, hosts, and port numbers of the Agent Name Servers that can be consulted to resolve agent locations. An ANSlistFile takes the following form:

      <ANSname> <ANShost> <ANSport>

      In the example below, two external Agent Name Servers, one on host "Juno" and one on host "Sophocles," have been designated in the ANSlistfile of user "szdenek":

      ANSGUI screenshot

      When launched, our ANS on host midea will consult these external Agent Name Servers to resolve agent locations. An ANSlistFile can contain any number of external Agent Name Servers. Because the Matchmaker also uses an ANSlistFile to locate Agent Name Servers, it is a good idea to create your own ANSlistFile if you haven't already.


    4. The "Log" Section consists of the following optional fields:

      File The available options for locating a log or backup file
      Name The full path where your log is located

      In the following example, the default settings are used.

      ANSGUI screenshot


  6. Press "launch agent name server." After a few seconds, the window should disappear. Now you are ready to test your ANS.

Next Page: ANS for Windows
Previous Page: Starting ANS at the Command Prompt


Copyright 1999 © Software Agents Group
Send questions and comments to:
Pleiades
<pleiades@cs.cmu.edu>
Software Agents Group
Internal Site
Robotics Institute