Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Use Cases:
    • Consider the situation where a number of orders that have been added to a job chain. These orders should then be serialized to guarantee that each order has completed the job chain before the next order starts.
    • Consider the situation that a number of job chains makes use of the same resource, e.g. by access to the same objects in a database. These orders should be serialized to guarantee that only one order of one job chain can access the resource at the same time.
  • Requirements
    • The solution implements resource locks that will serialize access 
      • for orders of any number of job chains.,
      • for any number of orders of the same job chain.
    • Resource locks are persistent, i.e. they are restored to the same status after a JobScheduler restart.
    • Resource locks can by acquired by job chains that are executed 
    • Resource locks can be monitored and manually removed with the JOC GUI should the need arise.
  • Delimitation
    • The solution is focused on on 
      • locks for complete job chains. For locks at job level see Locks.
      • exclusive locks, shared locks are not considered.
    • Persistence of resource locks is limited to a predefined duration. The default value is 24 hrs. and can be configured for individual needs.
  • Solution Outline:
    • The solution implements two roles represented by job chains:
      • Resource Lock Provider implements a job chain that accepts shadow orders for serialized access to resources. The job chain guarantees that only one order at a time is granted a resource lock. The job chain will suspend orders in originating job chains as long as a resource lock is blocked and will continue such orders when the resource lock becomes available. Any number of orders of the same or of different job chains can use the Resource Lock Provider job chain for serialization.
      • Resource Lock Consumer implements a sample job chain that makes use of a resource that should be accessed exclusively by one order at a time.
  • References
    • SourceForge Forum Discussion Thread
    • Jira
      serverSOS JIRA
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-402

Solution

  • Download resource_lock_provider.zip
  • Download resource_lock_consumer.zip
  • Extract the archives to the ./config/live folder of your JobScheduler installation.
  • The archive extracts the files to the folders  resource_lock_provider and resource_lock_consumer respectively. 
  • You can store the resource_lock_consumer files in any folder as you like, however, if you move the resource_lock_provider files to some other location then you will have to adjust settings in the resource_lock_consumer objects.

...