[jade-develop] Transporting an agent to another host..

Langley, Brent brent.langley at cta.com
Thu Sep 30 16:27:30 CEST 2004


I'll walk you through a couple of examples....

In your jade distribution, look in the doc subdirectory for the
"administratorsguide.pdf". 
On page 4 it starts with basic instructions for starting JADE, and then
immediately follows with details about the command line options.

Test 1: On one machine:

Open two command prompt windows.

In one command window type: (assuming the CLASSPATH variable has been
set to include the JADE jar files)

java jade.boot -gui -agents dum1:jade.tools.DummyAgent.DummyAgent

In the other command window type:

java jade.boot -container -agents dum2:jade.tools.DummyAgent.DummyAgent


You should see the RMA agent display after the first command, and be
able to drill-down into the platform info and see your existing agents,
including one called "dum1".  After you type the second command (in a
second windows) you will see the default name of "Container-1" added to
the existing platform, and an agent named "dum2" within that container.
You can use the RMA to migrate these agents back and forth between the
two containers "Main-Container"  and "Container-1".

To expand this test, experiment with some of the command line options
listed on page 5 and described in the pages following, of the
Administrators Guide. For example, the second command might be given as:

Java jade.Boot -container -container-name client -agents
dum2:jade.tools.DummyAgent.DummyAgent

Will let you specify your own special name for the container.


Now... On different machines.

First, can you resolve the other machine's name? or must you use its IP
address?
Second, can you ping the other machine? (using the name or IP address
that works above)
If not, check your /etc/hosts file (or
\windows\system32\drivers\etc\hosts)
In the example below I'll use "store" as the name of the one machine and
"customer" as the other.

If still not, turn off (temporarily) any Firewall software that might be
blocking access (like the Windows Firewall service that is automatically
enabled when you install the XP service pack)

Then on the shopping-service providing system type:
Java jade.Boot -gui -host store -agents
dum1:jade.tools.DummyAgent.DummyAgent

And on the other system type:
Java jade.Boot -container -container-name client -local-host customer
-host store -agents dum2:jade.tools.DummyAgent.DummyAgent

The -local-host option is the name of the system the new container
("client") is running on.
The -host option is the name (or ip address) of the system that the
Main-Container is running on.


With my config of XP/SP-2 I had to right click on the network icon in
the tray in the bottom right of the screen, and select "change firewall
settings".  From the pop-up I selected to disable the firewall.  I had
some strange errors, but then I made sure that I had downloaded the
latest snapshot from the jade web site to both systems, and re-built the
jars (so I was sure all versions were the same.)  Doing the above two
commands on two systems on the same LAN joined the two systems into one
agent platform, and I was able to migrate agents (dum1 and dum2) back
and forth across the network, and watch their GUI's pop up on the other
system as they moved.

...Brent

-----Original Message-----
From: Kristian Bisgaard Lassen [mailto:krell at daimi.au.dk] 
Sent: Thursday, September 30, 2004 9:19 AM
To: Langley, Brent; jade-develop at avalon.cselt.it
Subject: Re: [jade-develop] Transporting an agent to another host..

Hi Brent,

>Don't misinterpret hosts vs platforms....
>  
>
I don't. I am aware of the difference.

>Agents can move (take advantage of mobility) within the same platform.
>As stated before, a platform can span multiple host systems.  Agents
>cannot (currently) move out of one platform and onto another.  (The
>question of "when will the 'mobility across platforms' feature be
>available" occurs frequently with the answer typically being someday
>soon.... They have bigger fish to fry on their current agenda.)
>  
>
That was what I really wanted to know.

>Attack your problem in steps:
>1) Start a platform with its main container on system A.
>Start your agents on this system and make sure they interact as you
>expect.
>
>2) Start a platform with its main container on system A.
>Now start a second container (second command promopt, second JVM
>instance) on the same machine.
>Start your agents and make sure they can interact, and use the RMA to
>move them from one container to another.  Ensure they still function
>correctly when existing on separate containers.
>
>3) Start a platform with its main container on system A and start a
>second container on a second machine.  If your ultimate goal is to get
>this to function over a firewall, skip that step for now and get two
>machines sitting next to each other on the same network to function and
>connect.  Test your agents.
>
>4) Now try (if required) your systems separated by a firewall.
>
>
>If you are using separate hosts (step 2,3,4), the applications need to
>be able to "find" each other.  Make sure they can resolve each other's
>names and reach each other's IP addresses.  If you are crossing a
>firewall, the external system will be talking to the outside of the
>firewall since you (typically) don't make internal addresses visible
>across the firewall.  Make sure your platform and container startup
>options correctly indicate a resolvable, reachable, unblocked address
>and port.
>  
>
Maybe I have misunderstood you anwer, but I do not see how you make an 
agent platform span across several machines. I can do step 1 and 2, but 
not 3. Can you elaborate on how you create a container on another system

that is in the same platform as system A.

>Hopefully these tips give you some things to look at to narrow down
your
>problem.
>  
>
I did a bit. Thanks for your posting. It was very informative.

Best regards,
    Kristian Bisgaard Lassen

>-----Original Message-----
>From: jade-develop-bounces at avalon.cselt.it
>[mailto:jade-develop-bounces at avalon.cselt.it] On Behalf Of Kristian
>Bisgaard Lassen
>Sent: Thursday, September 30, 2004 2:19 AM
>To: jade-develop at avalon.cselt.it
>Subject: Re: [jade-develop] Transporting an agent to another host..
>
>Hi Eduardo,
>
>  
>
>>We are developing an Multi-Agents System using JADE nut we are having
>>problems when we try to move an agente to another host over the
>>network. Does anyone has any code, application, document that explains
>>that functionality better?
>> 
>>
>>    
>>
>I have struggled with that problem resently in a project. I still do
not
>
>know if the latest version of JADE support agents transfer from host to

>host. It seems as if a move operation strips the adress part of a
>Location.
>
>However, it has not been possible to move agents between hosts in some 
>point in time. Here is a page telling how mobility can be done in JADE
>
>   http://www.iro.umontreal.ca/~vaucher/Agents/Jade/Mobility.html
>
>Notice that he says that "However, the current version of JADE supports

>only intra-platform mobility, that is, an agent can move only within
the
>
>same platform from container to container.".
>
>This may not be much help to you, but still it is better than nothing. 
>If you or anyone else figure out a way to move agents between hosts let

>me know.
>
>Best regards,
>   Kristian Bisgaard Lassen
>_______________________________________________
>jade-develop mailing list
>jade-develop at avalon.cselt.it
>https://avalon.cselt.it/mailman/listinfo/jade-develop
>UNSUBSCRIBE INSTRUCTIONS AT 
>http://jade.tilab.com/community-mailinglist.htm
>
>
>  
>





More information about the jade-develop mailing list