Re: Asynchronous jobs (not the scheduling)

2017-01-25 Thread Yakov Zhdanov
Sergei, Vlad,

I think you also might be interested in compute continuations since the
result of async execution may be sufficient for the job itself. Please see
ComputeFibonacciContinuationExample under ignite/examples.

--Yakov


Re: Asynchronous jobs (not the scheduling)

2017-01-25 Thread Vladislav Pyatkov
Hi Sergei,

Why do you not use "ignite.compute().withAsync()"?

On Wed, Jan 25, 2017 at 2:04 PM, Sergei Egorov  wrote:

> Hi all,
>
> I'm wondering if it's possible not to block the job executor's thread when
> I wait for some async event.
>
> somethingLike:
>
> ```
> ignite.compute().run(() -> someServiceRefSomehow.doSomethingAsync());
> ```
>
> where
> ```
> interface SomeService {
> CompletableFuture doSomethingAsync();
> }
> ```
>
> Or even better:
>
> ```
> interface SomeService {
> Observable doSomethingAsync();
> }
> ```
>
> Thanks!
>



-- 
Vladislav Pyatkov


Asynchronous jobs (not the scheduling)

2017-01-25 Thread Sergei Egorov
Hi all,

I'm wondering if it's possible not to block the job executor's thread when
I wait for some async event.

somethingLike:

```
ignite.compute().run(() -> someServiceRefSomehow.doSomethingAsync());
```

where
```
interface SomeService {
CompletableFuture doSomethingAsync();
}
```

Or even better:

```
interface SomeService {
Observable doSomethingAsync();
}
```

Thanks!