Skip to content

Untie prefix from Broker communication paths #2108

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Saartank
Copy link
Contributor

This PR refactors the code so that all communication paths rely solely on the origin identifier (hostname + port) and no longer depend on the prefixes exported by the origin.

This goroutine listens for requests from xrdcl-pelican,
which are sent when xrdcl-pelican wants to connect to
the origin through the broker.
Originally, the Broker code assumed a one-to-one
correspondence between origin and exported prefix.
Communication paths were identified using both the
origin hostname and the exported prefix.

This commit refactors the code so that all
communication paths rely solely on the origin
identifier (hostname + port), removing dependency
on the exported prefix.
Modified the Broker test to include recent updates.
This includes passing the full origin identifier
(URL plus port) to identify the communication channel
and decoupling from exported prefixes.

To support this, I implemented a custom getFreePort()
function in the test to obtain an available port beforehand,
which was necessary for registering the origin.

Also, I included the Registry module in InitServer, which was
necessary to ensure the registry URL is populated during the
federation discovery flow.
@Saartank Saartank added this to the v7.15 milestone Mar 18, 2025
@Saartank Saartank added bug Something isn't working broker labels Mar 18, 2025
@Saartank Saartank requested a review from bbockelm March 18, 2025 17:15
@turetske turetske modified the milestones: v7.15, v7.16 Mar 21, 2025
@jhiemstrawisc jhiemstrawisc modified the milestones: v7.16, v7.17 Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broker bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The broker breaks with Origin.Exports and only works with Origin.FederationPrefix
4 participants