Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 441 forks source link

Allow Traditional WebJobs to run as Azure Functions #1379

Open JSkimming opened 7 years ago

JSkimming commented 7 years ago

Will you be providing the ability to run traditional WebJobs as Azure Functions, for instance Queue/Blob/EventHub triggered events?

Or, as what may be more likely given a recent blog post, will I be able to publish a class library that allows all the same extensibility as through the WebJobs SDK.

Where I'm coming from is this. I like the flexibility of Web Jobs (e.g. to extend the logging to a different logging framework), but I also like the Consumption Plan pricing model of Functions.

I appreciate there will have to be some limitations, for instance continuously running jobs would not work with the Consumption Plan, but some of the extensibility points may still be a possibility.

lindydonna commented 7 years ago

@JSkimming We're moving in this direction with some feature improvements we're doing for the Functions Visual Studio tooling. There are some features that aren't yet supported in Functions (e.g., the Singleton attribute), but most use cases will apply.

JSkimming commented 7 years ago

@lindydonna thanks for reply, I wasn't sure whether this was the correct place to put my question.

I'm interested in keeping up to date with the current features and future roadmap of functions and WebJobs. Is the Azure App Service Team Blog the best place to look?

lindydonna commented 7 years ago

@JSkimming Yes, and you can also follow the Twitter account @AzureFunctions.

MikeStall commented 7 years ago

"will I be able to publish a class library that allows all the same extensibility as through the WebJobs SDK." @JSkimming - yes, with some minor caveats.

JSkimming commented 7 years ago

@MikeStall I've been using the VS tooling as descrbed by @lindydonna to develop an Azure Functions class library.

I've been digging into how the WebJobs extensions are available and whether I could use my own extension in Azure Functions.

From what I can tell, the Azure Functions runtime is hard coded to add known extensions. Is there a current or planned extensibility point where I can register a third party extension. Alternatively, are you amenable to to pull requests to add extensions to the "known extension assemblies"?

MikeStall commented 7 years ago

@JSkimming - we have a preview of a new mechanism for dynamically loading new user extensions. Currently, it's just an appsetting pointing to some dlls. See https://github.com/Azure/WebJobsExtensionSamples for sample and docs. Proceed with caution - it's preview and we still have a a few assembly loading bugs to work out (https://github.com/Azure/azure-webjobs-sdk-script/labels/feature%3Abyob )

JSkimming commented 7 years ago

@MikeStall - Thanks for the pointers, I'll be taking a look.

Regarding assembly loading bugs, I've previously implemented something similar, which I liflted from the Glimpse project.

There's also other gotchas, for which @haacked previously blogged about.

Feel free to ignore, just thought I'd share 😃