fglaeser / Quartz.Extensions.DependencyInjection

Helper to register Quartz Scheduler and Jobs into the .NET Core dependency injection container.
MIT License
10 stars 1 forks source link

Making this part of official Quartz #5

Closed lahma closed 4 years ago

lahma commented 4 years ago

I'm reaching out to ask whether you would be willing to contribute some of your work and the NuGet package id to official Quartz project?

I'd like to have maintained release part of the Quartz repository and organization. I found out about this project at a very late stage as I've already used the same package id for the work I've done to create an official support for registering Quartz infrastructure to MS DI. This was a big oversight on my part.

I understand that there's a lot of effort done already and we might have chosen a bit different approaches. Using Quartz prefix for a package somewhat implies being part of the organization, though no such official rules exist. These extension packages of course exists because of shortcomings of the main Quartz.NET project.

I've gone through this with https://github.com/zlzforever/Quartz.AspNetCore (the package id is now shared) and hopefully I've built something on top that that will bring same benefits under the Quartz.NET organization umbrella.

It would be great if you had time to review the approach I've taken with the integration and give feedback and share your thoughts on this matter.

lahma commented 4 years ago

Here's also an example of the integration being used as part of ASP.NET Core application.

fglaeser commented 4 years ago

Hi, I Don't have problem to contribute. Tell me, what do you need from me?

lahma commented 4 years ago

Thank you for getting back. First and foremost I'd like to find a solution that makes you happy.

If you want to keep your version as-is, I'd kindly ask you to use a different package id like with a prefix Quartz.Contrib. Then if you so see, I could use the current id for upcoming support.

If you have time and desire to help out. We could refine the integration I've done so far and features like appsettings.json support, maybe SQLite integration. In this scenario you will be fully credited for the integration in NuGet package details and source code.

You've done great job with integration and I'd be more than happy to hear your ideas.

What are your thoughts and desires?

fglaeser commented 4 years ago

It will be great if we can have the 'appsettings' integration because it is something the we are currently using. As you could see the approach is very minimalist, because most of the time we only need to define the job name and some cron schedule. Please let me know yout thought about it, I'm open to alternatives, but being able to change the cron schedule to one specific Job from some external configuration is something that We need.

The other thing that we need is the 'inline job registration' but I think this feature is fully cover by your current implementacion.

lahma commented 4 years ago

I've given this some thought and the JSON integration seems a bit problematic to me. To make it powerful it would need to pretty much do the same thing as current XML configuration. With XML configuration you already have external file that can be polled for changes, supports jobs and triggers (N triggers for single job) and has well-defined schema which can be validated in editors.

lahma commented 4 years ago

I've updated the sample and some configuration logic here: https://github.com/quartznet/quartznet/tree/refine-configuration/src/Quartz.Examples.AspNetCore to show XML version. Relevant bits:

https://github.com/quartznet/quartznet/blob/aa7551ae9cb7c494d95bcbd1970402bcc55fca13/src/Quartz.Examples.AspNetCore/Startup.cs#L98-L105

XML

https://github.com/quartznet/quartznet/blob/refine-configuration/src/Quartz.Examples.AspNetCore/quartz_jobs.config

What are your thoughts on this? Is the JSON only option or could XML which is well supported and battle-tested work?

fglaeser commented 4 years ago

Checking in detail, I think that the only thing we need in the appsettings is the cron schedule value, so, for us is ok.

lahma commented 4 years ago

So how should we proceed. Do you feel comfortable with adding me as shared owner of the current NuGet package on nuget.org? This would mean I could push a new 3.x package there and it would be backwards incompatible with the old one. You could always push your alternative version as something like Quartz.Contrib.Extensions.DependencyInjection.

fglaeser commented 4 years ago

Done!

lahma commented 4 years ago

Thank you, got the ownership request and accepted! I've added you now as co-author as promised https://github.com/quartznet/quartznet/commit/59a6ee755fec9db5ce0422c8ec971b13839bbd2a and I'm trying to create a beta 1 release and publish to NuGet.

lahma commented 4 years ago

And it's live on NuGet! Great thank you for your understanding and allowing me to use your package id. I would be very happy to get feedback from you (and PRs too) to make this bundled version better.

I'll be working on documentation mostly in the near future as I believe the code is nearing production quality.

Thank you again.