Some way in which a Task implementation may be wrapped in a 'moderated' annotation that, when applied, can control the frequency at which this Task may run using rules.
Examples of when one would need to moderate a Task include:
Rate limiting/Throttling
A given Task may only be invoked n times within a given time period.
Could explicitly throw a 'moderation error' (similar to HTTP rate limiting.)
Could be silently queued (similar to _.throttle, for example.)
Concurrency control
Only n processes running a given Task may run at once
Additional processes are silently queued
or subscribe to the outcome of the already-running Task (a Singleton of sorts.)
We could also match these rules based on other interesting criteria (or combinations thereof)
This is explicitly a job queue concern. If anything, the work to do here WRT mgFx would be to allow tasks to have structured metadata attached that can be passed to i.e. the scheduler.
Some way in which a Task implementation may be wrapped in a 'moderated' annotation that, when applied, can control the frequency at which this Task may run using rules.
Examples of when one would need to moderate a Task include:
Rate limiting/Throttling
_.throttle
, for example.)Concurrency control
We could also match these rules based on other interesting criteria (or combinations thereof)