From dev-return-37123-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Fri Jul 27 19:59:17 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 27894180657 for ; Fri, 27 Jul 2018 19:59:16 +0200 (CEST) Received: (qmail 94339 invoked by uid 500); 27 Jul 2018 17:59:16 -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 94327 invoked by uid 99); 27 Jul 2018 17:59:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2018 17:59:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0C7B5C97E3 for ; Fri, 27 Jul 2018 17:59:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.888 X-Spam-Level: ** X-Spam-Status: No, score=2.888 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pKzKK-DJjYFD for ; Fri, 27 Jul 2018 17:59:12 +0000 (UTC) Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 0151B5F366 for ; Fri, 27 Jul 2018 17:59:11 +0000 (UTC) Received: by mail-io0-f193.google.com with SMTP id i18-v6so4815959ioj.13 for ; Fri, 27 Jul 2018 10:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ID92/cFyDQpJykAdga1qbOmUZpmRCQOza0ksflenKKY=; b=nq22jKvWokXzoDpD950ebF438R181sxnJx88XajiCBZDnGAAGo7FWJcutOPNPV5ZNN O4u0VNh4I6Nf+J7onOb5kCoBPl+WND44IK4u48z4wD+3M5jHQN6R5TS2XJnIRI+ZZbV+ FzQ5gj7U5vD29vyxAMTrEifKGmPDg4F6md98n0kIJ9boUCSWuyzIvSlz066YaCeFr4IJ hAh6LST6mRcWZ3yZoDYFz7/dW5V1HWQocVtzr0nGVox7BlN9mkugThhwHTr3BX3WofRd Au89/xTOde3C8jbZuCARA7vdUt51lPEZisGQfhsLwe5FM05BvakTHZy42TAA3QYTxJtf 0vng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ID92/cFyDQpJykAdga1qbOmUZpmRCQOza0ksflenKKY=; b=LQG62/oAaywK70+7PhC1NdNF6P79/8jR/cDAOgNwk1j3t1/sTobNoWvKeo5JEzi2De CFe2ckTHug7Ui9XQ8ikpMgkfnwL1Vbe/J0O94Mz8GUTGVMA11LPuRLnLA+FxAQeFcD2i 4ryuAFrHwdiFrpZ/Sz5y4bty5R8BDHbz4FIplfKOq/eiBMUmJtVBv0W7mSOs2JJBilHF 0EemqIhgodJ/Ki+NZkNPQKcunMUTOhMD2nY5TuDF1srPPviBEeb06QhpAt59I1y9qM/Y iGHR40ISYM3ai8VBaqGZYDQWkvg2m0LnA6XarjPk58Wmuvl5ROSiIM8zmKjfm86LFiPT rTlw== X-Gm-Message-State: AOUpUlHQECIitwef4EqgfTsztcXKoFvX5mtT79OmZHmKjAsSTJau2ax2 mfqjy+qIEK/r4Uht5Ae3ib8pVSuqybniT4x5nfO7Mw== X-Google-Smtp-Source: AAOMgpdjzD18m5CngGygvkpRWom3xRY71CsDsxK2LdPTpP/Xlc05f5+BP8Cqb5CKmZXvxkgbYBY7wwBzOl7h+IzX2wM= X-Received: by 2002:a6b:ba46:: with SMTP id k67-v6mr5940931iof.246.1532714350317; Fri, 27 Jul 2018 10:59:10 -0700 (PDT) MIME-Version: 1.0 References: <5b582c38.1c69fb81.79f79.f76a@mx.google.com> In-Reply-To: From: Valentin Kulichenko Date: Fri, 27 Jul 2018 10:58:43 -0700 Message-ID: Subject: Re: Deprecating LOCAL cache To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="00000000000064950b0571fede0d" --00000000000064950b0571fede0d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Guys, Use cases for local caches are rare, but they definitely exist. I don't think it's a very good idea to deprecate this functionality at this point. At the same point, it's obviously not the most critical part of the product, so maintaining the whole separate implementation for it is probably an overkill. We had exact same story with replicated caches btw - they were implemented separately which caused maintainability issues, and we ended up removing this separate implementation. If we have the same situation here, let's use the same solution. -Val On Fri, Jul 27, 2018 at 3:05 AM Dmitry Pavlov wrote= : > Hi Dmitriy, > > I would like to stress this: I'm not saying local cache it useless. I'm > supposing it is not used widely. I want to figure out if I'm mistaking. > > All folks involved into user list says it is not used, so why not to > deprecate? If we make a mistake, somebody will come to user list and say, > 'Hey, why did you deprecate this, it is used for... in my project' > > Being very experienced Igniter you probably know real life usage examples= . > And I appreciate if you or somebody else in community could share it. > > Sincerely, > Dmitriy Pavlov > > =D0=BF=D1=82, 27 =D0=B8=D1=8E=D0=BB. 2018 =D0=B3. =D0=B2 1:04, Dmitriy Se= trakyan : > > > Guys, > > > > I just want to make sure we are all on the same page. The main use case > for > > LOCAL caches is to have a local hash map querable with SQL and > > automatically persisted to a 3rd party DB. > > > > I want to discourage people from saying "nobody needs some feature". No= ne > > of the people in this discussion are users of any features - we are all > > developers of the features. Instead of guessing whether to deprecate > > something or not, I would actually see if it is even worth a discussion= . > > How much effort is required to fix the bug found in the LOCAL cache? > > > > D. > > > > On Thu, Jul 26, 2018 at 12:19 PM, Dmitry Pavlov > > wrote: > > > > > Hi Alexey, > > > > > > There is nothing to be sorry about :) =D0=A1ommunity appreciates an > > alternative > > > vision, this allows us to make as informed decisions as it possible. > > > > > > Thank you for finding this fact, it is very interesting. > > > > > > I'm not sure all these examples were prepared by experienced Ignite > > users. > > > So idea of deprecation may have one more argument. Deprecation will > help > > us > > > to inform users about LOCAL cache: Probably local cache is not what > they > > > need. > > > > > > Sincerely, > > > Dmitriy Pavlov > > > > > > =D1=87=D1=82, 26 =D0=B8=D1=8E=D0=BB. 2018 =D0=B3. =D0=B2 16:57, Alexe= y Zinoviev : > > > > > > > Sorry, guys, I'll put my 1 cent > > > > > > > > I'd like this idea "Implement LOCAL caches as PARTITIONED caches > over > > > the > > > > local node." > > > > It make sense for examples/testing in pseudo-distributed mode and s= o > > far. > > > > > > > > But I think that the deprecation based on user-list mentions is a > wrong > > > > way. Please look here > > > > > https://github.com/search?q=3D%22CacheMode.LOCAL%22+%26+ignite&type=3DCod= e > > > > There a lot of hello world examples with LOCAL mode. > > > > > > > > And of course, we can ask about that on user-list, not here, to vot= e > > for > > > > the deprecation like this. > > > > > > > > 2018-07-26 11:23 GMT+03:00 Vladimir Ozerov : > > > > > > > > > I meant LOCAL + non-LOCAL transactions of course. > > > > > > > > > > On Wed, Jul 25, 2018 at 10:42 PM Dmitriy Setrakyan < > > > > dsetrakyan@apache.org> > > > > > wrote: > > > > > > > > > > > Vladimir, > > > > > > > > > > > > Are you suggesting that a user cannot span more than one local > > cache > > > > in a > > > > > > cross cache LOCAL transactions. This is extremely surprising to > me, > > > as > > > > it > > > > > > would require almost no effort to support it. As far as mixing > the > > > > local > > > > > > caches with distributed caches, then I agree, cross-cache > > > transactions > > > > do > > > > > > not make sense. > > > > > > > > > > > > I am not sure why deprecating local caches has become a pressin= g > > > > issue. I > > > > > > can see that there are a few bugs, but why not just fix them an= d > > move > > > > on? > > > > > > Can someone explain why supporting LOCAL caches is such a burde= n? > > > > > > > > > > > > Having said that, I am not completely opposed to deprecating > LOCAL > > > > > caches. > > > > > > I just want to know why. > > > > > > > > > > > > D. > > > > > > > > > > > > On Wed, Jul 25, 2018 at 10:55 AM, Vladimir Ozerov < > > > > vozerov@gridgain.com> > > > > > > wrote: > > > > > > > > > > > > > Dima, > > > > > > > > > > > > > > LOCAL cache adds very little value to the product. It doesn't > > > support > > > > > > > cross-cache transactions, consumes a lot of memory, much slow= er > > > than > > > > > any > > > > > > > widely-used concurrent hash map. Let's go the same way as Jav= a > - > > > mark > > > > > > LOCAL > > > > > > > cache as "deprecated for removal", and then remove it in 3.0. > > > > > > > > > > > > > > On Wed, Jul 25, 2018 at 12:10 PM Dmitrii Ryabov < > > > > somefireone@gmail.com > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > +1 to make LOCAL as filtered PARTITIONED cache. I think it > > would > > > be > > > > > > much > > > > > > > > easier and faster than fixing all bugs. > > > > > > > > > > > > > > > > 2018-07-25 11:51 GMT+03:00 Dmitriy Setrakyan < > > > > dsetrakyan@apache.org > > > > > >: > > > > > > > > > > > > > > > > > I would stay away from deprecating such huge pieces as a > > whole > > > > > LOCAL > > > > > > > > cache. > > > > > > > > > In retrospect, we should probably not even have LOCAL > caches, > > > but > > > > > > now I > > > > > > > > am > > > > > > > > > certain that it is used by many users. > > > > > > > > > > > > > > > > > > I would do one of the following, whichever one is easier: > > > > > > > > > > > > > > > > > > - Fix the issues found with LOCAL caches, including > > > > persistence > > > > > > > > support > > > > > > > > > - Implement LOCAL caches as PARTITIONED caches over th= e > > > local > > > > > > node. > > > > > > > In > > > > > > > > > this case, we would have to hide any > distribution-related > > > > config > > > > > > > from > > > > > > > > > users, like affinity function, for example. > > > > > > > > > > > > > > > > > > D. > > > > > > > > > > > > > > > > > > On Wed, Jul 25, 2018 at 9:05 AM, Valentin Kulichenko < > > > > > > > > > valentin.kulichenko@gmail.com> wrote: > > > > > > > > > > > > > > > > > > > It sounds like the main drawback of LOCAL cache is that > > it's > > > > > > > > implemented > > > > > > > > > > separately and therefore has to be maintained separatel= y. > > If > > > > > that's > > > > > > > the > > > > > > > > > > only issue, why not keep LOCAL cache mode on public API= , > > but > > > > > > > implement > > > > > > > > it > > > > > > > > > > as a PARTITIONED cache with a node filter forcefully se= t? > > > > That's > > > > > > > > similar > > > > > > > > > to > > > > > > > > > > what we do with REPLICATED caches which are actually > > > > PARTITIONED > > > > > > with > > > > > > > > > > infinite number of backups. > > > > > > > > > > > > > > > > > > > > This way we fix the issues described by Stan and don't > have > > > to > > > > > > > > deprecate > > > > > > > > > > anything. > > > > > > > > > > > > > > > > > > > > -Val > > > > > > > > > > > > > > > > > > > > On Wed, Jul 25, 2018 at 12:53 AM Stanislav Lukyanov < > > > > > > > > > > stanlukyanov@gmail.com> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > Hi Igniters, > > > > > > > > > > > > > > > > > > > > > > I=E2=80=99d like to start a discussion about the depr= ecation of > > the > > > > > LOCAL > > > > > > > > > caches. > > > > > > > > > > > > > > > > > > > > > > LOCAL caches are an edge-case functionality > > > > > > > > > > > I haven=E2=80=99t done any formal analysis, but from = my > > experience > > > > > LOCAL > > > > > > > > caches > > > > > > > > > > > are needed very rarely, if ever. > > > > > > > > > > > I think most usages of LOCAL caches I=E2=80=99ve seen= were > > misuses: > > > > the > > > > > > > users > > > > > > > > > > > actually needed a simple HashMap, or an actual > > PARTITIONED > > > > > cache. > > > > > > > > > > > > > > > > > > > > > > LOCAL caches are easy to implement on top of > PARTITIONED > > > > > > > > > > > If one requires a LOCAL cache (which is itself > > > questionable, > > > > as > > > > > > > > > discussed > > > > > > > > > > > above) it is quite easy to implement one on top of > > > > PARTITIONED > > > > > > > cache. > > > > > > > > > > > A node filter of form `node -> node.id > > > > ().equals(localNodeId)` > > > > > is > > > > > > > > > enough > > > > > > > > > > > to make the cache to be stored on the node that creat= ed > > it. > > > > > > > > > > > Locality of access to the cache (i.e. making it > > unavailable > > > > > from > > > > > > > > other > > > > > > > > > > > nodes) can be achieved on the application level. > > > > > > > > > > > > > > > > > > > > > > LOCAL caches are hard to maintain > > > > > > > > > > > A quick look at the open issues mentioning =E2=80=9Cl= ocal > cache=E2=80=9D > > > > > suggests > > > > > > > > that > > > > > > > > > > > this is a corner case for implementation of many Igni= te > > > > > features: > > > > > > > > > > > > > > > > > > > > > > > https://issues.apache.org/jira/issues/?jql=3Dtext%20~%20% > > > > > > > > > > 22local%20cache%22%20and%20%20project%20%3D%20IGNITE% > > > > > > > > > > 20and%20status%20%3D%20open > > > > > > > > > > > In particular, a recent SO question brought up the fa= ct > > > that > > > > > > LOCAL > > > > > > > > > caches > > > > > > > > > > > don=E2=80=99t support native persistence: > > > > > > > > > > > > > > > > > > > > > > https://stackoverflow.com/questions/51511892/how-to- > > > > > > > > > > configure-persistent-storage-for-apache-ignite-cache > > > > > > > > > > > Having to ask ourselves =E2=80=9Chow does it play wit= h LOCAL > > > caches=E2=80=9D > > > > > > every > > > > > > > > time > > > > > > > > > > we > > > > > > > > > > > write any code in Ignite seems way to much for the > > benefits > > > > we > > > > > > gain > > > > > > > > > from > > > > > > > > > > it. > > > > > > > > > > > > > > > > > > > > > > Proposal > > > > > > > > > > > Let=E2=80=99s deprecate LOCAL caches in 2.x and remov= e them in > > 3.0. > > > > > > > > > > > As a part of deprecation let=E2=80=99s do the followi= ng: > > > > > > > > > > > - Put @Deprecated on the CacheMode.LOCAL > > > > > > > > > > > - Print a warning every time a LOCAL cache is created > > > > > > > > > > > - Remove all mentions of LOCAL caches from readme.io, > if > > > > any, > > > > > > > except > > > > > > > > > for > > > > > > > > > > > the page about cache modes > > > > > > > > > > > - On the page about cache modes explain that LOCAL is > > > > > deprecated > > > > > > > and > > > > > > > > > can > > > > > > > > > > > be replaced with a PARTITIONED cache with a node filt= er > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > Stan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --00000000000064950b0571fede0d--