Return-Path: X-Original-To: apmail-directmemory-dev-archive@www.apache.org Delivered-To: apmail-directmemory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BF11104B0 for ; Mon, 12 May 2014 05:06:59 +0000 (UTC) Received: (qmail 23936 invoked by uid 500); 10 May 2014 22:51:11 -0000 Delivered-To: apmail-directmemory-dev-archive@directmemory.apache.org Received: (qmail 4801 invoked by uid 500); 10 May 2014 22:49:53 -0000 Mailing-List: contact dev-help@directmemory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directmemory.apache.org Delivered-To: mailing list dev@directmemory.apache.org Received: (qmail 94557 invoked by uid 99); 10 May 2014 22:49:14 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 22:49:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of raffaele.p.guidi@gmail.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2014 16:28:37 +0000 Received: by mail-vc0-f169.google.com with SMTP id ij19so3596508vcb.14 for ; Thu, 08 May 2014 09:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=d+44S8/NoGwlqJJiwNgzcwI7l1QzARbVTehLzAEB/Ds=; b=y3ommM8XTazSpqtV9oJ2M0QCSThNdXkX+TYGs5yliZa4NtGJfFFqLGeCV/PfKOr0uj nxSbEgCX8re2goAB+W9SkqPbGno32+7ytrgwFbrQvzjvwD0HBaLX5bGFPdepS1JVE4Dw MjpKqqV+nwsns4X5IcjlkDQiDOEjzpJajoxBLKugPKELL2EW4xgtc6n8rXuyJyjQAGvF PAWUuJXFmB+C34wuYYU6g/ElcbORjaSkJ1uSGhjXnJHWS5azL9OjRa6R0sKYeeNx1biS hjT8XhqzYe3uT8Ud2279zYruBu99owA6zUABlk3hY9nxol9Ldvmf7jTDCM7FDQrbGy2o wW5w== MIME-Version: 1.0 X-Received: by 10.220.176.68 with SMTP id bd4mr1647995vcb.70.1399566494448; Thu, 08 May 2014 09:28:14 -0700 (PDT) Received: by 10.220.49.212 with HTTP; Thu, 8 May 2014 09:28:14 -0700 (PDT) In-Reply-To: References: <1399398858.89552.YahooMailNeo@web28906.mail.ir2.yahoo.com> Date: Thu, 8 May 2014 18:28:14 +0200 Message-ID: Subject: Re: [jcs] What's next? From: "Raffaele P. Guidi" To: Commons Developers List , dev@directmemory.apache.org Cc: Mark Struberg Content-Type: multipart/alternative; boundary=001a11c1bf92bdc44804f8e5f752 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1bf92bdc44804f8e5f752 Content-Type: text/plain; charset=UTF-8 Oops, wrong address, sorry :) 2014-05-07 12:03 GMT+02:00 Raffaele P. Guidi : > Talking about next steps, have you ever considered a second level of (off > heap) cache? My question is of course not so casual, being the PMC of > DirectMemory :) I think there are a lot of potential synergies, here. I > include DM's dev list to gather opinions and solicitate feedback from the > team members. > > Ciao, > R > > > 2014-05-06 22:39 GMT+02:00 Romain Manni-Bucau : > > That's my experience too. So let's go for the concurrenthashmap impl >> (patch on jira) and then see how we do the invalidation stuff in a >> 2.1? >> >> >> Romain Manni-Bucau >> Twitter: @rmannibucau >> Blog: http://rmannibucau.wordpress.com/ >> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> Github: https://github.com/rmannibucau >> >> >> 2014-05-06 19:54 GMT+02:00 Mark Struberg : >> > Well my personal experience only: >> > >> > >> > 1.) I barely use distributed caches. I use ehcache in most of my >> projects as of today, but do not use the distribution feature much. Way too >> complicated >> > >> > 2.) What actually IS useful is distributed cache invalidation. The >> caching side is fine to just select any values from my DB if they are not >> yet cached. But if I change those values, then I really need some ways to >> get rid of the values in all the caches on all my cluster nodes. >> > >> > So from a purely personal point I would favour a mode which is really >> fast as a local cache but would have some ways to distribute the >> invalidation of a cache to all other nodes. >> > >> > Not sure how this fits into jcs - don't know the codebase well enough >> to judge about it. >> > >> > LieGrue, >> > strub >> > >> > >> > On Tuesday, 6 May 2014, 13:29, Romain Manni-Bucau < >> rmannibucau@gmail.com> wrote: >> > >> > Here some pseudo-core details about my first mail: >> >> >> >>New internals: >> >>* NetworkTopology >> >>* EntryRepartitor: compute the index of the >> >>* Node (LocalNode which is current impl and RemoteNode which is just a >> >>remote facade relying Network) >> >> >> >>NetworkTopology { // impl using udp/tcp/or whatever >> >> Node[] findAll() // used by a background thread to check if there >> >>is a new node and if so rebalance the cluster >> >>} >> >> >> >>Node { // remote and local API >> >> get(k), put(k, v) .... (Cache primitive methods) >> >> Statistics getStatistics() // used by a background thread to >> >>aggregate stats on each node >> >>} >> >> >> >> >> >>EntryRepartitor { >> >> Node[] nodeAndBackups(key) >> >>} >> >> >> >> >> >>get(key) { // symmetrical for put of course >> >> Node[] nodes = entryRepartitor.nodeAndBackups(key); >> >> for (final Node node : nodes) { >> >> try { >> >> return node.get(key); >> >> } catch(final RemoteCacheException rce) { // API exception >> >> throw rce.getJCacheException(); >> >> } catch(final Exception e) { // network exception try next node >> >> // continue >> >> } >> >> } >> >>} >> >> >> >>Of course we'll get LocalNode implementing Node with the current impl >> >>(ConcurrentHashMap) and RemoteNode will be a client view of the >> >>LocalNode over the network. >> >> >> >>To keep it testable we need to be able to test a RemoteNode -> >> >>LocalNode connection in the same JVM creating manually two >> >>CachingProviders. >> >> >> >>wdyt? >> >> >> >> >> >>Romain Manni-Bucau >> >>Twitter: @rmannibucau >> >>Blog: http://rmannibucau.wordpress.com/ >> >>LinkedIn: http://fr.linkedin.com/in/rmannibucau >> >>Github: https://github.com/rmannibucau >> >> >> >> >> >> >> >>2014-05-06 12:50 GMT+02:00 Romain Manni-Bucau : >> >>> FYI I attached a patch using a ConcurrentHashMap here >> >>> https://issues.apache.org/jira/browse/JCS-127 >> >>> >> >>> It is pretty fast compared to previous impl. >> >>> >> >>> >> >>> Romain Manni-Bucau >> >>> Twitter: @rmannibucau >> >>> Blog: http://rmannibucau.wordpress.com/ >> >>> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> >>> Github: https://github.com/rmannibucau >> >>> >> >>> >> >>> 2014-05-06 8:31 GMT+02:00 Romain Manni-Bucau : >> >>>> Hi guys, >> >>>> >> >>>> few questions about jcs: >> >>>> >> >>>> 1) I played a bit with remote cache server etc and didn't find a lot >> >>>> of use cases, do we keep it this way (linked to 4) )? >> >>>> 2) API: do we use JCache as main API or do we keep core? >> >>>> 3) Reviewing JCache module I really wonder if we shouldn't use a >> >>>> ConcurrentHashMap instead of a the currently backing CompositeCache >> >>>> and add on top of this "locally optimized" implementation two things: >> >>>> a) eviction (a thread regularly iterating over local items to check >> >>>> expiry would be enough), b) distribution (see 4) ) >> >>>> 4) distributed mode: I wonder if we shouldn't rethink it and >> >>>> potentially add Cache listeners usable in JCache to know if >> >>>> another node did something (useful to get consistent stats at least - >> >>>> basically we need a way to aggregate on each note stats) + use a key >> >>>> for each node to keep data on a single node + potentially add backup >> >>>> on another node. >> >>>> >> >>>> wdyt? >> >>>> >> >>>> I don't know how much JCS is used ATM and if we can break that much >> >>>> the API but since that would be a 2.0 I think it is the moment >> >>>> >> >>>> >> >>>> Romain Manni-Bucau >> >>>> Twitter: @rmannibucau >> >>>> Blog: http://rmannibucau.wordpress.com/ >> >>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> >>>> Github: https://github.com/rmannibucau >> >> >> >>--------------------------------------------------------------------- >> >>To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> >>For additional commands, e-mail: dev-help@commons.apache.org >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > --001a11c1bf92bdc44804f8e5f752--