The Psos scheduler accepts job request and distributes the job tasks to executors. Only one active scheduler exists and listens to requests to the psos.scheduler
address.
Address to contact the scheduler. Each message type represents an action. An action starts a dialog that has at least one reply message.
Accepts one of the following messages:
Part 1/2 of the 'new_job' conversation
Creates a new job and a location for the job related data. The job will be in an uninitialized state until it is submitted. Uninitialized jobs are removed after a period of time. Expected reply: reply_new_job
job object
{}
{
"action": "new_job"
}
Part 1/2 of the 'submit_job' conversation
After a job was created with new_job
, a job submitter can initialize everything and submit it here.
Datatype to submit psos jobs to the psos scheduler
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"data": {},
"plan": [
{
"name": "string",
"address": "string",
"states": [
{
"value": "string",
"label": "string"
}
]
}
]
}
{
"action": "submit_job"
}
Part 1/3 of the 'hand over job to executor' conversation
The executor sends this message to the scheduler if the executor has the capacity to handle another job. Expected reply: reply_report_executor_1
The channel name specific for the scheduler
string
{
"action": "report_executor"
}
Part 1/2 of the 'update job' conversation
Replaces the jobs data with the data send in the payload
{
"id": "string",
"data": {}
}
{
"action": "update_job_data"
}
Part 1/2 of the 'report execution result' conversation
{
"id": "string",
"status": "success"
}
{
"action": "report_execution_result"
}
Part 1/2 of the 'delete_job' conversation
Deletes a job
job id
string
{
"action": "delete_job"
}
Part 1/2 of the 'get_job' conversation
Retrieves a job by its id
string
{
"action": "get_job"
}
Broadcast channel to get all executors with free capacity to report to the scheduler
Accepts the following message:
Scheduler asks Executors to reply if they have free capacity to work on a job. Expects executors to send a "report_executor" message.
{
"action": "report_free_capacity"
}
Address to contact a specific executor. The addresses can be obtained with the report_free_capacity
action on the broadcast address for the executor class. Each message type represents an action. An action starts a dialog that has at least one reply message.
Accepts one of the following messages:
Part 1/2 of the 'is alive' conversation
Scheduler asks the executor if it is still running. Expected reply: reply_is_alive
{
"action": "is_alive"
}
Part 1/2 of the 'cancel job' conversation
Scheduler instructs executor to cancel the job with the given id. Expected reply: reply_cancel_job
{
"id": "string"
}
{
"action": "cancel_job"
}
Notifications regarding jobs
Accepts the following message:
Notifies about job changes. The type of change is encoded in the header with the action.
{
"job_object": {
"id": "string",
"created": "2019-08-24T14:15:22Z",
"lastUpdated": "2019-08-24T14:15:22Z",
"deleteAt": "2019-08-24T14:15:22Z",
"location": "string",
"state": {
"value": "Failed",
"label": "string"
},
"data": {}
}
}
{
"action": "deleted"
}
Notifications regarding executors
Accepts the following message:
Notifies about executor changes. The type of change is encoded in the header with the action.
The timed out address
string
{
"action": "timeout"
}
Part 1/2 of the 'new_job' conversation
Creates a new job and a location for the job related data. The job will be in an uninitialized state until it is submitted. Uninitialized jobs are removed after a period of time. Expected reply: reply_new_job
job object
Part 2/2 of the 'new_job' conversation
Sends the new job object.
the job object
Part 1/2 of the 'submit_job' conversation
After a job was created with new_job
, a job submitter can initialize everything and submit it here.
Datatype to submit psos jobs to the psos scheduler
Part 2/2 of the 'submit_job' conversation
Scheduler asks Executors to reply if they have free capacity to work on a job. Expects executors to send a "report_executor" message.
Part 1/3 of the 'hand over job to executor' conversation
The executor sends this message to the scheduler if the executor has the capacity to handle another job. Expected reply: reply_report_executor_1
The channel name specific for the scheduler
Part 2/3 of the 'hand over job to executor' conversation
Hands over a job to the executor that should be processed. The executor will reply with an 'ok' if it accepts the job or otherwise 'job_denied'. Expected reply: reply_report_executor_2
Part 3/3 of the 'hand over job to executor' conversation if the executor has free capacity
The executor either accepts or denies a job.
Part 1/2 of the 'cancel job' conversation
Scheduler instructs executor to cancel the job with the given id. Expected reply: reply_cancel_job
Part 2/2 of the 'cancel job' conversation
Executor confirms if the job was canceled or not.
Part 1/2 of the 'is alive' conversation
Scheduler asks the executor if it is still running. Expected reply: reply_is_alive
Part 2/2 of the 'is alive' conversation
Excecutor replies with "yes"
Part 1/2 of the 'update job' conversation
Replaces the jobs data with the data send in the payload
Part 2/2 of the 'update job' conversation
Scheduler confirms the arival of the updated job data
Part 1/2 of the 'report execution result' conversation
Part 2/2 of the 'report execution result' conversation
Part 1/2 of the 'delete_job' conversation
Deletes a job
job id
Part 2/2 of the 'delete_job' conversation
Acknowledge deletion
Part 1/2 of the 'get_job' conversation
Retrieves a job by its id
Part 2/2 of the 'acknowledge_get_job' conversation
Sends the job.
the job object
Notifies about job changes. The type of change is encoded in the header with the action.
Notifies about executor changes. The type of change is encoded in the header with the action.
The timed out address
the job object
Datatype to submit psos jobs to the psos scheduler