Azure / Azure/azure-functions-java-worker

Should Java worker load cx code at worker start up?

Ouverte
#635 0 commentaires 0 réactions 1 personne assignée Assignée à @kamperiadis Voir sur GitHub
area:java-functions Enhancement reviewed
Langage dominant
Java
Étoiles
103
Forks
74
Merge moyen
4 j 8 h
PR mergées (30 j)
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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.