Background work utilities for .NET Core apps based on Hosted services. Background work queue, shared resource access queue, background data processing conveyor.
$ dotnet add package AInq.Background
Background work utilities for .NET Core apps based on Hosted services. Originally designed for accessing API with strict request-per-second limit.
Try and Maybe from AInq.Optional to pass errors logically correct to ObservableIObservable<T> implementationIWorkSchedulerIWorkSchedulerWorkFactory and AccessFactoryAInq.Background.Helpers namespace to AInq.Background.Extensions and AInq.Background.InteractionIActivatableIStartStopppableBasic interfaces and helpers library.
IWork, IWork<TResult>, IAsyncWork, IAsyncWork<TResult>WorkFactory for creating simple work instances from delegatesIAccess<TResource>, IAccess<TResource, TResult>, IAsyncAccess<TResource>, IAsyncAccess<TResource, TResult>AccessFactory for creating simple access instances from delegatesIConveyorMachine<TData, TResult> for conveyor data processing machinesIActivatable and IThrottling for shared resources and conveyor machines with particular usage strategiesIWorkQueue and IPriorityWorkQueue for background task queueIAccessQueue<TResource> and IPriorityAccessQueue<TResource> for shared resource access queueIConveyor<TData, TResult> and IPriorityConveyor<TData, TResult> for background data processing conveyorIAccess<TResource> to IWorkQueue) if neededQueues and conveyor implementations.
WorkQueueInjection to regiter service or create for internal usageAccessQueueInjection to regiter service or create for internal usageConveyorInjection to regiter service or create for internal usageYou can extend functionality by implementing custom ITaskWrapper, ITaskManager or ITaskProcessor and combine with existing ones to create more service variants.
Work scheduler interfaces and helpers library.
IWorkScheduler for background work schedulerIAccess<TResource> to IWorkScheduler) if neededWork scheduler implementation.
WorkSchedulerInjection to regiter service or create for internal usageYou can extend functionality by implementing custom IScheduledTaskWrapper or IWorkSchedulerManager and combine with existing ones to create more service variants.
NOTE: Cronos is used for parsing Cron expressions - follow documentation for supported options. Format with seconds is supported.
NEW Batch processing extensions for IWorkQueue, IAccessQueue<TResource> and IConveyor<TData, TResult>
NEW Startup work utility for running some work before host start
Support interaction with background work queue
As for now documentation is provided in this document and by XML documentation inside packages.
These packages are in active production use, all fixes and improvements will be published after some internal testing.
If you find a bug, have a question or something else - you are friendly welcome to open an issue.
Copyright © 2020-2022 Anton Andryushchenko. AInq.Background is licensed under Apache License 2.0