ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4699) Introduce custom configurable executors.
Date Mon, 03 Apr 2017 07:39:43 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-4699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953085#comment-15953085

Vladimir Ozerov commented on IGNITE-4699:

There are two main problems which I expect to be covered once ticket is ready:
1) Execution of nested compute calls. In this case you can make decision on per-job basis.
Say, if you created a re-usable component, you could do something like:
And any code on top of this component will be able to use it safely without a risk of deadlock.
2) Execution of chained calls, especially {{IgniteFuture.chain}} and {{IgniteFuture.listen}}.
Currently user has no control on where continuation is to be executed, so he can inadvertently
run something in public pool, causing exhaustion of public pool threads. Once user has access
to predefined executors, he will be able to control this behavior.

Regarding simplicity of configuration, for other thread pools we allow users to configure
only number of threads (e.g. {{IgniteConfiguration.publicThreadPoolSize}}. And I am not aware
of any complains on insufficient flexibility of this approach. This is why I propose to start
with as simple config as possible. We will always be able to extend it in future if needed.

One more important reason why we need to have this feature ready ASAP is 2.0 release, which
is expected to happen in April. This feature will require message protocol changes, and hence
broke binary compatibility. 

Having said that I'd prefer to go ahead with Taras patch at the moment, while keeping in mind
all proposed improvement for future releases. Ideally, it would be cool to materialize them
into JIRA tickets, and plan their implementation in AI 2.1 release or so.

> Introduce custom configurable executors.
> ----------------------------------------
>                 Key: IGNITE-4699
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4699
>             Project: Ignite
>          Issue Type: Task
>          Components: compute
>            Reporter: Vladimir Ozerov
>            Assignee: Alexander Menshikov
>              Labels: important
>             Fix For: 2.0
> We need to provide a way to configure custom thread pools for user compute tasks. 
> Proposed API:
> 1) Config
> {code}
> class ExecutorConfiguration {
>     String name;
>     int size;
> }
> {code}
> 2) Choosing executor for compute task:
> {code}
> IgniteCompute compute = Ignite.compute().withExecutor("my_exec");
> {code}
> 3) Accessing raw executor (could be required for proper execution of future listeners):
> {code}
> ThreadPoolExecutor exec = ignite.compute().localExecutor("my_exec");
> {code}

This message was sent by Atlassian JIRA

View raw message