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 74C4E200C54 for ; Wed, 12 Apr 2017 18:35:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 731F2160BA8; Wed, 12 Apr 2017 16:35:47 +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 93A82160B85 for ; Wed, 12 Apr 2017 18:35:46 +0200 (CEST) Received: (qmail 5830 invoked by uid 500); 12 Apr 2017 16:35:45 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 5705 invoked by uid 99); 12 Apr 2017 16:35:45 -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; Wed, 12 Apr 2017 16:35:45 +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 1033DCFA62 for ; Wed, 12 Apr 2017 16:35:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4PMGXTw3iomj for ; Wed, 12 Apr 2017 16:35:43 +0000 (UTC) Received: from mail-ua0-f182.google.com (mail-ua0-f182.google.com [209.85.217.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E708A5FB5C for ; Wed, 12 Apr 2017 16:35:42 +0000 (UTC) Received: by mail-ua0-f182.google.com with SMTP id a1so19421857uaf.3 for ; Wed, 12 Apr 2017 09:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kL/PugU9Bcuuh+hNEyQE3rhe6jUXS5FH0uNVvVQvANg=; b=Fhawnvk7jLSUjiQLuQyMGhxjwzNIKM3lGfdB/fCUyLgC57EhlbukqbbfiX27lPTw46 bOh5XAyzY8ZXczJq4/t6a00sXD/42H7YRWMQpB8S564PduFT3L6H/Mdbunj5KgZ6i0VX D1FYedpNY3BKo2/nGRcY3GlCSqhw+wNA3Iu7O6M1PbwrVMb0hFwy9sg1gp12/I9KahP3 MTxsLAvoX+ClhdoQ5+Bu6W6U488VldD4MCgzdV9o2GhBItqttnHeZptBKICh0WkOUuMx hOxWBgnat7ZYtgAUlFTtINRXZgcqT+80NlXdpvWnGz7Icu+9i70I+j29B+TWnGjXdlpe ZVIw== 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=kL/PugU9Bcuuh+hNEyQE3rhe6jUXS5FH0uNVvVQvANg=; b=bGL6Vq1Kt8h44Ie0rV8bzDwLsViqXyAncTJOi5s5yxZjZE1etHKBLfiTUu/UOUnB1M 2rH7Cft+D2r4Ig3tGwyTM2jl/ZBFTS1nQmKGkb1nzZFW8Y2tB9PHgZFesrD0gUsrTFQf dP6SRV2epOudNPfndn2WJo5HIODIIJ9VgiNcozaI12I+KjfMzLnGpxzTqQK30BvDX5Q+ xL2Ph3gnAP7MUKQhDkOKrou5WagiyMJbhhf7IPFiF3R5VXrU6dbSZvDqzFiypFv4Vy0w 3I1vJ8Qyd06dv/WTg0kNqrHFeNveFCz3YUKMNjpGSYUc80pa10U3MgzR/O2c2gGuLXBs 9USg== X-Gm-Message-State: AN3rC/48UMoVhZupFuQHvt9ogpPTZndbGrPzBgCr/NudRJ1CBJ/wq5CUMjZ+YJ8enFQUmS1Yq4Yr092y4P0xfA== X-Received: by 10.176.23.134 with SMTP id r6mr1549022uaf.178.1492014942085; Wed, 12 Apr 2017 09:35:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.4.225 with HTTP; Wed, 12 Apr 2017 09:35:41 -0700 (PDT) In-Reply-To: <1492013890625-11910.post@n6.nabble.com> References: <1492013890625-11910.post@n6.nabble.com> From: Andrey Mashenkov Date: Wed, 12 Apr 2017 19:35:41 +0300 Message-ID: Subject: Re: Repeatable cache updates To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=f403045e69f49f67b4054cfacc80 archived-at: Wed, 12 Apr 2017 16:35:47 -0000 --f403045e69f49f67b4054cfacc80 Content-Type: text/plain; charset=UTF-8 Hi, 3) Initial query is not mandatory, you can set it to null to receive updates only. Also, you can try CacheInterceptor to update other caches synchronously. It can cause performance issues as CacheInterceptor methods are called from sensitive part of code inside synchronized block, but it should be ok, if you update same key in another cache and it is one-way cache synchronization (so, deadlock is not possible). On Wed, Apr 12, 2017 at 7:18 PM, nskovpin wrote: > Hello, Ignite team! > Assume that i have a big cache A (key - id, value - date, etc ). This cache > is being updated every 5 minutes. My question is: what is the best way to > update my other caches, that were built from cache A (value has a field > "date"). I have some thoughts: > 1) I can create broadcast or computeTask, than read A's local entries and > update another caches (but i should read all my entries, even they haven't > updated yet) > 2) I can create cacheEvents and update another caches - but i've read that > events are designed more for auditing purposes. > 3) I can create continuous query, but i don't need to query my data:) > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/Repeatable-cache-updates-tp11910.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Best regards, Andrey V. Mashenkov --f403045e69f49f67b4054cfacc80 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

3) Initial query is not mandatory, = you can set it to null to receive updates only.

Al= so, you can try CacheInterceptor to update other caches synchronously. It c= an cause performance issues as=C2=A0
CacheInterceptor methods are= called from sensitive part of code inside synchronized block, but it shoul= d be ok,
if you update same key in another cache and it is one-wa= y cache synchronization (so, deadlock is not possible).

<= /div>

On Wed= , Apr 12, 2017 at 7:18 PM, nskovpin <kolehandro@gmail.com> wrote:
Hello, Ignite team!
Assume that i have a big cache A (key - id, value - date, etc ). This cache=
is being updated every 5 minutes. My question is: what is the best way to update my other caches, that were built from cache A (value has a field
"date"). I have some thoughts:
1) I can create broadcast or computeTask, than read A's local entries a= nd
update another caches (but i should read all my entries, even they haven= 9;t
updated yet)
2) I can create cacheEvents and update another caches - but i've read t= hat
events are designed more for auditing purposes.
3) I can create continuous query, but i don't need to query my data:)


--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Repe= atable-cache-updates-tp11910.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Best regards,
Andrey V. Mashenkov
--f403045e69f49f67b4054cfacc80--