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

[Meta] [FEATURE] Add getActions support for AD #80

Closed
3 tasks done
owaiskazi19 opened this issue Aug 5, 2022 · 3 comments
Closed
3 tasks done

[Meta] [FEATURE] Add getActions support for AD #80

owaiskazi19 opened this issue Aug 5, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request Meta

Comments

@owaiskazi19
Copy link
Member

owaiskazi19 commented Aug 5, 2022

Is your feature request related to a problem?

As we are building extension support for AD, we need to add support for getActions.

getActions enables plugins to register custom transport actions.
With extensions, SDK should be able to support registering transport actions and proxy them to the extension when a transport action is invoked.

@dbwiddis
Copy link
Member

Hey @owaiskazi19 I think there may be some overlap between this and the approach I'm taking on #69. Can you clarify whether that's somewhat the same thing or if not, how this differs from what I'm doing there?

@saratvemulapalli
Copy link
Member

saratvemulapalli commented Aug 26, 2022

Taking a stab at this.
getActions is an interface to enable plugins to define custom transportActions[1].

For extensions, we should enable them to create custom transport actions.
Here is the workflow which could solve this problem:

  1. As @dbwiddis added support for Rest APIs in [FEATURE] [META] Register RestHandlers in OpenSearch #64, Extension would use a similar API to register transportActions.
  2. ExtensionsOrchestrator will register the list of actions with one MainProxyAction[2] and register it with every extension.
  3. ExtensionsOrchestrator will respond with Ack to the extension.
  4. When a transport request comes along,ExtensionOrchestrator will look up the registry and make a transport action call to the node which will eventually end up on ExtensionsOrchestrator as it registers MainProxyAction.
  5. ExtensionsOrchestrator will make a transport API call to the extension to process the request.
  6. After the response comes back, ExtensionsOrchestrator will translate the response and send it back to the extension which made the request.

I would like to split up this issue into 3 pieces:

  • ExtensionsOrchestrator to handle register Transport Actions.
    SDK to make a request to OpenSearch, register actions.
  • Transport request landing up on ExtensionsOrchestrator will proxy the request to SDK
    SDK to understand the transport action request and respond.
  • Dynamically register transport actions in ActionModule

[1] https://github.com/opensearch-project/OpenSearch/blob/1bfabed0780c228f4f3c9a26aac2169e361c9426/server/src/main/java/org/opensearch/plugins/ActionPlugin.java#L82
[2] https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/action/ActionModule.java#L509

@saratvemulapalli saratvemulapalli changed the title [FEATURE] Add getActions support for AD [Meta] [FEATURE] Add getActions support for AD Aug 26, 2022
@saratvemulapalli
Copy link
Member

Removed #107 out of the meta issue as registering dynamic actions was not really needed as proxy actions added support for whats needed for setting up Anomaly Detection Plugin as an extension.
We'll revive the PR after create detector .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Meta
Projects
None yet
Development

No branches or pull requests

3 participants