[ 
https://issues.apache.org/jira/browse/UIMA-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654817#action_12654817
 ] 

Burn Lewis commented on UIMA-1245:
----------------------------------

I think we could get the same behaviour as single-threaded UIMA if in addition 
to delaying the processing of the parent we set the size of all CAS pools to 1. 
 This would ensure that only one child at a time would be active and the next 
would not start until the previous had been returned to the pool.  If the CM is 
remote then when the child CAS is returned to the AGGR ~outer~ pool it signals 
back to AGGR ~inner~ that a CAS has been released which would then release its 
copy of the child and so allow the CM in AGGR ~inner~ to generate the next 
child.  Then when all children have been released the held-up parent CAS would 
be allowed to continue in the flow.

Also, as we discussed, this "process-parent-last" option would be more useful 
than for just emulating single-threaded operation.  An aggregate could use a CM 
to split its work into many parallel pieces, and then use a final CM to combine 
the results of its children and merge them into the parent before it exits the 
aggregate.  The new option would ensure that the parent reaches the final CM 
only after all its children. This would let the aggregate process its children 
asynchronously but appear to its caller as a non-CM simple aggregate.

I assume this would be a per-CM option, not application wide .... where should 
we specify it and how?  Should we make this new behaviour the default?  Should 
the default be true or false?  Perhaps in the deployment descriptor:

     {{<casMultiplier poolSize="1" processParentLast="true">}}
or
     {{<casMultiplier poolSize="1" processParentEarly="false">}}
or ....

> Processing order of parent CAS different on UIMA and UIMA AS
> ------------------------------------------------------------
>
>                 Key: UIMA-1245
>                 URL: https://issues.apache.org/jira/browse/UIMA-1245
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>            Reporter: Eddie Epstein
>
> Arron Kaplan raised the question of when parent CASes are processed relative 
> to their children. See http://markmail.org/message/5cop7iv2nshouhgs  As of 
> now, the processing order for a multi-threaded UIMA AS aggregate is different 
> than that for a single-threaded UIMA aggregate.
> A discussion with Burn, Adam, Jerry, Marshall and myself concluded that the 
> default processing order for UIMA AS should be changed to be the same as in 
> UIMA, in order to have the same application behavior for both. This will be 
> done by suspending flow of a parent CAS after it is returned from a 
> CasMultiplier delegate until all its children CASes have finished processing.
> However, there also needs to be a UIMA AS deployment option for CasMultiplier 
> delegates that allows the parent CAS to resume processing immediately after 
> being returned from the CM. This option is needed to enable parallel 
> processing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to