Azure / Azure/azure-functions-java-worker

Should Java worker load cx code at worker start up?

Offen
#635 0 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @kamperiadis Auf GitHub ansehen
area:java-functions Enhancement reviewed
Vorherrschende Sprache
Java
Sterne
103
Forks
74
Ø Merge
4 T. 8 Std.
Gemergte PRs (30 T.)
2

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.