Allow a Processing Strategy to be injected and configured via new startup extension methods#180
Allow a Processing Strategy to be injected and configured via new startup extension methods#180cristipufu merged 2 commits intostefanprodan:masterfrom rangerlabs:master
Conversation
…ort differing processing strategies
|
Hi @nick-cromwell, great stuff. As this is such a major change, I would like to roll it out incrementally and split this PR into multiple PRs and maybe even multiple projects & NuGet packages (eg: AspNetCoreRateLimit.Redis - to avoid unwanted dependencies). So I think that these should be the steps moving forward:
Thanks for your contribution! |
|
That sounds like a good plan, give me a few days I'll get those out. |
…rategy; remove StackExchange code and references
|
@cristipufu Happy new year. This ready to be merged whenever you're available and I have tested the Redis Lua script processor in a separate branch. I'll open a PR for that once we've bumped the major version. |
|
Injecting the processing strategy is a much cleaner approach than the one used in my fork, and fits the overall design of this library far better. I prefer this over my own work, and will update/redirect my fork when this is merged. Thank you @nick-cromwell for taking the time to integrate this, and thank you @cristipufu for the library in the first place! |
|
@cristipufu Can we version bump and merge this in the near future. The concurrency issue is still receiving a fair amount of attention. #83 |
|
@nick-cromwell many thanks for your contribution! Feel free to add the I renamed the startup extensions & added a new one with a generic parameter to easily change the processing strategy. Thanks! cc: @stefanprodan can you please add @nick-cromwell as a contributor to this project? |
|
Project was added in PR #210. Happy to help! |
Fixes #83
This is a WIP and still needs supporting tests, but wanted to open this for discussion.
This takes after the work of @simonhaines in his atomic-lua branch and adds a ProcessingStrategy for AsyncKeyLocker and also StackExchangeRedis allowing both to function while being mostly backwards compatible. The one exception is the need to register the IProcessingStrategyFactory with the ServiceProvider - which has been simplified with the new extension methods. The IProcessingStrategyFactory isn't perfect, but it avoids the need for more complicated injection strategies or container like Autofac.
This would require a major version bump.