Azure / Azure/azure-functions-java-worker

Should Java worker load cx code at worker start up?

Open
#635 0 comments 0 reactions 1 assignee Assigned to @kamperiadis View on GitHub
area:java-functions Enhancement reviewed
Dominant language
Java
Stars
103
Forks
74
Avg merge
4d 8h
Merged PRs (30d)
2

Description

Dotnet worker, python worker both have reference to cx code at worker start up, this brings a lot of flexibility into worker implementation and when adding new features to worker and also improve java worker performance (as load cx logics will only be executed once. Right now, this logics is executed for each function load request). Java worker should some how consider the same way.

Python worker has an [app setting (env var)](https://github.com/Azure/azure-functions-python-worker/blob/2bc45d1aaf32cbc208c6903974f1e53775f75e86/tests/endtoend/dependency_isolation_functions/report_dependencies/__init__.py#L44) point to cx script once app is deployed. We may consider the same pattern here.

Node worker is rely on `function_app_directory` which is already available WorkerInitRequest. This should be a better approach.

Updates: we can use [worker index](https://dev.azure.com/msazure/One/_git/AAPT-Antares-Docs?path=/TeamDocs/FunctionTeamDocs/Design/OOPWorkers/WorkerIndexing.md&version=GBmaster&line=1&_a=preview&anchor=specialization) feature provided by host.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.