Workflow control elements Split and Join
Posted: Wed Aug 24, 2016 4:37 pm
At present FFASTrans uses implicit method of workflow control. As far as I understand, it expands complex workflows into set of simple sequential workflows with heavy branching:
It supports split operation and doesn't support joins operation. Every other block uses result of the previous block and there is always only one previous block. It ensures that a particular single source always exists.
But there are a lot of possible cases when JOIN operation is required. For example final step in complex workflow, that should be executed at the very end and only once. Deleting of temporary files or moving of the initial file to another place.
There is another case hard to resolve in a native way - HLS or DASH creation. It is a generation of several streams of different bitrates (the first, parallel, steps) and a final packaging. The packaging could require all the streams completed, as it extracts some metadata from all of them. In terms of FFASTRans packaging is Command Executor Processor, which uses some user variables, defined at previous steps.
Current FFASTrans' paradigm needs a special processor, let's call it "Operations/Join", to implement such command:
The engine should expand all branches as usual except Join processor and other processors after them. JOIN processor should start it's work only when all previous connected processors finish their work.
There is an open question - what to do with Delivery Folders or Filters, if user put it after "Join"? What should be the "source" for processors, which one from previous branches? May be it's reasonable to support only those ones from "Others" and "Operations" groups.
Taking into consideration the above, a proper name for the new processor is not "Join" but "Final".
It supports split operation and doesn't support joins operation. Every other block uses result of the previous block and there is always only one previous block. It ensures that a particular single source always exists.
But there are a lot of possible cases when JOIN operation is required. For example final step in complex workflow, that should be executed at the very end and only once. Deleting of temporary files or moving of the initial file to another place.
There is another case hard to resolve in a native way - HLS or DASH creation. It is a generation of several streams of different bitrates (the first, parallel, steps) and a final packaging. The packaging could require all the streams completed, as it extracts some metadata from all of them. In terms of FFASTRans packaging is Command Executor Processor, which uses some user variables, defined at previous steps.
Current FFASTrans' paradigm needs a special processor, let's call it "Operations/Join", to implement such command:
The engine should expand all branches as usual except Join processor and other processors after them. JOIN processor should start it's work only when all previous connected processors finish their work.
There is an open question - what to do with Delivery Folders or Filters, if user put it after "Join"? What should be the "source" for processors, which one from previous branches? May be it's reasonable to support only those ones from "Others" and "Operations" groups.
Taking into consideration the above, a proper name for the new processor is not "Join" but "Final".