Discussion:
[jade-develop] Restarting windows vs unplugging ethernet?
Lavindra de Silva
2014-10-01 14:58:32 UTC
Permalink
Hi all,

We are experiencing some odd (?) behaviour where we start Jade with the GUI
option on PC1 (which as expected starts the GUI and shows the 3 default
agents inside a container), and we then start a Jade agent A on a different
machine PC2 that is on the same network, which registers A successfully
with Jade running on PC1. So agent A is shown inside a new container on the
Jade GUI running on PC1. Both machines are running windows.

Now if we suddenly restart the Windows *operating system* on PC2 (via
Start->Shutdown->Restart), agent A (which was on PC2) and its container are
successfully removed from the Jade GUI on PC1 within a couple of seconds.
There are also some messages on PC1's Jade commandline saying there was an
error sending/receiving a PING to PC2's IP address.

However, if instead we suddenly unplug the ethernet cable of PC2 (instead
of restarting Windows on PC2 as above), we don't get the same
behaviour---agent A is not removed from the GUI on PC1. We tested it a few
times and left it for 5 minutes but the GUI on PC1 always showed agent A
even with PC2 having no ethernet connection to the network. There were no
error messages on PC1's Jade commandline either.

My question is: why is unplugging the ethernet cable different to
restarting Windows? And is there some setting in Jade to force PC1's
Jade-GUI to remove agent A when the agent has been inactive for a certain
period of time?

Thanks,
Lavindra de Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20141001/a1512581/attachment.html>
Caire Giovanni
2014-10-03 07:46:24 UTC
Permalink
Hi,

The JADE Main Container (that on PC1 in your case) monitors peripheral containers to remove them in case they suddenly die.
By default Jade uses a simple mechanism based on a blocking call to the remote container. This has the advantage of immediately detecting a sudden termination of the remote peripheral container and does not require any particular tuning. However, as you experienced, it does not deal properly with network disconnections.
For environments where network disconnections must be taken into account (and in general for real-world Jade-based systems) we recommend to configure Jade to use the UDP-Monitoring Service. When this service is active, monitoring of peripheral containers occurs by means of periodic UDP packets exchanged between the Main Container and the peripheral containers. UDP Monitoring is more complex and may require some tuning, but guarantees that sudden terminations of peripheral containers are always detected.
To start the UDP monitoring service you need to specify the –services option on all containers (both main and peripherals) as exemplified below

java -cp classes jade.Boot -gui -services jade.core.event.NotificationService;jade.core.mobility.AgentMobilityService;jade.core.nodeMonitoring.UDPNodeMonitoringService

More details on the –services option can be found in the JADE Administrator’s guide and on the book Developing Multi Agent Systems with JADE.

Bye,

Giovanni


Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Lavindra de Silva
Inviato: mercoledì 1 ottobre 2014 16:59
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] Restarting windows vs unplugging ethernet?

Hi all,

We are experiencing some odd (?) behaviour where we start Jade with the GUI option on PC1 (which as expected starts the GUI and shows the 3 default agents inside a container), and we then start a Jade agent A on a different machine PC2 that is on the same network, which registers A successfully with Jade running on PC1. So agent A is shown inside a new container on the Jade GUI running on PC1. Both machines are running windows.

Now if we suddenly restart the Windows *operating system* on PC2 (via Start->Shutdown->Restart), agent A (which was on PC2) and its container are successfully removed from the Jade GUI on PC1 within a couple of seconds. There are also some messages on PC1's Jade commandline saying there was an error sending/receiving a PING to PC2's IP address.

However, if instead we suddenly unplug the ethernet cable of PC2 (instead of restarting Windows on PC2 as above), we don't get the same behaviour---agent A is not removed from the GUI on PC1. We tested it a few times and left it for 5 minutes but the GUI on PC1 always showed agent A even with PC2 having no ethernet connection to the network. There were no error messages on PC1's Jade commandline either.

My question is: why is unplugging the ethernet cable different to restarting Windows? And is there some setting in Jade to force PC1's Jade-GUI to remove agent A when the agent has been inactive for a certain period of time?

Thanks,
Lavindra de Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20141003/75a4958f/attachment.html>
Continue reading on narkive:
Loading...