Details
-
Task
-
Status: Draft (View Workflow)
-
P2
-
Resolution: Unresolved
-
None
-
customfield_11100 25832
-
Core: Platform
Description
Context
Following the conversations on FOLIO-1953 and the early implementation of a scheduler in Okapi there have been some reservations raised about this approach.
It could be useful to discuss those reservations and any alternative proposals (like use of the vert.x periodic API) to decide if we want to invest in those as well.
Scheduling Needs (taken from FOLIO-1953)
I believe any alternative approach needs to also fulfil the needs described to frame the current Okapi development.
Initial Requirements
- All tasks 1 are defined when a module is enabled for a tenant
- A task can be granted permissions which allow it to make requests to other modules
- Each execution of a task happens on only one module instance
- A task can be scheduled to execute at an interval chosen by the module
- Smallest execution interval can be 1 minute (no need for seconds precision, in practice this is likely to be 5 minutes or more)
These closely mimic the current scheduling implementation in RAML Module Builder. The main differences are that it is tenant aware (rather than running as soon as the module is deployed) and limited to running on only a single instance.
Possible Future Extensions
- Schedule can be more complicated than only an interval between executions
- A module can register new scheduled tasks (e.g. could register a specific task for expiry of a single request if we wanted)
- Scheduled task can be run once (or a defined number of times)
- A module can remove scheduled tasks (may need to consider ownership of tasks)
- A module can change the schedule for a task
1) I've used the term task to be consistent with other parts of this issue
TestRail: Results
Attachments
Issue Links
- relates to
-
CIRC-300 Re-Implement request status "Closed - Pickup expired" using new OKAPI scheduler
-
- Closed
-
-
FOLIO-1953 SPIKE: propose an approach for scheduling tasks in Okapi
-
- Closed
-
-
OKAPI-730 system call timer
-
- Closed
-