You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by Benoit Perroud <be...@noisette.ch> on 2011/12/29 17:33:12 UTC

Eviction at MemoryBuffer vs at CacheService level

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.

Re: Eviction at MemoryBuffer vs at CacheService level

Posted by Benoit Perroud <be...@noisette.ch>.
Thanks all.

I didn't find a Jira for that. I will open a new one.


2011/12/29 Tommaso Teofili <to...@gmail.com>:
> +1
>
> Tommaso
>
> 2011/12/29 Raffaele P. Guidi <ra...@gmail.com>
>
>> Totally agreed. It's a long due refactoring
>> Il giorno 29/dic/2011 17:33, "Benoit Perroud" <be...@noisette.ch> 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.
>> >
>>



-- 
sent from my Nokia 3210

Re: Eviction at MemoryBuffer vs at CacheService level

Posted by Tommaso Teofili <to...@gmail.com>.
+1

Tommaso

2011/12/29 Raffaele P. Guidi <ra...@gmail.com>

> Totally agreed. It's a long due refactoring
> Il giorno 29/dic/2011 17:33, "Benoit Perroud" <be...@noisette.ch> 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.
> >
>

Re: Eviction at MemoryBuffer vs at CacheService level

Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
Totally agreed. It's a long due refactoring
Il giorno 29/dic/2011 17:33, "Benoit Perroud" <be...@noisette.ch> 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.
>