psos executors 1.0.0

Executors perform a single step in a workflow. Different executors exist. Each class of executors has its own global address for broadcasts. Each executor instance has its personal address.

Operations

  • PUB 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

  • PUB 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

    Messages that executors send to 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:

    • #0Executor 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

    • #1Update 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

    • #2Report execution resultreport_execution_result

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

      object
      object

      Examples

Messages

  • #1Scheduler 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
  • #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
  • #3Process 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
  • #4Acknowledge 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"
  • #5Is 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
  • #6Executor is alivereply_is_alive

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

    Payload
    string
      Allowed values:
    • "yes"
  • #7Cancel 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
  • #8confirm cancelationreply_cancel_job

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

    Payload
    string
      Allowed values:
    • "canceled"
    • "not supported"
    • "unknown job"
  • #9Update 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
  • #10Confirms 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"
  • #11Report execution resultreport_execution_result

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

    object
    object
  • #12Acknowledge report execution resultreply_report_execution_result

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

    Payload
    string
      Allowed values:
    • "ok"

Schemas

  • object
    uid: job

    the job object