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 8177B200CF6 for ; Mon, 18 Sep 2017 15:43:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7FEE71609DB; Mon, 18 Sep 2017 13:43:56 +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 C510C1609D8 for ; Mon, 18 Sep 2017 15:43:55 +0200 (CEST) Received: (qmail 73943 invoked by uid 500); 18 Sep 2017 13:43:54 -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 73931 invoked by uid 99); 18 Sep 2017 13:43:54 -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; Mon, 18 Sep 2017 13:43:54 +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 30183C5F66 for ; Mon, 18 Sep 2017 13:43:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.199 X-Spam-Level: X-Spam-Status: No, score=0.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.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 Hj8ymhIwaqTG for ; Mon, 18 Sep 2017 13:43:52 +0000 (UTC) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1867461029 for ; Mon, 18 Sep 2017 13:43:52 +0000 (UTC) Received: by mail-io0-f172.google.com with SMTP id 21so2142170iof.6 for ; Mon, 18 Sep 2017 06:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=OAQDbejN+wwd8DhUBsxTR0BrN61TpcQGXXCZ80mPB0Q=; b=1WUEwJPw+XPR0NWeZEeHyiCuAUmF1hXHWpZpwFsxaH0FzD2W8FsIXXarR1lmbj8eRA TysgCRygbDuVECKb6X0hqrSBXqWr8FKJyw2ojLPMfDfMo6CNwKIFQ0ONh8bhk5umaGF8 7RAIRf4HaseL3W7zCcbo8BGCFJDMknDbTYqlLebiQDOwbZ2d29Msz50MdLC6L4zlcqjF lcAY783iB2u6FkeA4wCtgv0mD9YVeHDp7NFqZzvH5USjS7sHgrYAgVEkmFivH4n7nlr1 xGSQ2V5zr4wmECJmUU7TSgNwbufzKggTmhH+2g/7AFyDUCGEqbd4RzCjbvj8zW9Pw3BV yV+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=OAQDbejN+wwd8DhUBsxTR0BrN61TpcQGXXCZ80mPB0Q=; b=WmJocURsPeHICIOMkmogqJiN6xIgTjo2fsRtuGcIjDYwo/9JszjjmO+V0wo3QuTERH sMX9QWk3U7GGW+xNhFHzKQctlJNcCba+VLBTk1NkvqSKT2cw0tXx2GQWplay3QMEB9yv mydMSi6BRm99XMPYvz/ysqNBA/3FSxfvUZ89UlQi1n3uGc8ijnXJm7U+BnFMisoYzJsP xSBb4GFy6ubNZMbxzzqX2LQBEsj8c6dR/LCJaeddqy1+u0pO5YJOR559UfhpNIQi03EU LEVfR9yh4vS7GusTt6iDVxe7mm85cWPxNIVrVj+8xoUkVgPDdalUwp3yWmbo+Hm8RL9T J8tA== X-Gm-Message-State: AHPjjUiluirovj65xVxdQ5h7smqq/HmSPtWhcTOsXPx36sCTe4LI2DMn 5b43Zyy7pUTm5JbSmf5Mkn8brShSl4gmODrFsODo8g== X-Google-Smtp-Source: AOwi7QCpXBE+JvkG7pp6KmVc0ySubowac1NQ0yj1DIregQNy8h/K0UXvWZ4AKiXBWg2zHbUIBn7sbw9/dXuS2lDbYfU= X-Received: by 10.202.253.205 with SMTP id b196mr19229195oii.174.1505742230557; Mon, 18 Sep 2017 06:43:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.1.67 with HTTP; Mon, 18 Sep 2017 06:43:49 -0700 (PDT) In-Reply-To: References: <5a26383b-7d2e-9b02-6f56-7d207f565f23@gmail.com> <663b5cbd-2983-4501-e01b-e4803b77ccf1@gmail.com> <3f745905-597a-d944-0239-b177e524aa16@gmail.com> <6bc1acdd-d761-2a23-f1e2-b7b21e261ad8@gmail.com> <8A0EFA49-698D-498E-BA32-8CF29DF4BE19@apache.org> From: Vladimir Ozerov Date: Mon, 18 Sep 2017 16:43:49 +0300 Message-ID: Subject: Re: ContinuousQueryWithTransformer implementation questions - 2 To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="001a113a401ec6aa6a055976ee28" archived-at: Mon, 18 Sep 2017 13:43:56 -0000 --001a113a401ec6aa6a055976ee28 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Nikolay, Here is a short summary what is wrong with continuous query: 1) It should not have "initialQuery" 2) It should not be called through IgniteCache.query() method, as it has nothing in common with other "query" types 3) Main thing: our listeners are *ALWAYS* executed on a node which initiated the query. p.3 is the major problem. JCache specification doesn't define where listeners should be invoked. Should we have ability to execute them on data nodes, there would be much less demand in transformers. What I see in your PR is that we add one more confusing concept - in addition to wrongly named "local listener" now we will also have "TransformedEventListener". What is worse, this interface is inconsistent with JCache event listeners, which distinguish between create, update and delete events. For these reasons I would still prefer to think of better continuous queries design first instead of making current API even more complicated. Vladimir. On Mon, Sep 18, 2017 at 4:04 PM, =D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9= =D0=98=D0=B6=D0=B8=D0=BA=D0=BE=D0=B2 wrote: > Igniters, > > I discussed API of ContinuousQuery and ContinuousQueryWithTransformer wit= h > Anton Vinogradov one more time. > > Since users who use regular ContinuousQuery already knows pros. and cons = of > using initialQuery and to not to complicate API more and more until 3.0 w= e > agreed that best choice is to stay with existing initialQuery that return > Cache.Entry for ContinuousQueryWithTransformer. > > Notice that initialQuery is not required and can be null. > > Thoughts? > > 2017-09-15 1:45 GMT+03:00 Denis Magda : > > > Vladimir, > > > > If the API is so bad then it might take much more time to make up and > roll > > out the new. Plus, there should be a community member who is ready to > take > > it over. My suggestion would be to accept this contribution and initiat= e > an > > activity towards the new API if you like. > > > > Personally, I considered this API as one of the most vivid we have basi= ng > > on my practical usage experience. I was aware of initial query=E2=80=99= s pitfalls > > but isn=E2=80=99t it something we can put on paper? > > > > =E2=80=94 > > Denis > > > > > On Sep 12, 2017, at 6:04 AM, Vladimir Ozerov > > wrote: > > > > > > My opinion is that our query API is big piece of ... you know, > especially > > > ContinuousQuery. A lot of concepts and features are mixed in a single > > > entity, what makes it hard to understand and use. Let's finally > deprecate > > > ContinuousQuery and design nice and consistent API. E.g.: > > > > > > interface IgniteCache { > > > UUID addListener(CacheEntryListener listener) > > > void removeListener(UUID listenerId); > > > } > > > > > > This method set's a listener on all nodes which will process event > > locally, > > > no network communication. Now if you want semantics similar to existi= ng > > > continuous queries, you use special entry listener type: > > > > > > class ContinuousQueryCacheEntryListener implements CacheEntryListener > { > > > ContinuousQueryRemoteFilter rmtFilter; > > > ContinuousQueryRemoteTransformer rmtTransformer; > > > ContinuousQueryLocalCallback locCb; > > > } > > > > > > Last, "initial query" concept should be dropped from "continuous quer= y" > > > feature completely. It doesn't guarantee any kind of atomicity or > > > visibility wrt to cache events, so it adds no value. The same behavio= r > > > could be achieved as follows: > > > > > > cache.addListener(...) > > > QueryCursor cursor =3D cache.query(initialQuery); > > > > > > Vladimir. > > > > > > > > > On Tue, Sep 12, 2017 at 3:35 PM, Yakov Zhdanov > > wrote: > > > > > >> Dmitry, can you please take a look at public API change. > > >> > > >> Ticket - https://issues.apache.org/jira/browse/IGNITE-425 > > >> PR - https://github.com/apache/ignite/pull/2372 > > >> > > >> Issues: > > >> 1. Do you see any other option other than creating separate class? A= s > > for > > >> me I don't. > > >> 2. In a new class we still have initial query which uses type= s > > which > > >> is questionable. > > >> > > >> Igniters, please share your thoughts as well. Public API is the face > of > > our > > >> product we need to make it as convenient and consistent as we can. > > >> > > >> --Yakov > > >> > > > > > > > -- > Nikolay Izhikov > NIzhikov.dev@gmail.com > --001a113a401ec6aa6a055976ee28--