Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6A992200B4B for ; Thu, 21 Jul 2016 11:16:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 69189160A6D; Thu, 21 Jul 2016 09:16:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B01D4160A68 for ; Thu, 21 Jul 2016 11:16:37 +0200 (CEST) Received: (qmail 80425 invoked by uid 500); 21 Jul 2016 09:16:36 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 80413 invoked by uid 99); 21 Jul 2016 09:16:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2016 09:16:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2935DC0D33 for ; Thu, 21 Jul 2016 09:16:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.198 X-Spam-Level: ** X-Spam-Status: No, score=2.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id AHd4wnAxToNj for ; Thu, 21 Jul 2016 09:16:33 +0000 (UTC) Received: from mail-vk0-f47.google.com (mail-vk0-f47.google.com [209.85.213.47]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 8B51260CC4 for ; Thu, 21 Jul 2016 09:16:33 +0000 (UTC) Received: by mail-vk0-f47.google.com with SMTP id n129so59494238vke.3 for ; Thu, 21 Jul 2016 02:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=aOsizqGEcgxExN7/CEB0dPU0G/1/jKe/7w6/DQWUDR4=; b=yFbKvZqmxK7hwSumYgYi4a4n1q8AKuamcWVN5/OWUN0bCnOaTYBstAleFtTJOHPh6h yjDQxwEjlAFTFKJz4wZrXKMn79I77dyY6S8kbRGUeOhOaY90aOWbqOzhce8rKTM54rX1 QFeDbratJhUDR1n085OLZE73gu+EniIZheuvJu2kRARqKSqgHp1mhaephqAuZBS9uS/7 If8QW3NxLVff9seLvHf9gBY5Nnq0NVllGZKMapsK3tLoB3IWoRj2gRluAYLH2r0x4Ku0 /klAbZSCpVlrOYBaVGMlTkU4b6vqOSQMS4gXLFqEix1TQ5L+E1Wav9qmRdsl2UgI4wt5 kaKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=aOsizqGEcgxExN7/CEB0dPU0G/1/jKe/7w6/DQWUDR4=; b=JNxjrULPn99PPq8xZGDeGriDNiMmFJRvEHD47WslO6AF4P58t1B9/fgt/Mc5EzpCZa Nz/mOUNH+jj/VAka4vxmeMfeywQZ8TQpkBDpMsHOgDPRdhkoJoVEvv6j28SFan/hLez9 qio+ji4NG8cAGb0YD10aVGuaJvUADHsK60+9vIit5r3/7rY70yqT+uDYVVoJ879RFdr4 8ees5SK5h7FT1C0935C1gUGALEoWwLN0t8tdXVY09YWmvNogHcq+bzs5XDoOmAQalgyC YRv/j7qQeGT7EWmmVVf+r3kAACmMsS8fU9a9letH5Gq809hMp16dYtRoXWVpfgYMeknM MKCw== X-Gm-Message-State: ALyK8tIc92YdFADQHrRaseQjHdhD4PUNcKyYCBrAIA0yNf4044XrFTFT94nWWbPxX0P8zsQo60WubB3m9DxzMQ== X-Received: by 10.31.218.198 with SMTP id r189mr1967047vkg.30.1469092592163; Thu, 21 Jul 2016 02:16:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.49.2 with HTTP; Thu, 21 Jul 2016 02:15:52 -0700 (PDT) In-Reply-To: References: From: Sergi Vladykin Date: Thu, 21 Jul 2016 12:15:52 +0300 Message-ID: Subject: Re: Rework "withAsync" in Apache 2.0 To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c07be80192e85053821c6e3 archived-at: Thu, 21 Jul 2016 09:16:38 -0000 --94eb2c07be80192e85053821c6e3 Content-Type: text/plain; charset=UTF-8 +1 Finally it is time to drop this "cool feature" from Ignite! Sergi On Thu, Jul 21, 2016 at 11:13 AM, Vladimir Ozerov wrote: > Alex. > > Of course, some distributed operations will involve some kind of asynchrony > even in synchronous mode. My point is that we should not blindly do things > like that: > > V get(K key) { > return getAsync(key),get(); > } > > Instead, get() has it's own path, getAsync() another path. But of course > they could share some common places. E.g. I remember we already fixed some > cache operations in this regard when users hit async semaphore limit when > calling synchronous gets. > > Another point is that async instances may possibly accept user-provided > Executor. > > Vladimir, > > On Thu, Jul 21, 2016 at 11:04 AM, Semyon Boikov > wrote: > > > Another issue which usually confuses users is Ignite 'implementation > > details' of asynchronous execution: it operation is local it can be > > executed from calling thread (for example, if 'async put' is executed in > > atomic cache from primary node then cache store will be updated from > > calling thread). Does it make sense to fix this as well? > > > > > > On Thu, Jul 21, 2016 at 10:55 AM, Yakov Zhdanov > > wrote: > > > > > Agree with Alex. Vova, please go on with issues taking Alex's comments > > into > > > consideration. > > > > > > Thanks! > > > > > > --Yakov > > > > > > 2016-07-21 10:43 GMT+03:00 Alexey Goncharuk < > alexey.goncharuk@gmail.com > > >: > > > > > > > Big +1 on this in general. > > > > > > > > I would also relax our guarantees on operations submitted from the > same > > > > thread. Currently we guarantee that sequential invocations of async > > > > operations happen in the same order. I think that if a user wants > such > > > > guarantees, he must define these dependencies explicitly by calling > > > chain() > > > > on returning futures. > > > > > > > > This change will significantly improve cache operations performance > in > > > > async mode. > > > > > > > > 3) Sync operations normally* should not* be implemented through > async. > > > This > > > > > is a long story - if we delegate to async, then we have to bother > > with > > > > > additional threads, associated back-pressure control and all that > > crap. > > > > > Sync call must be sync unless there is a very strong reason to go > > > through > > > > > async path. > > > > > > > > > Not sure about this, though. In most cases a cache operation implies > > > > request/response over the network, so I think we should have explicit > > > > synchronous counterparts only for methods that are guaranteed to be > > > local. > > > > > > > > > > --94eb2c07be80192e85053821c6e3--