SMAS 2.0bA Primer |
9. Timeout
Timeout features were introduced by version 1.4.
The designer can associate timeout counters to any message requiring an answer. If the answer does not come back before the timeout date, then the message is reemitted n times, n being set by the designer. If still there is no answer after the last timeout, then a timeout error message is generated.
When an answer comes back associated with a timeout message, then the timeout counter must be killed. When an agent receives a second message for a task in progress (not finished) it ignores it.
Each agent is given a new input tray, called delayed-input-tray which will contain messages ordered by increasing dates. A timeout watchdog message will contain the wake-up time, the version number, the maximum allowed version number, the original message.
The scheduler is modified to examine the delayed-input-tray after it has executed the input-tray messages. The reason for that ordering is that the answer to a message with a timeout could be in the input-tray.
If an answer to a message comes back before the timeout is reached, then the scheduler must remove the timeout message from the delayed-input-tray.
Reemission extends the timeout delay, meaning that if we have reemitted a request three times and the answer to the first message suddenly appears, we are happy and consider the returned answer.
maximum number of reemissions
Copyrignt Jean-Paul Barthès@UTC, 1998 Last update, Jan 99