Re: async operation is not fair async

2018-08-02 Thread Dmitriy Govorukhin
Folks, Any comments? I will start to implement withFairAsync(); decorator soon. On Wed, Aug 1, 2018 at 12:22 PM Dmitriy Pavlov wrote: > Igniters, > > I've re-read this thread in brief. As far as I know this change is not > coming from some company, so this change will be at least good for

Re: async operation is not fair async

2018-08-01 Thread Dmitriy Pavlov
Igniters, I've re-read this thread in brief. As far as I know this change is not coming from some company, so this change will be at least good for healthy community building. And I didn't find any obstacles why not to implement approach with new mode .withFairAsync() for cases user is

Re: async operation is not fair async

2018-05-24 Thread Yakov Zhdanov
Alexey Goncharuk, I remember we started working on async connection establishment. This should fix latency issue related to network which I believe gives the most contribution to overall latency. Mapping logic and other stuff can be ignored as it can very rarely be an issue at least on stable

Re: async operation is not fair async

2018-05-24 Thread Dmitriy Govorukhin
So, in a current implementation, how I can perform the real async operation in one thread? Any workaround? What can I do if I have event loop thread model? On Wed, May 16, 2018 at 12:14 PM, Alexey Goncharuk < alexey.goncha...@gmail.com> wrote: > Dmitriy, > > I will add technical details to the

Re: async operation is not fair async

2018-05-16 Thread Alexey Goncharuk
Dmitriy, I will add technical details to the ticket, however, looks like there is still no consensus on how this change should be presented to a user. It would be ok if we changed this behavior in Ignite 3.0, but for one of the next point releases we have to agree how this should be

Re: async operation is not fair async

2018-05-15 Thread Dmitriy Govorukhin
Alexey, Any updates? On Mon, May 14, 2018 at 6:19 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > Alexey, > > Could you please add more description information for this task? [1] > Perhaps, base steps for implementation. > > [1] https://issues.apache.org/jira/browse/IGNITE-8475

Re: async operation is not fair async

2018-05-14 Thread Dmitriy Govorukhin
Alexey, Could you please add more description information for this task? [1] Perhaps, base steps for implementation. [1] https://issues.apache.org/jira/browse/IGNITE-8475 On Mon, May 14, 2018 at 4:58 PM, Alexey Goncharuk < alexey.goncha...@gmail.com> wrote: > Another +1 for the true

Re: async operation is not fair async

2018-05-14 Thread Alexey Goncharuk
Another +1 for the true asynchronous approach. I remember a while ago one of the Ignite users raised a similar question regarding the *async method being blocked on establishing a TCP connection. As far as deadlocks go, I have a counter-example. Currently, we check the thread-local chain only for

Re: async operation is not fair async

2018-05-14 Thread Dmitriy Govorukhin
Andrey, Do you prefer change behavior at runtime? I guess will be better have different methods for getting cache instance with fair and not fair sync. On Mon, May 14, 2018 at 3:39 PM, Andrey Gura wrote: > +1 for fair async operations. > > But I don't like idea use

Re: async operation is not fair async

2018-05-14 Thread Andrey Gura
+1 for fair async operations. But I don't like idea use withFairSync() method. We added xxxAsync() methods recently and withAsync() is deprecated. I think we should just make methods are async in nature and provide ability of switching to the old behaviour using flag or property. On Fri, May

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
Vladimir, In general I agree, but I do get greatly *close-minded* (pun intended) whenever users' code that worked for the past several years all of a sudden gets deadlocked after an upgrade. Making this feature optional is even worse and more confusing. In this case the best action is no action

Re: async operation is not fair async

