Shared Jobs vs. Simply having the orchestration linked

What the benefit or difference between having a shared job vs. just dropping the "normal" job onto the canvas for execution?

 

I'm assuming it's something to do with a shared job will be copy of the code vs. when you simply link it into the orchestration it's a pointer to the job? Which in that case you could run into issues when multiple copies of the job needs to run in parallel?

 

I'm working on a use case that after a job completes, I want to have it publish some custom stats. I plan on all jobs needing to do this. Is this a use case for a shared job? If I do some variable look ups in python to get the job name to publish with my stats, will the job name be the name of the shared job or the name of the job that is invoking the shared job?

Hi @MichaelBlack​, the main difference is that Shared Jobs are global and Orchestrations are local to a project. Meaning, you can throw a shared job into any orchestration in any project whereas orchestrations you would only be able to reuse it within the current project. Yes, you can technically export the orchestration from one project and import it into another project but that has fundamental issues where if you want to change the logic in the orchestration you then have to change it in all projects. If you change/update the version of the shared job that is used in multiple projects, they are all automatically updated because they are point to the same shared job.

Your second comment is correct. Basically the shared job would run in it's own thread and be agnostic to any other process. The orchestration can do this to a certain extent if it's created correctly. Meaning proper variable configurations, etc.

For the third question, I would say if your jobs are spread across multiple projects then it's absolutely a use case for Shared Jobs. Even they are not spread across projects it still can be a benefit at the time of execution although marginal. I like to think ahead as to whether I might use it in other projects and make the determination at that point. As for the the job name, it can be whatever you would like it to be. I hope this helps!

Thanks that clarified a lot and helped me know in which instances to use a shared job.