Jobs backend
From Scire Wiki
Scire's Job Distribution Subsystem
The first component of Scire functionality to be implemented in an XML-RPC framework is the job distribution system. For the purposes of Scire, this means the capability to deploy scripts to clients (specified through the web UI, like most/all other things in Scire will be).
Right now the jobs subsystem is completely pull-based from the client perspective. This means that although the server specifies what jobs the client will get and even a schedule[1] for them, the client initiates the communication with the server at boot and/or from crontab for example. This serves to nullify certain challenges with a push-based approach, including client consistency, and a push can still be simulated, e.g. through an SSH command to all clients that runs the scire client.
There are several flow charts that have been created to describe the current (not the goal) state of the jobs subsystem.
- Scire client main program flow
- Subroutine for retrieving list of jobs
- Subroutine for retrieving a job's metadata and script
- Subroutine for checking the status of a job
- Subroutines for executing the jobs for a client
These images are available as both PNG and the (Inkscape) SVG source in the Gentoo SVN repo: [[1]]. The SVN repository should be considered the primary source for these images and changes should be made available there. Also, changes to the jobs subsystem should be reflected in these documents, or they should be replaced with some other more favorable documentation.
[1] Scheduling is currently only partially implemented, and it is a best-effort approach to timing... i.e. it's less of a schedule and more of a minimum time interval between job executions.