2018-05-11 Thread Vladimir Ozerov
Guys, To build a great product we should be open minded and look to the future, not to the past. Dima raised very valid point - why async is not async? Current programming culture and demanding performance requirements pushes users towards reactive-style programming. I do not want my thread to

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
On Fri, May 11, 2018 at 7:46 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > I will edit IGNITE-8475, and remove all part that belong to the public api. > Is it acceptable for you? > Everything is acceptable, as long as the public API is safe :)

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
On Fri, May 11, 2018 at 7:23 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > Dmitriy S, > > If it will be in the internal package, and only for internal usage, are you > agree with changes? > Yes, but please be careful not to create deadlocks for ourselves. Can you please close

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Dmitriy S, If it will be in the internal package, and only for internal usage, are you agree with changes? пт, 11 мая 2018 г., 21:12 Dmitriy Setrakyan : > On Fri, May 11, 2018 at 6:49 PM, Dmitriy Govorukhin < > dmitriy.govoruk...@gmail.com> wrote: > > > Dmitriy S, > > > >

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
On Fri, May 11, 2018 at 6:49 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > Dmitriy S, > > It is not broke existing code, because for use this ability you must use > decorator "withFairSycn()". > > What about the argument of Vladimir? > Here is Vladimir's quote: *This would

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Dmitriy S, It is not broke existing code, because for use this ability you must use decorator "withFairSycn()". What about the argument of Vladimir? On Fri, May 11, 2018 at 8:41 PM, Dmitriy Setrakyan wrote: > On Fri, May 11, 2018 at 6:38 PM, Dmitriy Govorukhin < >

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
On Fri, May 11, 2018 at 6:38 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > Dmitriy S, > > Why method named as "async" but does not work as async? This is misleading. > > getAllAsync() is a special case. Not always you can use getAllAsync() > instead > of multiple getAsync(). >

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Dmitriy S, Why method named as "async" but does not work as async? This is misleading. getAllAsync() is a special case. Not always you can use getAllAsync() instead of multiple getAsync(). In this topic, I wanna discuss problem not only for the GET operation but also all async operation behavior

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
On Fri, May 11, 2018 at 6:29 PM, Dmitry Pavlov wrote: > IMO you can complete async operations one before another if these > operations are related to independent data. > > It is strange why Ignite users are not confused by current API. So I > support Dmitriy's G.

Re: async operation is not fair async

2018-05-11 Thread Dmitry Pavlov
IMO you can complete async operations one before another if these operations are related to independent data. It is strange why Ignite users are not confused by current API. So I support Dmitriy's G. suggestion. пт, 11 мая 2018 г. в 20:24, Dmitriy Setrakyan : > Guys, > >

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Setrakyan
Guys, I am not sure I like this approach, especially for this code: f1=cache.getAsync(key1); f2=cache.getAsync(key2); You cannot complete f2 before f1. If you do, the code is unusable and it is impossible to predict anything. If you need to get 2 elements asynchronously, use getAllAsync()

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Igniters, I created the issue. IGNITE-8475 Any comments are welcome. On Fri, May 11, 2018 at 6:32 PM, Ivan Rakov wrote: > Agree. "fair" is more descriptive. > > Best Regards, > Ivan Rakov > > > On 11.05.2018 18:30,

Re: async operation is not fair async

2018-05-11 Thread Ivan Rakov
Agree. "fair" is more descriptive. Best Regards, Ivan Rakov On 11.05.2018 18:30, Dmitriy Govorukhin wrote: Ivan, My suggestion "withFairAsync()". What do you think? On Fri, May 11, 2018 at 6:23 PM, Ivan Rakov wrote: I think, the best option from API side is to add

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Ivan, My suggestion "withFairAsync()". What do you think? On Fri, May 11, 2018 at 6:23 PM, Ivan Rakov wrote: > I think, the best option from API side is to add decorating > withExplicitAsync() method. > We already have withKeepBinary, withExpiryPolicy and so on. > > Best

Re: async operation is not fair async

2018-05-11 Thread Ivan Rakov
I think, the best option from API side is to add decorating withExplicitAsync() method. We already have withKeepBinary, withExpiryPolicy and so on. Best Regards, Ivan Rakov On 11.05.2018 18:18, Dmitriy Govorukhin wrote: Vladimir, Should we create the new cache adapter or rework

Re: async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Vladimir, Should we create the new cache adapter or rework GridCacheAdapter? On Fri, May 11, 2018 at 5:52 PM, Vladimir Ozerov wrote: > +1 > > This would also be helpful for transactional SQL as it would allow to hide > network latency. But there is a problem - deadlocks.

Re: async operation is not fair async

2018-05-11 Thread Vladimir Ozerov
+1 This would also be helpful for transactional SQL as it would allow to hide network latency. But there is a problem - deadlocks. We need to inform user that this mode should be used with great care. On Fri, May 11, 2018 at 5:21 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: >

async operation is not fair async

2018-05-11 Thread Dmitriy Govorukhin
Hi Igniters, I have a question. Why our async operation in not really async? GridCacheAdapter.syncOp has awaitLastFut(); this call wait last async operation completed. This means all async operation in one thread will be executed one by one but not in parallel. Async operation is not async.