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 AEF2B200D09 for ; Tue, 12 Sep 2017 18:33:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AD9FB1609C7; Tue, 12 Sep 2017 16:33:05 +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 CC6771609B4 for ; Tue, 12 Sep 2017 18:33:04 +0200 (CEST) Received: (qmail 44709 invoked by uid 500); 12 Sep 2017 16:33:03 -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 44658 invoked by uid 99); 12 Sep 2017 16:33:03 -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; Tue, 12 Sep 2017 16:33:03 +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 0EE7AC536D for ; Tue, 12 Sep 2017 16:33:03 +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 c9iMn0XMnQvH for ; Tue, 12 Sep 2017 16:33:01 +0000 (UTC) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 38E395F3FE for ; Tue, 12 Sep 2017 16:33:01 +0000 (UTC) Received: by mail-io0-f174.google.com with SMTP id g32so33091054ioj.2 for ; Tue, 12 Sep 2017 09:33:01 -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=sTSCGURnHCrsjy9pli+OVGQKlhe8Q2inGv7hL+k2mDk=; b=G/HzyOzOgTRjWk+qTKP2lwWMvQZ9n7DAb3A5UklcEHyoKdloeoujndrL44+dPt1570 eGc9bEcrif6jfx1PvlQIw26dXGed4nNtDs6jBSEhFles5W2OlFx7tmka3op4Yq4OSOaX KntqtOayN5JBFMH7XjQTA8/pjsw+/B450IEEGg9uSI9V6fLNc9azWhwfdIq0B9pVpsCG N2ZqZhRFjruUZeP8lhNFVAl9E+OT6oqGz/HTBBqUsW+FFwM0ZJOc0m46wC8zszz+0pRX uibT/eG6z8rqXAwjmz0md13yKELXsdLXeoYr5AHCUWe2XCumML0vhzLYT8FVjInhXzPE BBWg== 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=sTSCGURnHCrsjy9pli+OVGQKlhe8Q2inGv7hL+k2mDk=; b=HDz54O676s43KhnM/O8yEJmtgnJww/GKHmhQpD9VFvqNhQhyFfQ4lfMVpCRXPOGWF3 V1y/f+1gzqk+5jhvr+j9MysUiH2naprTxxefAXXY/qsHF1SFXz3Q2XgkQzmAjZUo6vfq Efjqra79ASIX8BgzN9zc6inIlnT/R0GbyExAB8ZX9VCf51snKLMecxwa1Uic7UsnxZen ClRoFSJnc2Z36ut29/sSdPYBgIRe1i/XFSATUjLfMROlXzIqBM4u6vVxEHM7EEkHZvKO beUejxT9FzjxKSvyx/NmpcGRkpJcw5e8dor9dD56j9qKXUa4ZP1jjLYZ/YUEHImHmDxE Wo7A== X-Gm-Message-State: AHPjjUgza0lbxCFtAS1sCO+VVqPuMYz0HEooZ2UcZlxEenN/1pbi0GlL 2HvO+roybgdErJ4oYl2M4blmrmLwM1WH X-Google-Smtp-Source: AOwi7QD9fhI1EqF68vAI7FWgycStApDbS5oGbfyQDw6/AtvRDuON3TCjA/Du8Qu/gu8ei6VGPDI7zX+0yiRFvFgTA9k= X-Received: by 10.202.79.149 with SMTP id d143mr15323706oib.202.1505233979739; Tue, 12 Sep 2017 09:32:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.91.65 with HTTP; Tue, 12 Sep 2017 09:32:59 -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> From: Vladimir Ozerov Date: Tue, 12 Sep 2017 19:32:59 +0300 Message-ID: Subject: Re: ContinuousQueryWithTransformer implementation questions - 2 To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="001a113d6680aaa7d905590098db" archived-at: Tue, 12 Sep 2017 16:33:05 -0000 --001a113d6680aaa7d905590098db Content-Type: text/plain; charset="UTF-8" Dima, We definitely can have factories if we want. On Tue, Sep 12, 2017 at 5:55 PM, Dmitriy Setrakyan wrote: > Vladimir, are their factories for the proposed listeners? > > On Tue, Sep 12, 2017 at 7:52 AM, Alexey Goncharuk < > alexey.goncharuk@gmail.com> wrote: > > > Vladimir, > > > > Can you please clarify how the proposed API will work? > > > > 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. > > > > > > Do I understand correctly that CacheEntryListener will have a method like > > onEvent() which will accept the cache event? > > > > > > > Now if you want semantics similar to existing > > > continuous queries, you use special entry listener type: > > > > > > class ContinuousQueryCacheEntryListener implements CacheEntryListener > { > > > ContinuousQueryRemoteFilter rmtFilter; > > > ContinuousQueryRemoteTransformer rmtTransformer; > > > ContinuousQueryLocalCallback locCb; > > > } > > > > > > > > This becomes confusing: while the ContinuousQueryCacheEntryListener > itself > > has the onEvent() method, which is supposed to be called on event nodes, > it > > also has a rmtFilter, which will also be called on event nodes. Will the > > onEvent() then invoked on the listener anyway, regardless of the filter > > result? Finally, the listener will have a local callback field, which > will > > be called on the originating node. This sounds way more tricky to me than > > the current API. > > > > > > > Last, "initial query" concept should be dropped from "continuous query" > > > feature completely. It doesn't guarantee any kind of atomicity or > > > visibility wrt to cache events, so it adds no value. The same behavior > > > could be achieved as follows: > > > > > > cache.addListener(...) > > > QueryCursor cursor = cache.query(initialQuery); > > > > > > > > Agree with this. > > > --001a113d6680aaa7d905590098db--