Pluggable Pipelines Andy Brown New Pipeline Development Wellcome Trust Sanger Institute
Pluggable Pipelines <ul><li>Problem – The pipeline you are working on starts to become too large, and projects which would normally follow the pipeline, don't need all the components of it.
Possible solution – Make the components of the pipeline pluggable, so that they can be inserted, dropped or the order changed dependent on the project requirements. </li></ul>
The Flag Waver. <ul><li>The flag waver has within it a number of functions/methods that it can run in any order
It just needs to know any variables (e.g. a run folder), the functions it is to run and the order it is to run them in
Each function knows nothing apart from what it is to do and what it should return (typically something which alerts the next function/script to know when to run) </li></ul>Flag Waver Function b Function c Function d Function e Function a
Responsibilities <ul><li>When the user runs the flag waver, they input the order the functions will run in
Functions are only responsible for launching, not checking
It is up to the component which is launched to complete fully and properly – not the function!
It is also up to the user to only select an order where if one component is dependent on the output of another that it is queued after that </li></ul>
Operation <ul><li>Flag waver is told to use a particular order
It also has the parameters required (i.e. a run folder)
Flag waver calls each function in turn, passing in anything which delays the script the function will call (i.e. LSF job ids for dependency)
Function calls the object which will launch the component script or do something, giving it any required parameters. (If something is needed to be looked up, the Object should do this, not the Flag Waver or the function). </li></ul>
Operation continued <ul><li>Object does its thing, most likely submit the script to LSF. The object holds all the additional static parameters that the component process or script needs.
Object returns any information which the next function will require, typically again, LSF job ids.
The function passes out of it the returned information if it needs to.
Flag waver moves onto next function, or ends </li></ul>
Example: Archival File Creation <ul><li>The flag waver has a number of functions which can do something for helping File Creation
We choose </li><ul><li>archive_dir – we need a specific archive directory
create_srf – srf format files have been a standard