Fwd: Question about pending messages and crash recovery

Todd Wright twright at bbn.com
Wed Apr 4 11:40:58 EDT 2007


The following question was posted to the cougaar.org forum:

ning zhang (wy1238) wrote:
> Hi,
> I consult a question about cougaar 12.0 .
> How to let MTS insure a message be sended for certain? For example,
> there are two node need communication . The node of "A" want send a
> message to the node "B" ,the flow is :
> 1> "B" be killed .
> 2> "A" publish message to blackboard .(have RMIException)
> 3> "A" be killed .
> 4> "B" reboot.
> 5> "A" reboot.
> Then I find ,the message not be sended .( Before 3,the message already
> persist into file . after 5,another manual message can be sended and
> received. )

If you enable agent persistence and agent "A" saves its state between 
steps 2 and 3, then when "A" reboots it will send the message again. 
However, Cougaar agents only save their state every couple minutes, so 
there's no guarantee that agent "A" will save it state in between steps 
2 and 3.  This is "lazy persistence", as described in:
   http://cougaar.org/docman/view.php/7/200/oc04-rob.pdf

As described in the above paper, most Cougaar applications would not 
want the message from "A" to "B" to be sent if both agents crash.

In your case, if you want "A" to resent the message when it reboots, 
you'd need to save the fact that agent "A" sent the message.  This fact 
could be saved to a local file or database.

Todd



More information about the Cougaar-developers mailing list