Return-Path: X-Original-To: apmail-incubator-directmemory-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-directmemory-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D34075EC for ; Thu, 29 Dec 2011 18:19:46 +0000 (UTC) Received: (qmail 25772 invoked by uid 500); 29 Dec 2011 18:19:45 -0000 Delivered-To: apmail-incubator-directmemory-dev-archive@incubator.apache.org Received: (qmail 25743 invoked by uid 500); 29 Dec 2011 18:19:45 -0000 Mailing-List: contact directmemory-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directmemory-dev@incubator.apache.org Delivered-To: mailing list directmemory-dev@incubator.apache.org Received: (qmail 25678 invoked by uid 99); 29 Dec 2011 18:19:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 18:19:45 +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 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 18:19:39 +0000 Received: by werm13 with SMTP id m13so6820348wer.6 for ; Thu, 29 Dec 2011 10:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dMlVNaetkeKWCn+OKf9RmGESrBZE5ig2eNrYo9eE13o=; b=n9TNmyQSRmNe0j14pdfEh4gGNjrWf+XafYFhYDOA1HvRV1tZMgaj9nh6Z5HhH/8m5S ptC32oQQYBmn65Jino5MQlkgL8MVHW56/3pwvwE1/5H5X0Kzqxu4O2cP41cVZLr0Z5rt ZAsTGs/0T3PxCCrokRex069EK8OkIsdCEeHyQ= MIME-Version: 1.0 Received: by 10.216.144.138 with SMTP id n10mr20050674wej.57.1325182759170; Thu, 29 Dec 2011 10:19:19 -0800 (PST) Received: by 10.216.154.207 with HTTP; Thu, 29 Dec 2011 10:19:19 -0800 (PST) Received: by 10.216.154.207 with HTTP; Thu, 29 Dec 2011 10:19:19 -0800 (PST) In-Reply-To: References: Date: Thu, 29 Dec 2011 19:19:19 +0100 Message-ID: Subject: Re: Eviction at MemoryBuffer vs at CacheService level From: "Raffaele P. Guidi" To: directmemory-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=0016e6de01379f70ef04b53f27db X-Virus-Checked: Checked by ClamAV on apache.org --0016e6de01379f70ef04b53f27db Content-Type: text/plain; charset=ISO-8859-1 Totally agreed. It's a long due refactoring Il giorno 29/dic/2011 17:33, "Benoit Perroud" ha scritto: > Hi All, > > I thought at the evicition policy. It is actually done at MemoryBuffer > level, but this leads to a problem : > > A pointer could be evicted, but the cache still reference it. It seems > to be processed correctly by the CacheService. > > My point hier is we should try to do a better separation of the > responsabilities, in order to have layers that could be reused > independently : > > - MemoryService should only try to reduce fragmentation (for example > using the read only buffer (see DIRECTMEMORY-9)) > - CacheService should allow pluggable eviction (LRU, LFU, ...) > > What is your thoughts on this ? > > Thanks > > Benoit. > --0016e6de01379f70ef04b53f27db--