-
Notifications
You must be signed in to change notification settings - Fork 24
Next Downstream Tag (NDT) message protocol
Suppose that the Sender, which triggers at 100ms intervals, only occasionally sends an output message, say, on average, every few seconds. Currently, Sender sends LTC, ABS, and NET messages every 100 msec, even with no interesting information. In the below visualization (from @ChadliaJerad), the RTI is on the left, the Sender in the middle, and the Receiver on the right. Every message is redundant because Receiver has nothing to do with those messages (its next event tag is 2 sec, which is the timeout value). So if we can eliminate those messages, network overhead can be reduced.
A new message type, Next Downstream Tag (NDT) is proposed to resolve this inefficiency. When the RTI receives a NET
from a downstream federate, it should notify upstream federates with an NDT
message. Federates should maintain a ndt_queue
(sorted by tag) that keeps track of NDT
messages received from the RTI. Whenever an upstream federate reaches completion of a tag g
, it has to check the NDT queue and if there is no output being produced, send an LTC(g)
(and NET) *iff g >= peek(ndt_queue)
.
When the RTI receives a NET(g_d)
, it sends NDT(g_d)
to upstream federates that have not yet completed g_d
. As a further performance optimization, the RTI may decide to only send NDT
to federates that produce a lot of LTC
and NET
messages without producing output.
When an upstream federate receives an NDT(g_d)
, it should
- Push the tag
t_d
onto thendt_queue
. - If output is being produced or
g_d <= g
, sendLTC(g_d)
and properNET
so that the RTI can give a grant to downstream federates. - Pop the
ndt_queue
untilpeek(ndt_queue) > g
A federate doesn’t have to send ABS
, NET
, or LTC
at the tag g
if g < peek(ndt_queue)
. Of course, NET
and LTC
should be sent if there is any actual output.
- How do we efficiently look up which federates to send an
NDT
to? - How can we handle a federation with cyclic dependency between federates? Do we just break the cycle at the point of the sender of the
NET
in response to which anNDT
should be send?