Skip to content

decouple the function definition and function executor. #645

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

Closed
wants to merge 3 commits into from

Conversation

kaibocai
Copy link
Member

@kaibocai kaibocai commented Sep 12, 2022

Issue describing the changes in this PR

This PR mainly decoupled function definition (build at function load request processing) and function executor (build at invocation request process). It includes updates as below

  • The worker used to build function executor at FunctionLoadRequest, now updated the logic to build the executor at InvocationRequest.
  • Update the executor only depends on the execution context passed to it at every invocation request, make the execution logic more clearly.
  • Making ExecutionContextDataSource class to public, as this class is only used internal in java worker, it should cause any issue on changing it's scope to public.
  • Update ExecutionContextDataSource to use builder pattern as it has to many arguments in old constructor.
  • Adding three fields dataStore, methodBindInfo, containingClass to ExecutionContextDataSource, since decoupled the function definition and function executor, now function executor relies on ExecutionContextDataSource to get all required objects.
  • Update MethodBindInfo, ParamBindInfo from nested class to top class as they are used by other class besides their parent class.

Tried best to minimize the changes in this PR, all changes are necessary for the feature completeness.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests) -- to be done.

Additional information

Additional PR information

@kaibocai
Copy link
Member Author

Open another similar pr without break change at #652

@kaibocai kaibocai closed this Sep 19, 2022
@kaibocai kaibocai deleted the kaibocai/decouple-definithin-executor branch November 3, 2022 15:43
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