Skip to content

Dynamic federations (endpoints different for each query) #6

@tfrancart

Description

@tfrancart

Hello

I am in a situation where the endpoints participating in a federation are selected at runtime by the user before issuing a query.
This means that I need to create a different federation each time for each query; however FederationManager is a singleton and throws an Exception when I try to create a second federation when one was first created.
Even if I shutdown() the FederationManager after each query, this means only one FederationManager can exists at a given time, and this would block concurrent queries on my application.

I think I need to use FederationManager removeAll / addAll to update the list of endpoints for each query while keeping the same FederationManager instance. Correct ?
Do I need to recreate a new Repository object from the updated FederationManager ? how ? or should I keep the same Repository object and only update the FederationManager ?
Sample pseudo-code on how to deal with this situation would be very welcome !

Thanks a lot

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions