By now, you will no doubt be aware that Ooyala Flex is a media management platform, and as a media management platform, it must deal with large files and long term operations. So, certain actions such as transcoding and publishing may take a long time to run. Some actions may also require access to resources to get work done. For example a transcode action will require access to a transcode resource. Although Ooyala Flex could run an action immediately at your request, this could present problems in terms of resource contention and the extended length time of the User interface or API interface to respond. It also limits the use of actions to a certain degree, as you may wish a specific action to run at a specific time in the future. An example might be that you want to publish an asset to YouTube next Sunday at 09:00 hours.
For all of these reasons, actions are run inside jobs. These jobs are managed by Ooyala Flex’s internal job scheduler. The job scheduler is responsible for that handling the storage, retrieval, prioritization, and execution of jobs.
A job is a unit of work that comprises of an action (that defines the work) and additional properties such as start time, priority, status and owner. Jobs run as transactions which means they either complete, or fail and roll back to their original state. A job runs in its own context which means it is completely isolated from all other jobs and can be run on any Ooyala Flex node in a Ooyala Flex cluster that supports this job type. A job contains all the information to run in isolation, including configuration information. This information is stored in the job's "context". This is important, as it means that if a job fails, it can be retried.
The properties that belong to each job are:
• Start Time: The time that the job has been scheduled to begin execution.
• End Time: The time that the job completed execution (assumed it has completed).
• Duration: The time the job took to run.
• Priority: The priority of the job e.g. Lowest, Low, Normal, High, Highest.
• Owner: The user that owns the job.
• Status: The current status of the job e.g. Scheduled, Running, Failed, Completed.
• Retries: The number of times that a job has been retried. This means that if a job has failed it can be retried.
• Action: This is the action (defined work) that the job is carrying out on your behalf.
• Configuration: When a job is created, the configuration is copied from the action to the job. This means that if a job fails, you can amend the configuration for a specific job and then retry it.
There are a few scenarios in which the actual start time of a job may be delayed. This could happen if:
• There are other higher priority jobs that require execution.
• The resources that are required for the job are contended.
This guide contains the following topics: