Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-2108

Priorities for Orders

    XMLWordPrintable

Details

    Description

      Current Situation

      • The JS7 does not implement priorities for orders. If a number orders is waiting for a Resource Lock or for a Process Limit (with an Agent or Subagent Cluster) then they will be continued in arbitrary order acquiring the Resource Lock or a free process.
      • Users would like to prioritize specific orders
        • to acquire a Resource Lock at the next possible occasion,
        • to use the next free process from a Process Limit.

      Desired Behavior

      • Priority Queues
        • The Controller knows Priority Queues that are specified by name, capacity and penalty
          • name: an object name based on naming rules similar to job names.
          • capacity: the max. number of orders that can be added to the queue.
          • penalty: when orders of the given Priority Queue have been processed then the penalty value specifies the number of orders assigned other Priority Queues that will be processed before orders of
        • Any number of Priority Queues can be configured. They are deployed to a Controller similar to Resource Locks.
          • Priority Queues cannot be removed as long as existing orders are assigned the Priority Queue.
          • Priority Queues can be updated at any time. Updated values for capacity and penalty are applied on-the-fly.
      • Assigning Priority Queues to Resource Locks and Process Limits
        • Resource Locks can be assigned an ordered list of Priority Queues.
          • Orders from the related Priority Queue will be next to acquire the Resource Lock.
        • Standalone Agents, Director Agents and Subagent Clusters can be assigned an ordered list of Priority Queues.
          • Orders from the related Priority Queue will be assigned the next free process.
        • The ordering of Priority Queues indicates the highest precedence for the first queue, lower precedence for the second queue etc.
      • Assigning Priority Queues to Orders
        • Orders can be assigned a Priority Queue
          • when being added ad hoc by the REST API.
          • when being added from a Schedule that is assigned the Priority Queue.
          • from a File Order Source that is assigned the Priority Queue.
          • The earliest order added to the queue will be the first one to be processed (LAFI stack).
          • An order's position in the queue is considered. An order's position in the queue can be modified at run-time.
          • If the queue hits its capacity then additional orders will be added to the queue after a position becomes available.. 
        • The assignment can be modified or removed in the lifetime of an order.
        • The assignment can be added to an order in its lifetime.

      Example

      • Resource Locks
        • A Priority Queue Q1 holds a capacity 5 and a penalty 2. A second Priority Queue Q2 holds a capacity 3 and a penalty 6. A Resource Lock L1 holds the capacity 3 for shared use and is assigned the Priority Queues Q1, Q2.
        • Assume 10 Orders being added and assigned Priority Queues Q1, another 10 Orders Q2. Assume another 10 orders without Priority Queue assignment.
        • In a first step 3 orders of Q1 will be processed by Resource Lock L1. For each Order being processed a successor will make it for Q1.
        • When L1 has processed 5 orders of Q1 then the penalty applies and 2 orders of the next Priority Queue Q2 will be processed. With the next 2 orders releasing the Resource Lock another 5 orders from Q1 will be processed by priority.
        • The orders without assignment to a Priority Queue will be processed only after no orders for Q1 are available. In this situation the penalty of Q2 will apply and will allow orders without Priority Queue assignment to be processed.
      • Process Limits
        • The same behavior applies when using a Process Limit instead of a Resource Lock.

      Attachments

        Activity

          People

            jz Joacim Zschimmer
            ap Andreas Püschel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: