You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org> on 2010/06/04 16:34:58 UTC

[jira] Created: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

UIMA AS should block msg submitter thread if a thread pool is empty
-------------------------------------------------------------------

                 Key: UIMA-1800
                 URL: https://issues.apache.org/jira/browse/UIMA-1800
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
    Affects Versions: 2.3AS
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik


If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
 
Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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


[jira] Closed: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-1800.
-------------------------------

    Resolution: Fixed

> UIMA AS should block msg submitter thread if a thread pool is empty
> -------------------------------------------------------------------
>
>                 Key: UIMA-1800
>                 URL: https://issues.apache.org/jira/browse/UIMA-1800
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>
> If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
>  
> Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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


[jira] Updated: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-1800:
---------------------------------

    Fix Version/s: 2.3.1AS

> UIMA AS should block msg submitter thread if a thread pool is empty
> -------------------------------------------------------------------
>
>                 Key: UIMA-1800
>                 URL: https://issues.apache.org/jira/browse/UIMA-1800
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>             Fix For: 2.3.1AS
>
>
> If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
>  
> Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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


[jira] Closed: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-1800.
-------------------------------

    Resolution: Fixed

Modified the UIMA AS listener code to use new UimaBlockingExecutor which uses a semaphore with multiple permits to throttle message processing. A submitter thread first requests a free permit from a semaphore and if one is available it is allowed to submit a message to a thread pool for processing. If there are no permits available ( meaning all threads in a pool are busy processing previous messages), the submitter thread blocks. It is unblocked once a new thread becomes available 

> UIMA AS should block msg submitter thread if a thread pool is empty
> -------------------------------------------------------------------
>
>                 Key: UIMA-1800
>                 URL: https://issues.apache.org/jira/browse/UIMA-1800
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>
> If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
>  
> Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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


[jira] Issue Comment Edited: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876316#action_12876316 ] 

Jerry Cwiklik edited comment on UIMA-1800 at 6/7/10 1:27 PM:
-------------------------------------------------------------

Revert code that handles internal messaging (to/from colocated delegate) to previous version that is not using BlockingThreadExecutor. Specifically, revert VMTransport and UimaVmMessageDispatcher. The BlockingExecutor should still be used to process reply messages from remotes. For colocated components dont require a samphore for submitting messages to a queue.  

      was (Author: cwiklik):
    Revert to previous version that is not using BlockingThreadExecutor. 
  
> UIMA AS should block msg submitter thread if a thread pool is empty
> -------------------------------------------------------------------
>
>                 Key: UIMA-1800
>                 URL: https://issues.apache.org/jira/browse/UIMA-1800
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>
> If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
>  
> Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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


[jira] Reopened: (UIMA-1800) UIMA AS should block msg submitter thread if a thread pool is empty

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik reopened UIMA-1800:
---------------------------------


Revert to previous version that is not using BlockingThreadExecutor. 

> UIMA AS should block msg submitter thread if a thread pool is empty
> -------------------------------------------------------------------
>
>                 Key: UIMA-1800
>                 URL: https://issues.apache.org/jira/browse/UIMA-1800
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>
> If a queue scaleout factor > 1, the UIMA AS creates a thread pool and a managing Executor object. The threads in a pool are used to process incoming messages. A submitter thread receives a jms message via a callback from Spring and delivers it to the Executor for processing in one of the threads from the pool. If a thread pool is empty, the Executor policy is to use the submitter thread to process the message. Since there is a single submitter thread (per queue) this policy slows down the submitter thread and prevents it from delivering messages for processing by other threads.
>  
> Change the code to prevent the submitter thread from doing processing. Instead, block the submitter thread if the thread pool becomes empty. As soon as a thread becomes available, the submitter thread should deliver a message and wait for a callback from Spring.

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