Skip to content
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

core: make pull and push data flow controllers generic #3615

Closed
jimmarino opened this issue Nov 15, 2023 · 1 comment · Fixed by #3637
Closed

core: make pull and push data flow controllers generic #3615

jimmarino opened this issue Nov 15, 2023 · 1 comment · Fixed by #3637
Assignees
Labels
core feature enhancement New feature or request feature_request New feature request, awaiting triage stale Open for x days with no activity

Comments

@jimmarino
Copy link
Contributor

Feature Request

Currently, ProviderPushTransferDataFlowController and ConsumerPullTransferDataFlowControllerdirectly reference HTTP transfers. The controllers should be made generic so they can serve as the default mechanism for handling interactions via the dataplane client API.

Which Areas Would Be Affected?

EDC Core.

Solution Proposal

ConsumerPullTransferDataFlowController does the following:

 public boolean canHandle(TransferProcess transferProcess) {
    return HTTP_PROXY.equals(transferProcess.getDestinationType());
 }

and ProviderPushTransferDataFlowController:

public boolean canHandle(TransferProcess transferProcess) {
   return !HTTP_PROXY.equals(transferProcess.getDestinationType());
}

To make these generic, we introduce a DataTransferMetadataRegistry:

interface DataTransferMetadataRegistry {

   register(TransferTypeDefinition definition);

   @Nullable
   String flowTypeFor(String transferType);

} 

record TransferTypeDefinition(String transferType, FlowType flowType)

enum FlowType {
   PUSH, PULL
}

Each transfer type (e.g. HTTP_PROXY) will be registered with the metadata registry using a TransferTypeDefinition. A transfer type for HTTP push will also need to be defined.

The push and pull controllers will be registered as priority 0 and use the DataTransferTypeRegistry to determine if they can handle a transfer process by looking up the FlowType. Since the controllers will be registered with the lowest priority, they will only be engaged if no other controllers are registered.

@jimmarino jimmarino added enhancement New feature or request core feature feature_request New feature request, awaiting triage labels Nov 15, 2023
Copy link

This issue is stale because it has been open for 28 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core feature enhancement New feature or request feature_request New feature request, awaiting triage stale Open for x days with no activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants