Psot scheduler 1.0.0

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.

Operations

  • PUB psos.scheduler

    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:

    • #0new jobnew_job

      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

      object

      job object

      object

      Examples

    • #1submit jobsubmit_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.

      object
      uid: submit_job

      Datatype to submit psos jobs to the psos scheduler

      object

      Examples

    • #2Executor reports free capacityreport_executor

      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

      Payload
      string

      The channel name specific for the scheduler

      object

      Examples

    • #3Update job dataupdate_job_data

      Part 1/2 of the 'update job' conversation
      Replaces the jobs data with the data send in the payload

      object
      object

      Examples

    • #4Report execution resultreport_execution_result

      Part 1/2 of the 'report execution result' conversation

      object
      object

      Examples

    • #5delete jobdelete_job

      Part 1/2 of the 'delete_job' conversation
      Deletes a job

      Payload
      string

      job id

      object

      Examples

    • #6new jobget_job

      Part 1/2 of the 'get_job' conversation
      Retrieves a job by its id

      Payload
      string
      object

      Examples

  • SUB psos.executor.{name}

    Broadcast channel to get all executors with free capacity to report to the scheduler

    name
    required
    string
    uid: name

    Accepts the following message:

    Scheduler broadcastreport_free_capacity

    Scheduler asks Executors to reply if they have free capacity to work on a job. Expects executors to send a "report_executor" message.

    object

    Examples

  • SUB psos.executor.{name}.{id}

    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.

    id
    required
    string
    uid: id
    name
    required
    string
    uid: name

    Accepts one of the following messages:

    • #0Is aliveis_alive

      Part 1/2 of the 'is alive' conversation
      Scheduler asks the executor if it is still running. Expected reply: reply_is_alive

      object

      Examples

    • #1Cancel jobcancel_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

      restricted any
      object

      Examples

  • SUB psos.scheduler.jobs

    Notifications regarding jobs

    Accepts the following message:

    Job notificationjob_notification

    Notifies about job changes. The type of change is encoded in the header with the action.

    object
    object

    Examples

  • SUB psos.scheduler.executors

    Notifications regarding executors

    Accepts the following message:

    Executor notificationexecutor_notification

    Notifies about executor changes. The type of change is encoded in the header with the action.

    Payload
    string

    The timed out address

    object

    Examples

Messages

  • #1new jobnew_job

    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

    object

    job object

    object
  • #2acknowledge new jobreply_new_job

    Part 2/2 of the 'new_job' conversation
    Sends the new job object.

    object
    uid: job

    the job object

  • #3submit jobsubmit_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.

    object
    uid: submit_job

    Datatype to submit psos jobs to the psos scheduler

    object
  • #4acknowledge submit jobreply_submit_job

    Part 2/2 of the 'submit_job' conversation

    Payload
    string
      Allowed values:
    • "ok"
  • #5Scheduler broadcastreport_free_capacity

    Scheduler asks Executors to reply if they have free capacity to work on a job. Expects executors to send a "report_executor" message.

    object
  • #6Executor reports free capacityreport_executor

    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

    Payload
    string

    The channel name specific for the scheduler

    object
  • #7Process a jobreply_report_executor_1

    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

    object
  • #8Acknowledge Jobreply_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.

    Payload
    string
      Allowed values:
    • "accepted"
    • "denied"
  • #9Cancel jobcancel_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

    restricted any
    object
  • #10confirm cancelationreply_cancel_job

    Part 2/2 of the 'cancel job' conversation
    Executor confirms if the job was canceled or not.

    Payload
    string
      Allowed values:
    • "canceled"
    • "not supported"
    • "unknown job"
  • #11Is aliveis_alive

    Part 1/2 of the 'is alive' conversation
    Scheduler asks the executor if it is still running. Expected reply: reply_is_alive

    object
  • #12Executor is alivereply_is_alive

    Part 2/2 of the 'is alive' conversation
    Excecutor replies with "yes"

    Payload
    string
      Allowed values:
    • "yes"
  • #13Update job dataupdate_job_data

    Part 1/2 of the 'update job' conversation
    Replaces the jobs data with the data send in the payload

    object
    object
  • #14Confirms the arrival of the updated job datareply_update_job_data

    Part 2/2 of the 'update job' conversation
    Scheduler confirms the arival of the updated job data

    Payload
    string
      Allowed values:
    • "updated"
  • #15Report execution resultreport_execution_result

    Part 1/2 of the 'report execution result' conversation

    object
    object
  • #16Acknowledge report execution resultreply_report_execution_result

    Part 2/2 of the 'report execution result' conversation

    Payload
    string
      Allowed values:
    • "ok"
  • #17delete jobdelete_job

    Part 1/2 of the 'delete_job' conversation
    Deletes a job

    Payload
    string

    job id

    object
  • #18reply to delete jobreply_delete_job

    Part 2/2 of the 'delete_job' conversation
    Acknowledge deletion

    Payload
    string
      Allowed values:
    • "deleted"
  • #19new jobget_job

    Part 1/2 of the 'get_job' conversation
    Retrieves a job by its id

    Payload
    string
    object
  • #20return the jobreply_get_job

    Part 2/2 of the 'acknowledge_get_job' conversation
    Sends the job.

    object
    uid: job

    the job object

  • #21Job notificationjob_notification

    Notifies about job changes. The type of change is encoded in the header with the action.

    object
    object
  • #22Executor notificationexecutor_notification

    Notifies about executor changes. The type of change is encoded in the header with the action.

    Payload
    string

    The timed out address

    object

Schemas

  • object
    uid: job

    the job object

  • object
    uid: submit_job

    Datatype to submit psos jobs to the psos scheduler

  • object
    uid: execution
  • object
    uid: job_state