Skip to content

registry: support overlapping generations in session/ namespaces - #459

Open
snps-fricke wants to merge 25 commits into
mainfrom
dev/registry_generations
Open

snps-fricke wants to merge 25 commits into
mainfrom
dev/registry_generations

Conversation

@snps-fricke

@snps-fricke snps-fricke commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

When restarting a simulation, participants from the previous run may still be connected. Because the registry rejects duplicate participant names within a namespace, a replacement run that reuses those names has to wait for the old participants to disconnect or use a different registry URI.

Registry sessions let a replacement run start on the same registry URI while the previous run is still connected.
For example, silkit://localhost:8500/session/example opts in. The registry scopes peer discovery and routing to the assigned generation, so participant names can repeat across generations. Other namespaces still reject duplicate participant names.
Both the participant and the registry must support the registry-sessions capability. Otherwise, a session join fails.

Generation placement

  • Only the newest generation can admit participants. Opening a replacement seals the previous generation without disconnecting existing participants.
  • Before the first workflow, roles are unknown. A duplicate name in the newest generation opens a replacement.
  • The first accepted workflow establishes the controller name and the set of required participants for the session until it empties. A later workflow from a different controller or with a different set of required participants is logged as an error. It does not affect placement or state tracking, but still emits a registry event.
  • Once roles are known, a required participant joins the newest generation if its name is free and the generation has not started; otherwise it opens a replacement. The same applies to the controller until the workflow for that generation is accepted; afterwards, a rejoining controller always opens a replacement.
  • Other participants can join the newest generation even after it starts. Duplicate names are rejected rather than opening a replacement.
  • Placement does not use launch IDs: two interleaved launches can be split across generations.
  • A generation is removed when its last participant disconnects. Numbering resets when the entire session empties.

Observability

  • The internal IRegistryEventListener reports generation creation, aggregate system-state changes, and removal. Participant connect, disconnect, status, and workflow events carry the assigned generation.
  • The standalone registry-listener prototype emits these events as NDJSON.

Local acceptor endpoints

  • Default participant local-domain sockets use per-instance paths so overlapping runs don’t replace each other’s sockets.
  • Participants joining sessions warn when configured with fixed TCP ports or explicit local socket paths, which can conflict across overlapping instances.

Developer checklist (address before review)

  • Changelog.md updated
  • Prepared update for depending repositories
  • Documentation updated (public API changes only)
  • API docstrings updated (public API changes only)
  • Rebase → commit history clean
  • Squash and merge → proper PR title

Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
- map peer to (name, generation) in registry

Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
- autonomous participants get admitted to the newest live generation
  that they are not part of; otherwise, they spawn a new generation

Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
- randomize default socket paths
- retry collisions without unlinking existing sockets
- document endpoint reuse

Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
@snps-fricke snps-fricke changed the title Dev/registry generations registry: support overlapping generations in session/ namespaces Nov 24, 2026
@snps-fricke snps-fricke self-assigned this Nov 24, 2026
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
- seal older generations, never reopen them
- once workflow is known, only required participants and the system
  controller can replace an active generation. other participants can
  open one when none is active, but duplicates get the legacy rejection.

Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>
Signed-off-by: Maximilian Fricke <maximilian.fricke@synopsys.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant