-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downstream next event tag (DNET), a new signal for more efficient centralized federated execution #349
base: main
Are you sure you want to change the base?
Conversation
…ery possible connection This is a preparation step for the DNET message calculation. This matrix enables each federate to search min_delays from upstreams as well as to downstreams. Use a matrix instead of multiple arrays to store minimum delays of every possible connection This is a preparation step for the DNET message calculation. This matrix enables each federate to search min_delays from upstreams as well as to downstreams.
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
121e21f
to
79e2fdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need more time to review this, but here is a starting point. This is looking very good so far. I have a few suggestions, some of which are just nits and you should feel free to ignore them. I will follow up with a more complete review as soon as I can.
This PR replaces #176 and #337.
Relevant discussion and issue: lf-lang/lingua-franca#1626, #264
A companion PR in lingua-franca: lf-lang/lingua-franca#2400
A companion PR in reactor-ts: lf-lang/reactor-ts#296
In this PR, the new message type, downstream next event tag (DNET), is introduced to reduce unnecessary NET signals. This signal is sent from the RTI to a federate to notify it that NET tags below some threshold are unnecessary, not needed by its downstream federates. Suppose the RTI is computing the DNET tag for a federate
A
whereA
has one downstream federateB
. The tag is computed by the minimum delay between the federates andB
's NET value. For example, if the delay fromA
toB
isNEVER
andB
's next event is scheduled at(100 ms, 0)
, the RTI can sendDNET (100 ms, 0)
toA
; ifA
sendsNET (100 ms, 0)
to the RTI, the RTI cannot sendTAG (100 ms, 0)
, and ifA
sendsNET (100 ms, 1)
, the RTI can grantTAG (100 ms, 0)
toB
.Additionally, the RTI computes a tag of a tag advance grant (TAG) signal with the earliest incoming message tag (EIMT) to prevent blocking a federate that is eligible to advance its tag. Specifically, if a federate has its next event scheduled at
(100 ms, 0)
and its EIMT, calculated by the RTI, is(200 ms, 1)
, the RTI sendsTAG (200 ms, 0)
so that the federate can execute any potential events with tags earlier than(200 ms, 1)
as well as the event at(100 ms, 0)
.This PR also contains some refactoring for the data structure used by the RTI to store delays between federates. A two-dimensional matrix stores the delays now.