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

Marshall Schor commented on UIMA-3691:
--------------------------------------

CAS Context should be UIMA Context, I'll fix that... This is a use case for 
multi-core machines. The original uima core design (done in early 2000) did not 
take much notice of multi-core machines, and is primarily designed to be 
single-threaded.  There are some features (such as the form 
produceAnalysisEngine(...) which can take a scale-out parameter - if provided 
it replicates the AE, and uses an AE wrapper called 
MultiprocessingAnalysisEngine_impl).  This implementation was done before Cas 
Multipliers were envisioned, so these uses cases may have been overlooked.  

Since that time, we've had UIMA-AS and I've heard of other embeddings that do 
different approaches to exploiting multi-core, and these are also using CAS 
pools.  

On further reflection, I'm somewhat confused at all of the various use cases 
for CAS pooling, and so will probably not proceed on this Jira for a while, 
until some of the key design goals for the various use scenarios become clearer 
:-).

> support multi-threaded shared contexts for CasPools for CAS Multipliers
> -----------------------------------------------------------------------
>
>                 Key: UIMA-3691
>                 URL: https://issues.apache.org/jira/browse/UIMA-3691
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.5.0SDK
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.6.0SDK
>
>
> The current UIMA framework design is quite flexible when it comes to 
> producing analysis engines (AEs), to allow various scale-outs on a single 
> JVM. When scaled out, via multiple instances of the AEs, it's possible to 
> have the multiple instances share the UIMA Context (by passing a reference to 
> it in additional params). The current design for CAS Multipliers creates a 
> pool for each CAS Multiplier, and hangs it off of the UIMA Context.  The 
> problem with this approach is that if the scaleout approach chooses to share 
> a common CAS Context with all scaled out instances, then the CAS pool will 
> run out of CASes.  A better design is to hang the pool off of an object that 
> will scale with the Annotator itself, rather than the shared context.  This 
> can be done by changing the implementation of getEmptyCas() in the 
> CasMultiplier_implBase class(es).  The current implementation calls the same 
> method on the (potentially shared) UIMA Context object; this could be 
> deprecated with a note saying that this will still work, but not with scaled 
> out impls that share the UIMA context object.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to