Documentation for transient federates. - #347
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new documentation page describing “transient federates” (federates that can join/leave a running federation) and links/integrates that content into existing federation, termination, polyglot, glossary, and target-reference docs.
Changes:
- Add a new “Transient Federates” guide page and include runnable C/Python example programs.
- Cross-link transient-federate behavior from distributed execution, termination, polyglot docs, and target-language reference.
- Add glossary entries and a sidebar entry so the new page is discoverable.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/writing-reactors/transient-federates.mdx | New documentation page describing transient federates, joining/leaving, hot swap, and limitations. |
| docs/writing-reactors/termination.mdx | Adds a note clarifying how to stop only the calling federate (for transient federate departure). |
| docs/writing-reactors/polyglot.mdx | Notes that transient federates are supported for Polyglot due to C/Python support. |
| docs/writing-reactors/distributed-execution.mdx | Adds a brief pointer from coordinated start to transient federates. |
| docs/sidebars.ts | Adds the new doc page to the “writing-reactors” sidebar. |
| docs/reference/target-language-details.mdx | Documents effective start-tag API and “stop only this federate” APIs for C/Python. |
| docs/glossary/glossary.mdx | Adds glossary definitions for federate/federation/persistent/transient federates. |
| docs/assets/code/py/src/TransientFederates.lf | Adds Python example program used by the new documentation page. |
| docs/assets/code/c/src/TransientFederates.lf | Adds C example program used by the new documentation page. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (3)
docs/reference/target-language-details.mdx:2979
LF_FED_PACKAGE_DIRECTORYis generated only for federated C programs, but this bullet is under “Libraries Available in All Programs.” Qualify it as federated-only so non-federated users are not led to reference an undefined macro.
- LF_FED_PACKAGE_DIRECTORY: A string giving the full path to the directory that is the root of the federate package (normally, the directory above the `src` directory appended with `fed-gen/name`, where `name` is the name of the federation).
docs/writing-reactors/transient-federates.mdx:185
- The RTI does not run the replacement binary; the operator launches that process, and the RTI accepts its connection. The current wording incorrectly places arbitrary-code execution inside the RTI’s process/trust boundary.
A hot-swapped binary is still arbitrary code that the RTI will run as that federate. Treat the ability to launch a replacement the same way you treat the ability to start the federation: restrict who can obtain the federation ID, credentials, and host access.
docs/writing-reactors/transient-federates.mdx:52
- Remove the duplicated space between “three” and “federates.”
The following program, adapted from the Lingua Franca regression tests, has three federates. `Up` sends integers every two seconds. `Middle` is transient: it forwards those integers to `Down` and, after four inputs, leaves the federation. `Down` has its own timer, so it keeps executing whether `Middle` is present or not.
|
I'm going ahead and merging this to get the release out. |
This PR adds documentation for transient federates.