ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: Continuations for services
Date Wed, 08 Mar 2017 21:46:51 GMT
Continuations is not very good idea. It is useful if user has simple logic
when one job calls another from within the same execute/run/call method.
But if you have complex logic with OOP abstractions and reusable
components, nested job call can be located many stack frames down from
parent job. In this case continuations are unusable.

More convenient approach is to map separate jobs to separate thread pools.
This technique is successfully employed in Hazelcast. You just define
additional executors and say that job A is to be executed one thread pool,
and job B on another.

The same technique is applicable for services:

class MyService implements Service {
    Ignite ignite;

    void myMethod() {


All in all I would do the following:
1) Create separate built-in pool for services to make sure that in simple
cases users are able to call compute jobs from service methods.
2) Implement custom executors which will be applicable for both compute [1]
and service components.

[1] https://issues.apache.org/jira/browse/IGNITE-4699

08 марта 2017 г. 23:01 пользователь "Dmitriy Setrakyan" <
dsetrakyan@apache.org> написал:

> On Wed, Mar 8, 2017 at 11:58 AM, Valentin Kulichenko <
> valentin.kulichenko@gmail.com> wrote:
> > Separate thread pool will not solve the case of calling a service from
> > another service.
> >
> Why not? The caller thread should block.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message