incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: chicken and eggs issue in Cache class (configuration mechanism)
Date Wed, 22 Feb 2012 10:47:11 GMT
why not share you changes in your github fork ?
Will ease grab changes and test those.

2012/2/22 Simone Tripodi <simonetripodi@apache.org>:
> Bonjour,
>
> +1 for 0.6.0-SNAPSHOT, we've changed enough things and maybe we'll
> continue doing it - as next step, there are generics, see
> DIRECTMEMORY-43
>
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Wed, Feb 22, 2012 at 1:07 AM, Olivier Lamy <olamy@apache.org> wrote:
>> Hello,
>> Sorry I missed the thread.
>> I should push it :-) we will discuss after.
>>
>> I'd like to be able to do something like myFactory (or an other name)
>> .getRegion(name).put etc...
>>
>> BTW as we are introducing some changes what about bump version to
>> 0.6.0-SNAPSHOT ?
>>
>> 2012/2/21 Simone Tripodi <simonetripodi@apache.org>:
>>> Salut Olivier!
>>>
>>> I already proposed, some days ago - but looks like Daniel Manzke only
>>> took me seriously - an idea how to describe the configuration and the
>>> "factory".
>>>
>>> I invite you having a look at it if you didn't, because fits with what
>>> you described. Please see it on DIRECTMEMORY-62.
>>>
>>> Of course my proposal has to be enriched with regions, but I already
>>> have the impl on my machine.
>>>
>>> Simo
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>>
>>>
>>> On Tue, Feb 21, 2012 at 6:59 PM, Olivier Lamy <olamy@apache.org> wrote:
>>>> Currently Solr test failed due to a chicken and eggs issue.
>>>>
>>>>    private static CacheService cacheService = new CacheServiceImpl(
>>>> getMemoryManager() );
>>>>
>>>>
>>>>    public static void init( int numberOfBuffers, int size, int
>>>> initialCapacity, int concurrencyLevel )
>>>>    {
>>>>        cacheService.init( numberOfBuffers, size, initialCapacity,
>>>> concurrencyLevel );
>>>>    }
>>>>
>>>>    public static MemoryManagerService getMemoryManager()
>>>>    {
>>>>        return cacheService.getMemoryManager();
>>>>    }
>>>>
>>>> This Cache class is a bit confuse IMHO.
>>>> What is the purpose of this class exactly ? it looks to duplicate
>>>> CacheServiceImpl.
>>>>
>>>> I wonder about having like CacheFactory (or an other name) with a
>>>> DirectMemoryConfiguration class. I would prefer change the current
>>>> Cache class with that.
>>>>
>>>> class DirectMemoryConfiguration {
>>>>  List<CacheRegion> cacheRegions;
>>>> }
>>>>
>>>> class CacheRegion {
>>>>  String name;
>>>>  int numberOfBuffers;
>>>>  int size;
>>>>  int initialCapacity;
>>>>  int concurrencyLevel,
>>>>  String memoryManagerClazz; // optionnal
>>>> }
>>>>
>>>> Basically this will instantiate a CacheServiceImpl per cacheRegion.
>>>>
>>>> BTW after we can talk about a configuration file mechanism.
>>>>
>>>> WDYT ?
>>>>
>>>> Lemme if that makes sense for you.
>>>>
>>>> --
>>>> Olivier Lamy
>>>> Talend: http://coders.talend.com
>>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
View raw message