Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Igor Sapego
gt; > > > > > > > > > >> > > async API should be primary > > > > > > > > >> > > > > > > > > > >> > It should be noted that all our APIs are inherently > async, > > > > > > > > &g

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Ivan Daschinsky
> > because thin client is implemented asynchronously. > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > with the sync version build on top > > > > > > > >> > > > > > > &

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Igor Sapego
sync APIs are based on async > > > ones, > > > > > > >> > because this may be dangerous in some use cases. > > > > > > >> > > > > > > > >> > For example, as a user, I may have a thread pool of 4 > threads > > > for

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Ivan Daschinsky
d up blocked on CompletableFutures. > > > > > >> > When one of the operations completes, we enqueue the > completion > > to > > > > > that > > > > > >> > same thread pool, but all threads are blocked on sync APIs, > > > > result

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Pavel Tupitsyn
> > >> > This can be prevented by using a different > > > asyncContinuationExecutor, > > > > >> but > > > > >> > sync API users won't be usually aware of this. > > > > >> > > > > > >> > > >

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Ivan Daschinsky
t be usually aware of this. > > > >> > > > > >> > > > > >> > [1] https://issues.apache.org/jira/browse/IGNITE-15359 > > > >> > > > > >> > On Wed, Sep 8, 2021 at 10:04 AM Courtney Robinson < > > > >> > courtney.robi

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Pavel Tupitsyn
> > > > > >> > > I'd highly support an async first API based on CompletionStage > > >> > > < > > >> > > > > >> > > > >> > > > https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionSt

Re: Sync vs async APIs in Ignite 3

2021-09-09 Thread Ivan Daschinsky
gt;> > https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html > >> > > > > >> > > or > >> > > its subtypes like CompletableFuture. > >> > > In Ignite 2 we've written a wrapper library around IgniteFuture to > >

Re: Sync vs async APIs in Ignite 3

2021-09-08 Thread Pavel Tupitsyn
; In Ignite 2 we've written a wrapper library around IgniteFuture to >> > provide >> > > CompletionStage instead because many of the newer libs we use support >> > this. >> > > If Ignite 3 went this way it'd remove a lot of boiler plate/wrapper >> that &g

Re: Sync vs async APIs in Ignite 3

2021-09-08 Thread Pavel Tupitsyn
t this way it'd remove a lot of boiler plate/wrapper > that > > we > > > wrote to get what you're suggesting here. > > > > > > Regards, > > > Courtney Robinson > > > Founder and CEO, Hypi > > > Tel: ++44 208 123 2413 (GMT+0) <https://hypi.io>

Re: Sync vs async APIs in Ignite 3

2021-09-08 Thread Valentin Kulichenko
ve a lot of boiler plate/wrapper that > we > > wrote to get what you're suggesting here. > > > > Regards, > > Courtney Robinson > > Founder and CEO, Hypi > > Tel: ++44 208 123 2413 (GMT+0) <https://hypi.io> > > > > <https://hypi.io> &g

Re: Sync vs async APIs in Ignite 3

2021-09-08 Thread Pavel Tupitsyn
uliche...@gmail.com> wrote: > > > Igniters, > > > > I would like to gather some opinions on whether we want to focus on sync > vs > > async APIs in Ignite 3. > > > > Here are some initial considerations that I have: > > 1. Ignite 2.x i

Re: Sync vs async APIs in Ignite 3

2021-09-08 Thread Courtney Robinson
/hypi.io> https://hypi.io On Wed, Sep 8, 2021 at 12:44 AM Valentin Kulichenko < valentin.kuliche...@gmail.com> wrote: > Igniters, > > I would like to gather some opinions on whether we want to focus on sync vs > async APIs in Ignite 3. > > Here are some initial considerations t

Sync vs async APIs in Ignite 3

2021-09-07 Thread Valentin Kulichenko
Igniters, I would like to gather some opinions on whether we want to focus on sync vs async APIs in Ignite 3. Here are some initial considerations that I have: 1. Ignite 2.x is essentially "sync first". Async APIs exist, but they use non-standard IgniteFuture and provide counte