background_tasks package implementation
Key Points
- New package for background task scheduling to preserve resources
- A simple scheduler to run all background processes needed by the DMS in such a way that minimal compute resources are used by the DMS at any time. These background processes include DHT updates, pings between machines for health check and resuming stopped processes such as file transfers. The main goal is to prioritize the tasks and not let the golang scheduler run them at the same time even if the resource is available. All code in the DMS, not matter in which package will need to register their tasks with background_tasks package along with the priority of task and the event that triggers it.
Work Package Deliverables
No | Deliverable | Proof |
---|---|---|
1 | all functionalities implemented and specified | tests pass |
2 | tests included into test management pipeline | failing/not implemented tests visible in test management portal |
Timeline
As tracked by work package dependencies
Additional notes and context
- this package will be implemented along other packages; things that will need to be done via background tasks will be implemented here; therefore, this packaged does not have a separate design phase; however, the all implemented functionalities will have to be specified following specification and documentation process, relating these functionalities to other packages as needed.
- background_tasks: background tasks scheduling and execution, other packages that have their own background tasks register through this package
- Registration
- The task itself, the arguments it needs
- priority
- event (time period or other event to trigger task)
- Start , Stop, Resume
- Algorithm that accounts for the event and priority of the task (not yet clear)
- Monitor resource usage of tasks (not yet clear)
- Registration
Edited by kabir