Question

Calling WorkspaceRunner from within a WorkspaceRunner

  • 9 December 2014
  • 3 replies
  • 1 view

Badge
Hi All,

 

I was wondering if anyone had an experience of using a WorkspaceRunner within another WorkspaceRunner.

 

So:

 

Workspace1(Parent) has a WorkspaceRunner which calls Workspace2(Child).

 

Workspace2 then uses a WorkspaceRunner to call Workspace3(Grandchild).

 

 

I'm assuming that if you leave "Wait for job to complete" at "Yes", then you can do this down to about 6 or 7 levels "deep" before running out of FME licenses (but just guessing).

 

 

However, ideally I'd like to use concurrency; I guess if I set the parent to use 7 processes for the child, then the child won't be able to run its own grandchildren as there won't be any licenses available. So I've set a maximum of 3 children running and disabled concurrency for the grandchildren.

 

 

Has anyone else dealt with this? Is my interpretation how it works? I don't currently have the ability to test it, so figured I'd ask.

 

Thanks,

 

Jonathan

3 replies

Userlevel 2
Badge +17
Hi Jonathan,

 

 

I have such a experience - cascade workspaces by WorkspaceRunners.

 

According to my observation with the Windows Task Manager, the maximum number of executable child processes seems to be seven even if multiple WorkspaceRunners were kicked simultaneously.

 

 

So, if seven children have started concurrently before launching grandchildren, every grandchild has to wait for completion of an uncle/aunt process. However, since seven child processes are running already for the children, any grandchild will not be executed. Result, the children will not finish forever!

 

 

You are right. I agree that you limit the maximum number for children.

 

 

Takashi
Badge
Hi Takashi,

 

That's kind of what I expected - 7 is the limit of concurrent children\\grandchildren because with the parent, that's a total of 8 FME workers, the maximum number for a database license.

 

 

However I'm hitting some very unpredictable results when I turn off "Wait for job to complete".

 

 

Basically:
  • Workspace1 is running Workspace2 concurrently (not waiting), with a maximum of 3 of them.
  • Workspace2 runs Workspace3, and is set to "wait for job".

 

Logically this should result in a maximum of 7 processes (1 parent, 3 children, and up to 3 grandchildren). However when I run it the results are unpredictable and the output indicates that the grandchildren didn't all run.

 

 

I'm now running the alternative:
  • Workspace1 is running workspace2 set to wait for job.
  • Workspace2 is running Workspace3, with a maximum of 5 grandchildren.
This should have a maximum of 7 processes too. So far at least the results seem to be more promising.

 

But it's not clear why the second works and the first doesn't.
Userlevel 2
Badge +17
In my quick test, the first method also worked as expected.

 

See the test project. (https://drive.google.com/file/d/0B0ufVP2t0eApRlM0LV8xUWF1bWs/view?usp=sharing)

Reply