Architecture and design overview

The GRAM services in GT 4.2.0 are WSRF compliant. One of the key concepts in the WSRF specification is the decoupling of a service with the public "state" of the service in the interface via the implied resource pattern. Following this concept, the data of GT 4.2.0 GRAM jobs is published as part of WSRF resources, while there is only one service to start jobs or query and monitor their state. This is different from the OGSI model of GT3 where each job was represented as a separate service. There is still a job factory service that can be called in order to create job instances (represented as WSRF resources). Each scheduling system that GRAM is interfaced with is represented as a separate factory resource. By making a call to the factory service while associating the call to the appropriate factory resource, the job submitting actor can create a job resource mapping to a job in the chosen scheduling system.

1. Job States

1.1. Overview

The Managed Executable Job Service (MEJS) relies on a state machine to handle state transitions. There are two sets of states: external and internal. The external states are those that the user gets in notifications and can be queried as a resource property. The internal states are those that are strictly used by the state machine to step through all the necessary internal tasks that need to be performed for a particular job.

The Managed Multi Job Service does not rely on a state machine, but instead makes judgements after receiving notifications from the sub-jobs about which external state it should be in. The external states for the MMJS are identical to the ones used by the MEJS.

1.2. External and Internal States of the Managed Job Services

1.2.1. External States of the Managed Job Services

  • Unsubmitted
  • StageIn
  • Pending
  • Active
  • Suspended
  • StageOut
  • CleanUp
  • Done
  • Failed
  • UserTerminateDone
  • UserTerminateFailed

1.2.2. Internal States of the Managed Executable Job Service

  • None
  • Start
  • StageIn
  • StageInHold
  • StageInResponse
  • Submit
  • PendingHold
  • WaitingForStateChanges
  • Suspend
  • Resume
  • OpenStdout
  • OpenStderr
  • MergeStdout
  • StageOut
  • StageOutHold
  • StageOutResponse
  • CleanUp
  • CleanUpHold
  • FileCleanUp
  • FileCleanUpResponse
  • CacheCleanUp
  • UserTerminate
  • SystemTerminate
  • FailureFileCleanUp
  • FailureFileCleanUpResponse
  • FailureCacheCleanUp
  • FinalizeTermination
  • Done
  • Restart

1.3. Managed Executable Job Service Internal State

Here is a diagram illustrating the internal state transitions of the Managed Executable Job Service and how the external states are triggered within this progression:

Figure 1. Managed Executable Job Service Internal State Transition Diagram

Managed Executable Job Service Internal State Transition Diagram