You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by Ashish <pa...@gmail.com> on 2011/10/15 18:54:29 UTC
Multiple caches within same JVM?
Folks,
While creating a DirectMemory sample, I realized that there is no way
to create multiple caches within same JVM.
This is a fairly common use case, and we might need multiple caches
with different configurations.
Are there any plans to move implementation towards this goal or we can
handle this situation with current implementation?
--
thanks
ashish
Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal
Re: Multiple caches within same JVM?
Posted by Ashish <pa...@gmail.com>.
On Sat, Oct 15, 2011 at 10:48 PM, Raffaele P. Guidi
<ra...@gmail.com> wrote:
> We can consider the current implementation as the shortest path to a working
> and efficient off-heap cache, and I really would like to keep things this
> simple - no configuration at at all for the default configuration - but the
> subject of multiple buckets has been already brought up and give users a
> choice will be great.
>
> Now, I like the current Cache facade as it is (it is straightforward for
> simple use cases) but MemoryStorage should be refactored - it is probably
> wrong to have it as a singleton (the underlying OffHeapMemoryBuffer, the
> basic building block, is not a singleton) - and we could write a
> non-singleton implementation for the Cache as well - and here it is the
> implementation for multiple caches (buckets?) in the same VM.
>
> Then the Cache singleton facade could be rafactored to use the non singleton
> one as its foundation.
Agree on this, we should have something working and easy to use.
It can easily be refined and give a different facade :)
>
> Ciao,
> R
>
> PS: a long answer to just say: ok, let's move towards this goal :D
:)
>
> On Sat, Oct 15, 2011 at 6:54 PM, Ashish <pa...@gmail.com> wrote:
>
>> Folks,
>>
>> While creating a DirectMemory sample, I realized that there is no way
>> to create multiple caches within same JVM.
>>
>> This is a fairly common use case, and we might need multiple caches
>> with different configurations.
>>
>> Are there any plans to move implementation towards this goal or we can
>> handle this situation with current implementation?
>>
>> --
>> thanks
>> ashish
>>
>> Blog: http://www.ashishpaliwal.com/blog
>> My Photo Galleries: http://www.pbase.com/ashishpaliwal
>>
>
--
thanks
ashish
Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal
Re: Multiple caches within same JVM?
Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
We can consider the current implementation as the shortest path to a working
and efficient off-heap cache, and I really would like to keep things this
simple - no configuration at at all for the default configuration - but the
subject of multiple buckets has been already brought up and give users a
choice will be great.
Now, I like the current Cache facade as it is (it is straightforward for
simple use cases) but MemoryStorage should be refactored - it is probably
wrong to have it as a singleton (the underlying OffHeapMemoryBuffer, the
basic building block, is not a singleton) - and we could write a
non-singleton implementation for the Cache as well - and here it is the
implementation for multiple caches (buckets?) in the same VM.
Then the Cache singleton facade could be rafactored to use the non singleton
one as its foundation.
Ciao,
R
PS: a long answer to just say: ok, let's move towards this goal :D
On Sat, Oct 15, 2011 at 6:54 PM, Ashish <pa...@gmail.com> wrote:
> Folks,
>
> While creating a DirectMemory sample, I realized that there is no way
> to create multiple caches within same JVM.
>
> This is a fairly common use case, and we might need multiple caches
> with different configurations.
>
> Are there any plans to move implementation towards this goal or we can
> handle this situation with current implementation?
>
> --
> thanks
> ashish
>
> Blog: http://www.ashishpaliwal.com/blog
> My Photo Galleries: http://www.pbase.com/ashishpaliwal
>